Skip to content

Show a build id in Settings on the Web Client and the mobile app - #1922

Closed
DoodleBears wants to merge 2 commits into
mainfrom
claude/project-thread-6adldg
Closed

DoodleBears wants to merge 2 commits into
mainfrom
claude/project-thread-6adldg

Conversation

@DoodleBears

Copy link
Copy Markdown
Contributor

Requested by Vain

Why the change

During device QA 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 + build time) in Settings / 测试时看不出手机和网页端装的是哪一版,现在两端设置里都会显示构建号(git 短 SHA + 构建时间)。

Issue / Discussion: requested by the owner in the device-QA thread.

Special things to note

  • Merge risk: low. Display-only; no route, bridge method or Bot tool (CLI parity n/a). Only the Web Client bundle (packages/client/lib, not committed) is stamped; the committed Browser/Computer bundles are untouched, so the verify workflow's git diff --exit-code on them is unaffected. Mobile adds apps/mobile/app.config.ts, which only extends app.json with extra.build; reverting it falls back to "dev".
  • How the id is set: Web — tsdown.config.ts buildStamp() runs git rev-parse --short=9 HEAD at bundle time. Mobile — Expo evaluates app.config.ts when Metro starts and in the Release build's "Generate app.config" phase. BOTHARNESS_BUILD_SHA / BOTHARNESS_BUILD_TIME override git (e.g. CI); without git it shows dev.
  • Verification: pnpm typecheck (root + mobile) clean; oxlint on the changed files clean; vitest apps/mobile/test + packages/client/test: 278 files, 2124 tests passed (new: apps/mobile/test/build-id.test.ts, packages/client/test/build-id.test.ts, a Settings-sheet About/Build case). Visual evidence follows in a comment from the Simulator and the QA Host Web Client.
  • CI test plan: affected (client + mobile tests); no new config file type or test directory.

Change outline

  • Web Client: Settings → About gains a Build row: d9bbfbdfe · 2026-10-15 18:30 (local time) or dev.
  • Mobile: Settings sheet gains an About section with a Build row with the same format. SettingsView takes a build prop (default dev); the Settings route reads it from expo-constants.

🤖 Generated with Claude Code

… mobile

The Web Client bundle gets the stamp from tsdown.config.ts and shows it as a
Build row under Settings → About. The mobile app gets it from a new
app.config.ts (extra.build), so Metro and the Release build's Generate
app.config phase both stamp it, and the Settings sheet shows it under About.
Both fall back to dev; BOTHARNESS_BUILD_SHA/TIME override git.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@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 46 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: bf415d3d-b066-4153-9ae5-a91129764629
📥 Commits

Reviewing files that changed from the base of the PR and between 10e1c56 and 86fc5a9.

📒 Files selected for processing: 15
  • apps/mobile/app.config.ts
  • apps/mobile/app/settings.tsx
  • apps/mobile/src/host/build-id.ts
  • apps/mobile/src/ui/settings-view.tsx
  • apps/mobile/src/ui/strings.ts
  • apps/mobile/test/build-id.test.ts
  • apps/mobile/test/settings-sheet.test.tsx
  • changes/1922-build-id-in-settings.md
  • docs/agents/development-scripts.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
  • scripts/ci-plan.mjs
  • 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.

@DoodleBears DoodleBears self-assigned this Oct 15, 2026
… drop code comments

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor Author

Superseded by #1923. Its web half (build-id.ts, the About → Build row, the locale key, tsdown buildStamp and the test) was ported there unchanged. Mobile uses #1923's Metro env approach instead of app.config.ts extra, which would change the Expo native fingerprint on every build. Closing this one.


Generated by Claude Code

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.

1 participant