Cosmetic fix: Sync web title with nightly server branding#3219
Conversation
Co-authored-by: Codex <codex@openai.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
ApprovabilityVerdict: Approved This PR extracts existing nightly-detection logic into a shared module and adds a component to dynamically update the browser tab title based on server version. The change is purely cosmetic (affects only the document title), includes comprehensive tests, and refactors code the author recently wrote. You can customize Macroscope's approvability policy. Learn more. |
Summary
Why
PR #3103 fixed the sidebar badge, but the browser tab title still used the static app display name initialized before primary server config arrives.
Impact
Nightly web sessions show
T3 Code (Nightly)in the browser tab after the primary server config is available. Stable and malformed versions keep the existing fallback title.Validation
vp test run apps/web/src/components/Sidebar.logic.test.ts apps/web/src/branding.test.tsvp checkvp run typecheckvp checkreports the repository's existing unrelated warnings and no errors.Note
Low Risk
Cosmetic branding only; no auth, data, or routing behavior changes beyond when the tab title updates.
Overview
Browser tab title now updates when primary server config loads, using the same nightly-version rules as the sidebar stage badge.
Shared helpers in
branding.logic.ts(resolveServerBackedAppStageLabel,resolveServerBackedAppDisplayName) centralize the-nightly.YYYYMMDD.Ncheck. The sidebar badge delegates to that module instead of duplicating the regex. Staticdocument.titleassignment inmain.tsxis removed;DocumentTitleSyncin the root route setsdocument.titlefromprimaryServerConfigAtom, falling back to existing desktop, hosted-channel, and dev/alpha branding when the server is stable or the version string is malformed.Reviewed by Cursor Bugbot for commit 8da10df. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Sync web document title with nightly server branding reactively
DocumentTitleSyncin__root.tsxto updatedocument.titlereactively on all route paths, replacing the one-time set inmain.tsx.resolveServerBackedAppDisplayNameandresolveServerBackedAppStageLabelinbranding.logic.tsto detect nightly server versions via a version pattern and produce a matching display name (e.g.App (Nightly)).branding.logic.ts, removing the duplicate fromSidebar.logic.ts.Macroscope summarized 8da10df.