Skip to content

feat: show a build id in Settings → About on the Web Client and the mobile app - #1923

Merged
DoodleBears merged 9 commits into
mainfrom
claude/project-thread-b5m1m8
Oct 15, 2026
Merged

DoodleBears merged 9 commits into
mainfrom
claude/project-thread-b5m1m8

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Vain · project thread

Why the change

During testing nobody could tell which build was installed on the phone or served by the Web Client. Both now show a build id (short git SHA + local build time) in Settings → About / 测试时看不出手机和网页端是哪一版,现在两端「设置 → 关于」都显示构建号。

Supersedes #1922: its Web Client half is ported here unchanged; the mobile half uses Metro instead of app.config.ts (see below).

Special things to note

  • Merge risk: low, display-only, no route, bridge method or Bot tool (CLI parity n/a). No native change: installed dev builds keep working.
  • Web Client: tsdown.config.ts buildStamp() stamps __BOTHARNESS_BUILD__ (git rev-parse --short=9 HEAD + build time, BOTHARNESS_BUILD_SHA / BOTHARNESS_BUILD_TIME override) into the client bundle only; About gets a Build row, e.g. 555fe34f0 · 2026-10-15 18:26.
  • Mobile: metro.config.js sets EXPO_PUBLIC_BUILD_COMMIT (9-char SHA, -dirty if tracked files had changes; BOTHARNESS_BUILD_SHA or EAS_BUILD_GIT_COMMIT_HASH when there is no git), EXPO_PUBLIC_BUILD_TIME and EXPO_PUBLIC_BUILD_BRANCH when Metro starts, unless already set. About → Version shows 0.0.1 · f63284a94 · 2026-10-15 18:27 · <branch>; tapping copies it.
    • Why not app.config.ts extra.build (Show a build id in Settings on the Web Client and the mobile app #1922): @expo/fingerprint hashes expoConfig.extra by default, so a per-run SHA/time there changes the native fingerprint every run and scripts/e2e-mobile-sim.mjs would rebuild the native app each time.
    • Production bundles inline EXPO_PUBLIC_* into Metro's transform cache, so with NODE_ENV=production the stamp also goes into config.cacheVersion (a second local expo export otherwise kept the old commit). Dev reads them at serialize time and keeps its cache.
  • Verification:
    • pnpm lint, pnpm typecheck (root + mobile), pnpm vitest run apps/mobile and packages/client/test/build-id.test.ts pass.
    • pnpm build: packages/client/lib/client.js carries { sha: "555fe34f0", time: "2026-10-15T18:26:26Z" }.
    • Mobile web export on two commits: bundle carries the current commit each time.
    • Not run here: native Simulator and QA Host Web Client screenshots, queued with the shared device QA session.
  • CI test plan: affected (client + mobile).

Change outline

Mobile Settings: 390 × 844, unpaired web render

Before: no version anywhere.

Before: Settings light

Before: Settings dark

After: About → Version shows version, commit, build time and branch.

After: Settings light

After: Settings dark

Web Client Settings → About

Screenshots follow in a comment from the QA Host run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips

Metro inlines the bundling commit and branch as EXPO_PUBLIC_BUILD_*, so a
test build can be told apart on the phone. Tapping the row copies it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 25 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a0823e32-e896-4e0c-ad6b-f5f0e39dd41c
📥 Commits

Reviewing files that changed from the base of the PR and between 8eee46a and 0d253c6.

⛔ Files ignored due to path filters: 4
  • .github/pr-screenshots/mobile-app-version/after-dark.png is excluded by !**/*.png
  • .github/pr-screenshots/mobile-app-version/after-light.png is excluded by !**/*.png
  • .github/pr-screenshots/mobile-app-version/before-dark.png is excluded by !**/*.png
  • .github/pr-screenshots/mobile-app-version/before-light.png is excluded by !**/*.png
📒 Files selected for processing: 14
  • apps/mobile/app/settings.tsx
  • apps/mobile/metro.config.js
  • apps/mobile/src/ui/app-build.ts
  • apps/mobile/src/ui/native-app-build.ts
  • apps/mobile/src/ui/settings-view.tsx
  • apps/mobile/src/ui/strings.ts
  • apps/mobile/test/settings-sheet.test.tsx
  • apps/mobile/test/usage-screen.test.tsx
  • changes/1923-mobile-app-version.md
  • packages/client/src/client/bot-settings-sections.tsx
  • packages/client/src/client/build-id.ts
  • packages/client/src/client/locale.ts
  • packages/client/test/build-id.test.ts
  • tsdown.config.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
@DoodleBears DoodleBears self-assigned this Oct 15, 2026
Ported from claude/project-thread-6adldg so web and mobile ship in one PR.
Mobile now also shows the build time next to the commit.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RESQX8EVBt9d4fGKdV4ips
@DoodleBears DoodleBears changed the title feat(mobile): show app version and build commit in Settings → About feat: show a build id in Settings → About on the Web Client and the mobile app Oct 15, 2026
@DoodleBears
DoodleBears marked this pull request as ready for review October 15, 2026 18:42
@DoodleBears
DoodleBears merged commit 389a141 into main Oct 15, 2026
11 checks passed
DoodleBears added a commit that referenced this pull request Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@DoodleBears

Copy link
Copy Markdown
Contributor Author

Batch QA — head 555fe34 on qa/batch-4 6b11c934a

(main 8eee46a + #1917 + #1884 + #1846 + #1918 + #1923). Screenshots redacted (host name / tailnet URL hidden).

Check Result
Web Client (QA Host rebuilt + restarted on the batch): Settings → About → 构建 / Build shows 6b11c934a · 2026-10-16 03:33 (light + dark) ✅ pass
iOS Simulator "PR1800 glass" (iOS 26.0), Metro on the batch: Settings → About → Version shows 0.0.1 · 6b11c934a · 2026-10-16 03:36 · qa/batch-4 (light + dark) ✅ pass
Tap Version → "Copied", clipboard holds the full string ✅ pass
-dirty suffix ✅ appears when the worktree has uncommitted tracked edits (seen as 6b11c934a-dirty before I cleaned the worktree), absent on a clean tree
Release build stamp by reading: Xcode's "Bundle React Native code and images" phase runs Metro from apps/mobile, where metro.config.js runs git and sets EXPO_PUBLIC_BUILD_*; the production Metro cache is keyed on the commit (ed0b279). To be confirmed on the next iPhone Release build.
Android untested

Checks on the batch: root + mobile typecheck clean; mobile + client vitest 277 files / 2135 tests passed. pnpm lint passes except for local-only noise in the QA worktree (an untracked stray ADR file and untracked promo/ images that aren't part of the batch).

Web Build light Web Build dark

Mobile Version light Mobile Version dark Copied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants