[codex] fix: show nightly badge from primary web server version#3103
[codex] fix: show nightly badge from primary web server version#3103StiensWout wants to merge 1 commit into
Conversation
|
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 Simple UI label change that conditionally displays "Nightly" badge based on server version. The change is well-tested, self-contained, and only affects display text in the sidebar header. You can customize Macroscope's approvability policy. Learn more. |
fb24928 to
57dcdc3
Compare
Dismissing prior approval to re-evaluate 3d0ba28
Co-authored-by: codex <codex@users.noreply.github.com>
3e731fb to
4a76316
Compare
Summary
useServerConfig().Nightlyfor primary server versions matching the nightly release pattern, while preserving the existing fallback label for stable/dev builds.Root cause
The sidebar rendered the static client-side
APP_STAGE_LABEL, so a web UI served by a nightly primary server could still display the stable fallback labelAlpha.Impact
The top-left web sidebar badge now reflects the primary T3 server that served the web UI. It does not follow selected or connected remote environments.
UI Changes
Before
After
Validation
PATH="$HOME/.vite-plus/bin:$PATH" vp test run apps/web/src/components/Sidebar.logic.test.tsPATH="$HOME/.vite-plus/bin:$PATH" vp checkPATH="$HOME/.vite-plus/bin:$PATH" vp run typecheckvp checkreports the repository's existingreact(no-unstable-nested-components)warnings and no errors.Closes #3102
Note
Show 'Nightly' badge in sidebar when primary server version is a nightly build
Adds
resolveSidebarStageBadgeLabelin Sidebar.logic.ts that returns'Nightly'when the primary server version matches the pattern-nightly.<8 digits>.<digits>, otherwise falls back toAPP_STAGE_LABEL. TheSidebarChromeHeadercomponent now readsprimaryServerConfigAtomto compute this label and displays it in the wordmark badge.Macroscope summarized 4a76316.
Note
Low Risk
Small, isolated UI labeling change in the sidebar header with no auth, data, or API behavior changes.
Overview
Fixes the web sidebar wordmark badge showing a static client
APP_STAGE_LABEL(e.g. Alpha) even when the UI is served by a nightly primary server.Adds
resolveSidebarStageBadgeLabelinSidebar.logic.ts, which returns Nightly whenprimaryServerVersionmatches-nightly.<8 digits>.<digits>at the end of the string; stable, missing, or malformed versions still use the fallback label.SidebarChromeHeaderreadsprimaryServerConfigAtom→environment.serverVersionand renders that label instead of always usingAPP_STAGE_LABEL.Unit tests cover nightly, stable, null, and malformed nightly strings.
Reviewed by Cursor Bugbot for commit 4a76316. Bugbot is set up for automated code reviews on this repo. Configure here.