Skip to content

Commit a46b8be

Browse files
authored
Merge pull request #4915 from RSSNext/release/mobile/0.4.0
release(mobile): Release v0.4.0
2 parents d47ed33 + 278388c commit a46b8be

File tree

513 files changed

+34962
-5897
lines changed

Some content is hidden

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

513 files changed

+34962
-5897
lines changed

.agents/settings.local.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(gh pr view:*)",
5+
"Bash(pnpm bump:*)",
6+
"Bash(git add:*)",
7+
"Bash(git commit:*)",
8+
"Bash(ls:*)",
9+
"Bash(npx:*)",
10+
"Bash(git stash:*)",
11+
"Bash(git show:*)",
12+
"Bash(git -C /Users/diygod/Code/Projects/Folo status --short)",
13+
"Bash(git -C /Users/diygod/Code/Projects/Folo add apps/mobile/changelog/next.md)",
14+
"Bash(git -C /Users/diygod/Code/Projects/Folo commit:*)",
15+
"Bash(git checkout:*)",
16+
"Bash(git fetch:*)",
17+
"Bash(git merge:*)",
18+
"Bash(git rm:*)",
19+
"Bash(git push:*)",
20+
"Bash(gh api:*)",
21+
"Bash(pnpm exec vv:*)"
22+
]
23+
}
24+
}
Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,21 @@ Perform a regular desktop release. This skill handles the full release workflow
6060

6161
5. Keep `NEXT_VERSION` as the placeholder - it will be replaced by `apply-changelog.ts` during bump.
6262

63-
## Step 3: Evaluate mainHash
63+
## Step 3: Commit changelog updates before bump
64+
65+
`nbump` requires a clean working tree. Commit changelog edits before running bump.
66+
67+
1. Stage the changelog update:
68+
```bash
69+
git add apps/desktop/changelog/next.md
70+
```
71+
2. Commit it on `dev`:
72+
```bash
73+
git commit -m "docs(desktop): prepare release changelog"
74+
```
75+
3. If there are no changes to commit, continue without creating an extra commit.
76+
77+
## Step 4: Evaluate mainHash
6478

6579
This is critical for determining whether users need a full app update or can use the lightweight renderer hot update.
6680

@@ -86,14 +100,18 @@ Present your analysis to the user with:
86100
- Your recommendation (update or skip mainHash)
87101
- Ask for explicit confirmation
88102

89-
## Step 4: Save old mainHash and execute bump
103+
## Step 5: Save old mainHash and execute bump
90104

91105
1. Save the current mainHash from `apps/desktop/package.json` for later comparison.
92-
2. Change directory to `apps/desktop/` and run the bump:
106+
2. Verify working tree is clean before bump:
107+
```bash
108+
git status --short
109+
```
110+
3. Change directory to `apps/desktop/` and run the bump:
93111
```bash
94112
cd apps/desktop && pnpm bump
95113
```
96-
3. This command will:
114+
4. This command will:
97115
- Pull latest changes
98116
- Apply changelog (rename next.md to {version}.md, create new next.md)
99117
- Recalculate mainHash and write to package.json
@@ -103,11 +121,11 @@ Present your analysis to the user with:
103121
- Create branch `release/desktop/{NEW_VERSION}`
104122
- Push branch and create PR to `main`
105123

106-
## Step 5: Restore mainHash if skipping update
124+
## Step 6: Restore mainHash if skipping update
107125

108-
If Step 3 decided mainHash should NOT be updated, restore the old value now. The bump has already committed, pushed, and created the PR on a new release branch, so we amend the commit and force push. This is safe because the release branch was just created.
126+
If Step 4 decided mainHash should NOT be updated, restore the old value now. The bump has already committed, pushed, and created the PR on a new release branch, so we amend the commit and force push. This is safe because the release branch was just created.
109127

