Skip to content

Commit 0139fb1

Browse files
authored
Merge pull request #4864 from RSSNext/release/desktop/1.3.1
release(desktop): Release v1.3.1
2 parents 30310e6 + 8ef3a5a commit 0139fb1

File tree

293 files changed

+14535
-12539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

293 files changed

+14535
-12539
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
name: installing-mobile-preview-builds
3+
description: Builds and installs the iOS preview build for apps/mobile using EAS local build and devicectl. Use when the user asks to install a preview/internal iOS build on a connected iPhone for production-like testing.
4+
disable-model-invocation: true
5+
allowed-tools: Bash, Read, Glob, Grep
6+
argument-hint: "[device-udid-or-name(optional)]"
7+
---
8+
9+
# Install Mobile Preview Build (iOS)
10+
11+
Use this skill to create a fresh local `preview` iOS build and install it on a connected iPhone.
12+
13+
## Inputs
14+
15+
- Optional `$ARGUMENTS`: device identifier (UDID or exact device name).
16+
- If no argument is provided, auto-select the first paired iPhone from `xcrun devicectl list devices`.
17+
18+
## Workflow
19+
20+
1. Validate repo and tooling.
21+
- Run from repo root and ensure `apps/mobile` exists.
22+
- Verify `pnpm`, `xcrun`, `xcodebuild`, and `eas-cli` are available.
23+
- Verify EAS login:
24+
```bash
25+
cd apps/mobile
26+
pnpm dlx eas-cli whoami
27+
```
28+
2. Resolve target device.
29+
- List paired devices:
30+
```bash
31+
xcrun devicectl list devices
32+
```
33+
- Choose device in this order:
34+
- `$ARGUMENTS` if provided and matches exactly one device.
35+
- Otherwise, first paired iPhone.
36+
3. Trigger local `preview` iOS build.
37+
38+
```bash
39+
mkdir -p .context/preview-install
40+
cd apps/mobile
41+
pnpm dlx eas-cli build -p ios --profile preview --non-interactive --local --output=./build-preview.ipa
42+
cd ../..
43+
cp apps/mobile/build-preview.ipa .context/preview-install/folo-preview.ipa
44+
```
45+
46+
4. Install to device locally.
47+
```bash
48+
unzip -q -o .context/preview-install/folo-preview.ipa -d .context/preview-install/unpacked
49+
APP_PATH=$(find .context/preview-install/unpacked/Payload -maxdepth 1 -name '*.app' -type d | head -n 1)
50+
xcrun devicectl device install app --device "<device-id>" "$APP_PATH"
51+
```
52+
5. Try launching app.
53+
54+
```bash
55+
xcrun devicectl device process launch --device "<device-id>" is.follow --activate
56+
```
57+
58+
- If launch fails due to locked device, instruct the user to unlock iPhone and open `Folo` manually.
59+
60+
## Failure Handling
61+
62+
- If local build fails, report:
63+
- build mode (`local`)
64+
- failing command
65+
- key error message from command output
66+
- If app config fails with `Assets source directory not found ... /out/rn-web`, prebuild assets then retry once:
67+
```bash
68+
pnpm --filter @follow/rn-micro-web-app build --outDir out/rn-web/html-renderer
69+
```
70+
71+
## Output Format
72+
73+
Always return:
74+
75+
1. Build mode (`local`) and final status.
76+
2. Local IPA path.
77+
3. Target device identifier.
78+
4. Install result (`installed` or `failed`) and launch result.
79+
5. Next action for the user if manual action is required.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
name: mobile-release
3+
description: Perform a regular mobile release from the dev branch. Gathers commits since last release, updates changelog, bumps version, updates iOS Info.plist, and creates release PR to mobile-main.
4+
disable-model-invocation: true
5+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6+
---
7+
8+
# Mobile Regular Release
9+
10+
Perform a regular mobile release. This skill handles the full release workflow from the `dev` branch.
11+
12+
## Pre-flight checks
13+
14+
1. Confirm the current branch is `dev`. If not, abort with a warning.
15+
2. Run `git pull --rebase` in the repo root to ensure the local branch is up to date.
16+
3. Read `apps/mobile/package.json` to get the current `version`.
17+
18+
## Step 1: Gather changes since last release
19+
20+
1. Find the last release tag (both old `mobile@` and new `mobile/v` prefixes exist):
21+
```bash
22+
git tag --sort=-creatordate | grep -E '^mobile[@/]' | head -1
23+
```
24+
2. If no tag found, find the last release commit by matching only the subject line:
25+
```bash
26+
git log --format="%H %s" | grep "^[a-f0-9]* release(mobile): release v" | head -1 | awk '{print $1}'
27+
```
28+
3. Get all commits since the last release on the current branch:
29+
```bash
30+
git log <last-tag-or-commit>..HEAD --oneline --no-merges
31+
```
32+
4. Categorize commits into:
33+
- **Shiny new things** (feat: commits, new features)
34+
- **Improvements** (refactor:, perf:, chore: improvements, dependency updates)
35+
- **No longer broken** (fix: commits, bug fixes)
36+
- **Thanks** (identify external contributor GitHub usernames from commits)
37+
38+
## Step 2: Update changelog
39+
40+
1. Read `apps/mobile/changelog/next.md`.
41+
2. Present the categorized changes to the user and draft the changelog content.
42+
3. Wait for user confirmation or edits before writing.
43+
4. Write the final content to `apps/mobile/changelog/next.md`, following the template format:
44+
45+
```markdown
46+
# What's New in vNEXT_VERSION
47+
48+
## Shiny new things
49+
50+
- description of new feature
51+
52+
## Improvements
53+
54+
- description of improvement
55+
56+
## No longer broken
57+
58+
- description of fix
59+
60+
## Thanks
61+
62+
Special thanks to volunteer contributors @username for their valuable contributions
63+
```
64+
65+
5. Keep `NEXT_VERSION` as the placeholder - it will be replaced by `apply-changelog.ts` during bump.
66+
67+
## Step 3: Execute bump
68+
69+
1. Change directory to `apps/mobile/` and run the bump:
70+
```bash
71+
cd apps/mobile && pnpm bump
72+
```
73+
2. This is an interactive `nbump` command that prompts for version selection. It will:
74+
- Pull latest changes
75+
- Apply changelog (rename next.md to {version}.md, create new next.md from template)
76+
- Format package.json with eslint + prettier
77+
- Bump version in `package.json`
78+
- Update `ios/Folo/Info.plist`:
79+
- Set `CFBundleShortVersionString` to the new version
80+
- Increment `CFBundleVersion` (build number) by 1
81+
- Commit with message `release(mobile): release v{NEW_VERSION}`
82+
- Create branch `release/mobile/{NEW_VERSION}`
83+
- Push branch and create PR to `mobile-main`
84+
85+
## Step 4: Verify
86+
87+
1. Confirm the PR was created successfully by checking the output.
88+
2. Report the new version number and PR URL to the user.
89+
3. Summarize:
90+
- New version: v{NEW_VERSION}
91+
- Changelog highlights
92+
- PR URL
93+
94+
## Post-release (manual steps, inform user)
95+
96+
After the release PR is merged to `mobile-main`:
97+
98+
1. **Trigger production builds** via GitHub Actions `workflow_dispatch`:
99+
- Go to "Build iOS" workflow, select `mobile-main` branch, profile = `production`
100+
- Go to "Build Android" workflow, select `mobile-main` branch, profile = `production`
101+
2. Production builds auto-submit to App Store (via `eas submit`) and Google Play (as draft).
102+
3. After submission, go to App Store Connect and Google Play Console to complete the review/release process.
103+
104+
## Reference
105+
106+
- Bump config: `apps/mobile/bump.config.ts`
107+
- Changelog dir: `apps/mobile/changelog/`
108+
- Changelog template: `apps/mobile/changelog/next.template.md`
109+
- Apply changelog script: `apps/mobile/scripts/apply-changelog.ts`
110+
- EAS config: `apps/mobile/eas.json`
111+
- App config: `apps/mobile/app.config.ts`
112+
- iOS Info.plist: `apps/mobile/ios/Folo/Info.plist`
113+
- CI build iOS: `.github/workflows/build-ios.yml`
114+
- CI build Android: `.github/workflows/build-android.yml`
Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
---
2+
name: update-deps
3+
description: Update all dependencies across frontend and backend projects. Reads changelogs for breaking changes, checks affected code, runs tests, and provides a summary. Use when updating npm dependencies across the monorepo.
4+
disable-model-invocation: true
5+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep, WebFetch, WebSearch, Task
6+
---
7+
8+
# Update All Dependencies
9+
10+
Update all npm dependencies across the frontend (current repo) and backend projects. This skill handles the full update workflow including changelog review, code impact analysis, testing, and summarization.
11+
12+
## Step 0: Ask for backend directory
13+
14+
Ask the user for the backend project directory path. Do NOT hardcode any path. Example prompt:
15+
16+
> Please provide the backend project directory path (e.g., `/path/to/backend`).
17+
18+
Wait for the user's response before proceeding. Save the path as `BACKEND_DIR` for later use.
19+
20+
## Step 1: Analyze current dependencies
21+
22+
### Frontend (current repo)
23+
24+
1. Run `pnpm outdated --recursive` in the current repo root to identify all outdated dependencies.
25+
2. Save the full output for later analysis.
26+
27+
### Backend
28+
29+
1. Run `pnpm outdated --recursive` in `BACKEND_DIR` to identify all outdated dependencies.
30+
2. Save the full output for later analysis.
31+
32+
Present the user with a summary of how many dependencies are outdated in each project.
33+
34+
## Step 2: Update dependencies
35+
36+
### Strategy
37+
38+
Update in two phases to isolate issues:
39+
40+
**Phase 1 β€” Patch and minor updates (safer):**
41+
42+
From the `pnpm outdated` output, identify all dependencies where the update is a patch or minor version bump. Update them in batch:
43+
44+
1. Frontend: For each patch/minor outdated package, run `pnpm update <package>@latest --recursive` in the repo root.
45+
2. Backend: For each patch/minor outdated package, run `pnpm update <package>@latest --recursive` in `BACKEND_DIR`.
46+
47+
> **Why `@latest`?** Both projects use `save-exact=true`, so versions are pinned without `^` or `~`. Without `--latest`, `pnpm update` only resolves within the existing range, which for exact versions is a no-op.
48+
49+
**Phase 2 β€” Major updates (requires careful review):**
50+
51+
For each dependency with a major version update available:
52+
53+
1. Identify the dependency name, current version, and latest version.
54+
2. **Read the changelog** (Step 3) before updating.
55+
3. Only update after confirming no blocking breaking changes.
56+
4. Use `pnpm update <package>@latest --recursive` to update specific packages.
57+
58+
**Important pnpm workspace notes:**
59+
60+
- The frontend project uses `pnpm catalog` in `pnpm-workspace.yaml` for some shared versions. If a dependency is managed via catalog, update the version in `pnpm-workspace.yaml` instead of individual `package.json` files.
61+
- Both projects use `save-exact=true`, so versions are pinned without `^` or `~`.
62+
- Check `patchedDependencies` in `pnpm-workspace.yaml` or `package.json` β€” if a patched dependency is being updated, verify the patch still applies or remove it if no longer needed.
63+
64+
## Step 3: Review changelogs for major updates
65+
66+
For each dependency with a **major version update**, you MUST read the changelog before updating.
67+
68+
### How to find changelogs
69+
70+
Use these methods in order of preference:
71+
72+
1. **npm registry**: Run `npm view <package> repository.url` to find the repo, then check for `CHANGELOG.md` or GitHub releases.
73+
2. **GitHub releases**: Search `https://github.com/<owner>/<repo>/releases` using WebFetch.
74+
3. **Web search**: Use WebSearch to find `<package> changelog <old-version> to <new-version>`.
75+
76+
### What to look for
77+
78+
- **Breaking changes**: API removals, renamed exports, changed defaults, dropped Node.js version support.
79+
- **Deprecated features**: Features being removed in future versions.
80+
- **Migration guides**: Official upgrade instructions.
81+
- **Peer dependency changes**: New or changed peer dependency requirements.
82+
83+
### Document findings
84+
85+
For each major update, record:
86+
87+
- Package name and version change (e.g., `foo: 2.x β†’ 3.x`)
88+
- Breaking changes summary
89+
- Whether our code is affected (and how)
90+
91+
## Step 4: Check affected code
92+
93+
For each dependency with breaking changes identified in Step 3:
94+
95+
1. Use `Grep` to find all imports and usages of the affected package across the relevant project (frontend or backend).
96+
2. Read the files containing usages.
97+
3. Compare the usage against the breaking change description.
98+
4. If our code uses an affected API:
99+
- Attempt to fix the code following the migration guide.
100+
- If the fix is complex or risky, **skip updating this dependency** and note it in the summary.
101+
5. If our code does NOT use any affected API, proceed with the update.
102+
103+
## Step 5: Run tests and checks
104+
105+
After all updates are applied:
106+
107+
### Frontend
108+
109+
Run these commands sequentially in the repo root and capture results:
110+
111+
```bash
112+
pnpm install
113+
pnpm typecheck
114+
pnpm test
115+
pnpm lint
116+
```
117+
118+
### Backend
119+
120+
Run these commands sequentially in `BACKEND_DIR` and capture results:
121+
122+
```bash
123+
pnpm install
124+
pnpm typecheck
125+
pnpm test
126+
pnpm lint
127+
```
128+
129+
### Handle failures
130+
131+
- **TypeScript errors**: Read the error output, identify which updated dependency caused the issue, and fix the type errors. If unfixable, revert that specific dependency update.
132+
- **Test failures**: Analyze the failure, check if it's related to a dependency update, and fix or revert.
133+
- **Lint errors**: Run `pnpm lint:fix` first. If issues persist, fix manually or revert the causing update.
134+
135+
Repeat the test cycle until all checks pass.
136+
137+
## Step 6: Summary
138+
139+
Present the user with a comprehensive summary:
140+
141+
### Update report
142+
143+
```
144+
## Dependencies Updated
145+
146+
### Frontend
147+
- <package>: <old-version> β†’ <new-version> (patch/minor/major)
148+
- ...
149+
150+
### Backend
151+
- <package>: <old-version> β†’ <new-version> (patch/minor/major)
152+
- ...
153+
154+
## Skipped Updates (with reasons)
155+
- <package>: <reason why not updated>
156+
- ...
157+
158+
## Key Changelog Highlights
159+
160+
### Breaking Changes Applied
161+
- <package> <version>: <what changed and how we adapted>
162+
163+
### Notable New Features
164+
- <package> <version>: <brief description>
165+
166+
### Deprecation Warnings
167+
- <package> <version>: <what's deprecated and timeline>
168+
169+
## Test Results
170+
- Frontend typecheck: βœ…/❌
171+
- Frontend tests: βœ…/❌
172+
- Frontend lint: βœ…/❌
173+
- Backend typecheck: βœ…/❌
174+
- Backend tests: βœ…/❌
175+
- Backend lint: βœ…/❌
176+
```
177+
178+
Ask the user if they want to commit the changes.

0 commit comments

Comments
Β (0)