feat(webpanel): compare running artifact against recommended build - #86
Merged
Maximus7474 merged 1 commit intoSep 16, 2026
Merged
Conversation
The server status card showed the running artifact and the recommended one as two plain rows, leaving the reader to diff the build numbers by eye and repeating the same number when they matched. Both builds now go through a compareArtifactBuilds helper and the card renders a single status strip: a primary accent linking out when the server is behind, and a muted note when it matches or runs ahead. The accent stays reserved for the one state that asks the admin to act, and the card keeps a single green in the server status badge. The separate recommended row is gone, so a build number only ever appears when it adds something. Comparison is numeric rather than lexicographic, and anything that is not a build number yields "unknown" so a failed lookup or an unreadable convar leaves the strip off instead of guessing.
Maximus7474
approved these changes
Sep 16, 2026
Member
|
Thank you for the contribution, this does properly address the described issue. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #85
The server status card showed the running artifact and the recommended one as
two plain rows, leaving the reader to diff two five-digit build numbers by eye,
and printing the same number twice whenever they matched.
Both builds now go through a
compareArtifactBuildshelper, and the card rendersa single status strip in place of the second row:
⬆ b35945 recommended, primary accent, links to the artifact source✓ Up to date, mutedⓘ Ahead of b35945, mutedThe primary accent is reserved for the one state that asks the admin to act, so
the sidebar stays quiet when nothing needs doing and the card keeps a single
green in the
Status: runningbadge. Dropping the separate "Recommended" rowremoves the duplicate number.
How it's put together
lib/artifact-version.ts-compareArtifactBuilds(current, recommended)returning
'outdated' | 'current' | 'ahead' | 'unknown'. Pure, with unittests, following the same extract-the-logic pattern as
perf-seriesandsession-expiry.static/artifact-state.tsx- per-state icon, tone and wording, following theSTATUS_VARIANTprecedent instatic/server-state.ts. Typed asRecord<Exclude<ArtifactStatus, 'unknown'>, …>so adding a state to the unionfails to compile until the map is updated.
components/sidebar/server-status.tsx- picks the entry and renders one strip.Comparison is numeric rather than lexicographic (
"9999"sorts after"13068"as a string), and both sides are validated against the same 4-8 digit shape
parseFxServerBuildproduces. Anything else yields'unknown'and renders nostrip, so a failed jgscripts lookup or an unreadable convar never produces a
confident wrong answer.
No new dependencies, no API changes, no migrations.
Generative AI Disclosure
have and the design calls along the way are mine. Claude did the work of
fitting that into this codebase - writing the comparison helper and its unit
tests, the presentation map, the JSX changes, and this description, and
matching the existing conventions while doing it.
Tests
Additional Notes
On the testing boxes, precisely:
against a real server rather than via
bun dev. Both the outdated andup-to-date strips were confirmed rendering in the real sidebar.
bun run typecheckpasses across all 6 packages;bun run testpasses(73 files).
bun run build --target=linux), but I have noLinux host to run it on, so I've left that box unchecked rather than claim it.
The change is webpanel-only and platform-independent, so I'd be surprised by a
difference, but I haven't verified it.
Unrelated observation, not addressed here:
useRecommendedArtifactfetchesonce per mount with
[]deps, and the sidebar sits inAppLayout, whichreact-router keeps mounted across navigation. The recommended build therefore
only refreshes on a full page reload, which limits how much the 30-minute
server-side TTL matters for a long-lived tab. Happy to open a separate issue if
that's worth changing.
On this write-up: drafted and tidied up with Claude, so the reasoning and
trade-offs are all laid out in one place.