110-
1. Change back to the repo root first (Step 4 left the working directory at `apps/desktop/`):
128+
1. Change back to the repo root first (Step 5 left the working directory at `apps/desktop/`):
111129
```bash
112130
cd ../..
113131
```
@@ -122,9 +140,9 @@ If Step 3 decided mainHash should NOT be updated, restore the old value now. The
122140
git push --force origin release/desktop/{NEW_VERSION}
123141
```
124142

125-
If Step 3 decided mainHash SHOULD be updated, skip this step entirely — the bump already wrote the correct new value.
143+
If Step 4 decided mainHash SHOULD be updated, skip this step entirely — the bump already wrote the correct new value.
126144

127-
## Step 6: Verify
145+
## Step 7: Verify
128146

129147
1. Confirm the PR was created successfully by checking the output.
130148
2. Report the new version number and PR URL to the user.

.claude/skills/installing-mobile-preview-builds/SKILL.md renamed to .agents/skills/installing-mobile-preview-builds/SKILL.md

File renamed without changes.

.agents/skills/mobile-e2e/SKILL.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
---
2+
name: mobile-e2e
3+
description: Run apps/mobile Maestro end-to-end tests in this repo. Use when an agent needs to validate mobile auth flows on iOS Simulator or Android Emulator. Current maintained coverage is register, sign out, and sign in.
4+
disable-model-invocation: true
5+
allowed-tools: Bash, Read, Write, Edit, Glob, Grep
6+
---
7+
8+
# Mobile E2E
9+
10+
Run the mobile Maestro tests for `apps/mobile`.
11+
12+
## Files that matter
13+
14+
- Runner: `apps/mobile/e2e/run-maestro.sh`
15+
- iOS auth flow: `apps/mobile/e2e/flows/ios/auth.yaml`
16+
- Android auth flow: `apps/mobile/e2e/flows/android/core.yaml`
17+
- Shared auth flows: `apps/mobile/e2e/flows/shared/*.yaml`
18+
- Artifacts: `apps/mobile/e2e/artifacts/`
19+
20+
## Always do first
21+
22+
From repo root:
23+
24+
```bash
25+
cd apps/mobile
26+
pnpm run e2e:doctor
27+
pnpm run typecheck
28+
```
29+
30+
## iOS
31+
32+
Use a simulator `.app` build, not an Expo development client.
33+
34+
### Preferred simulator
35+
36+
Prefer the **latest installed iOS runtime** and a **latest-generation iPhone simulator**.
37+
38+
When multiple simulators are available, bias toward the newest iPhone model on the newest installed iOS version.
39+
40+
### Boot simulator
41+
42+
```bash
43+
xcrun simctl boot <IOS_UDID>
44+
xcrun simctl bootstatus <IOS_UDID> -b
45+
open -a Simulator --args -CurrentDeviceUDID <IOS_UDID>
46+
```
47+
48+
### App bundle
49+
50+
`run-maestro.sh` can resolve the app bundle from one of these sources:
51+
52+
- `MAESTRO_IOS_APP_PATH`
53+
- a local `build-*.tar.gz` in `apps/mobile`
54+
- an existing `DerivedData/.../Release-iphonesimulator/Folo.app`
55+
56+
If none of those exist, build one first.
57+
58+
### Build simulator app when missing
59+
60+
If `Folo.app` is not available yet:
61+
62+
```bash
63+
cd apps/mobile/ios
64+
pod install
65+
xcodebuild -workspace Folo.xcworkspace \
66+
-scheme Folo \
67+
-configuration Release \
68+
-sdk iphonesimulator \
69+
-destination 'id=<IOS_UDID>' \
70+
build
71+
```
72+
73+
### Apple Silicon simulator optimization
74+
75+
When running on an Apple Silicon Mac and building only for the simulator used in the current run, prefer compiling only the active `arm64` simulator architecture:
76+
77+
```bash
78+
xcodebuild ... \
79+
ONLY_ACTIVE_ARCH=YES \
80+
ARCHS=arm64
81+
```
82+
83+
Use this optimization only for local self-test / e2e simulator builds tied to the current machine. Do not use it when you need a universal simulator app for other machines or when running on Intel Macs.
84+
85+
Expected output pattern:
86+
87+
```bash
88+
~/Library/Developer/Xcode/DerivedData/.../Build/Products/Release-iphonesimulator/Folo.app
89+
```
90+
91+
### Run iOS auth flow
92+
93+
```bash
94+
cd apps/mobile
95+
MAESTRO_IOS_DEVICE_ID=<IOS_UDID> \
96+
MAESTRO_IOS_APP_PATH=<PATH_TO_Folo.app> \
97+
pnpm run e2e:ios
98+
```
99+
100+
## Android
101+
102+
Use a **release APK**, not an Expo development build.
103+
104+
### Java
105+
106+
Use Android Studio bundled JBR:
107+
108+
```bash
109+
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
110+
export PATH="$JAVA_HOME/bin:$PATH"
111+
```
112+
113+
### Android SDK
114+
115+
```bash
116+
export ANDROID_HOME="$HOME/Library/Android/sdk"
117+
export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
118+
```
119+
120+
If `apps/mobile/android/local.properties` is missing, create it with:
121+
122+
```bash
123+
echo "sdk.dir=$HOME/Library/Android/sdk" > apps/mobile/android/local.properties
124+
```
125+
126+
### Build release APK
127+
128+
If `apps/mobile/android` does not exist locally, generate it first with Expo prebuild / run-android tooling.
129+
130+
Then build the release APK:
131+
132+
```bash
133+
cd apps/mobile/android
134+
./gradlew app:assembleRelease --console=plain
135+
```
136+
137+
Expected APK path:
138+
139+
```bash
140+
apps/mobile/android/app/build/outputs/apk/release/app-release.apk
141+
```
142+
143+
### Install to emulator
144+
145+
```bash
146+
adb -s emulator-5554 install -r apps/mobile/android/app/build/outputs/apk/release/app-release.apk
147+
```
148+
149+
### Run Android auth flow
150+
151+
Start a booted emulator first, then:
152+
153+
```bash
154+
cd apps/mobile
155+
pnpm run e2e:android
156+
```
157+
158+
## Result checks
159+
160+
Successful auth validation means:
161+
162+
- register flow finishes
163+
- sign-out reaches `login-screen`
164+
- login flow makes `login-screen` disappear
165+
166+
## Debugging output
167+
168+
Inspect these folders after a run:
169+
170+
```bash
171+
apps/mobile/e2e/artifacts/ios/
172+
apps/mobile/e2e/artifacts/android/
173+
```
174+
175+
For a one-off focused run, invoke Maestro directly against a single flow and a custom debug directory.
Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,31 @@ Perform a regular mobile release. This skill handles the full release workflow f
6464

6565
5. Keep `NEXT_VERSION` as the placeholder - it will be replaced by `apply-changelog.ts` during bump.
6666

67-
## Step 3: Execute bump
67+
## Step 3: Commit changelog updates before bump
6868

69-
1. Change directory to `apps/mobile/` and run the bump:
69+
`nbump` requires a clean working tree. Commit changelog edits before running bump.
70+
71+
1. Stage the changelog update:
72+
```bash
73+
git add apps/mobile/changelog/next.md
74+
```
75+
2. Commit it on `dev`:
76+
```bash
77+
git commit -m "docs(mobile): prepare release changelog"
78+
```
79+
3. If there are no changes to commit, continue without creating an extra commit.
80+
81+
## Step 4: Execute bump
82+
83+
1. Verify working tree is clean before bump:
84+
```bash
85+
git status --short
86+
```
87+
2. Change directory to `apps/mobile/` and run the bump:
7088
```bash
7189
cd apps/mobile && pnpm bump
7290
```
73-
2. This is an interactive `nbump` command that prompts for version selection. It will:
91+
3. This is an interactive `nbump` command that prompts for version selection. It will:
7492
- Pull latest changes
7593
- Apply changelog (rename next.md to {version}.md, create new next.md from template)
7694
- Format package.json with eslint + prettier
@@ -82,7 +100,7 @@ Perform a regular mobile release. This skill handles the full release workflow f
82100
- Create branch `release/mobile/{NEW_VERSION}`
83101
- Push branch and create PR to `mobile-main`
84102

85-
## Step 4: Verify
103+
## Step 5: Verify
86104

87105
1. Confirm the PR was created successfully by checking the output.
88106
2. Report the new version number and PR URL to the user.

0 commit comments

Comments
 (0)