Skip to content

[codex] fix: show nightly badge from primary web server version#3103

Open
StiensWout wants to merge 1 commit into
pingdotgg:mainfrom
StiensWout:fix/web-server-stage-badge
Open

[codex] fix: show nightly badge from primary web server version#3103
StiensWout wants to merge 1 commit into
pingdotgg:mainfrom
StiensWout:fix/web-server-stage-badge

Conversation

@StiensWout

@StiensWout StiensWout commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Derive the web sidebar stage badge from the primary server version exposed by useServerConfig().
  • Show Nightly for primary server versions matching the nightly release pattern, while preserving the existing fallback label for stable/dev builds.
  • Add focused coverage for nightly, stable, missing, and malformed server versions.

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 label Alpha.

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

image

After

image

Validation

  • PATH="$HOME/.vite-plus/bin:$PATH" vp test run apps/web/src/components/Sidebar.logic.test.ts
  • PATH="$HOME/.vite-plus/bin:$PATH" vp check
  • PATH="$HOME/.vite-plus/bin:$PATH" vp run typecheck

vp check reports the repository's existing react(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 resolveSidebarStageBadgeLabel in Sidebar.logic.ts that returns 'Nightly' when the primary server version matches the pattern -nightly.<8 digits>.<digits>, otherwise falls back to APP_STAGE_LABEL. The SidebarChromeHeader component now reads primaryServerConfigAtom to 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 resolveSidebarStageBadgeLabel in Sidebar.logic.ts, which returns Nightly when primaryServerVersion matches -nightly.<8 digits>.<digits> at the end of the string; stable, missing, or malformed versions still use the fallback label. SidebarChromeHeader reads primaryServerConfigAtomenvironment.serverVersion and renders that label instead of always using APP_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.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e79f4b3c-e8a9-410f-8785-b5a863420e4a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Jun 16, 2026
@StiensWout StiensWout marked this pull request as ready for review June 16, 2026 07:57
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jun 16, 2026
@macroscopeapp

macroscopeapp Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

@juliusmarminge juliusmarminge force-pushed the fix/web-server-stage-badge branch from fb24928 to 57dcdc3 Compare June 16, 2026 17:31
@macroscopeapp macroscopeapp Bot dismissed their stale review June 19, 2026 05:47

Dismissing prior approval to re-evaluate 3d0ba28

Co-authored-by: codex <codex@users.noreply.github.com>
@juliusmarminge juliusmarminge force-pushed the fix/web-server-stage-badge branch from 3e731fb to 4a76316 Compare June 19, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Web sidebar badge shows Alpha while primary server is Nightly

1 participant