Repository navigation
feat(console): restyle the node console to the new design - #344
Merged
Merged
Conversation
Signed-off-by: Bugs5382 <Bugs5382@users.noreply.github.com>
Every console screen takes the design's character grid: the frame with the wordmark and tag, the mark, a 15-column label column centred as a 54-wide block, the design's wording and the 16-colour palette with bold as bright. The compact fallback is the 38x11 mini status. A wrong CN on the reset confirmation now says that nothing was erased before the console returns to the dashboard. Refs #343 Signed-off-by: Bugs5382 <Bugs5382@users.noreply.github.com>
Refs #343 Signed-off-by: Bugs5382 <Bugs5382@users.noreply.github.com>
Bugs5382
force-pushed
the
feat/343-console-visual
branch
from
October 7, 2026 05:50
e0d6dcb to
ded8c75
Compare
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
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.
What and why
Restyles the node's text console (
internal/console) to the Node Console design: the frame with the wordmark and a coloured tag, the new ASCII mark, one 15-column label column centred as a 54-wide block, the design's wording, and the 16-colour palette with bold as bright. It covers boot and a failed boot step, maintenance, awaiting ceremony, awaiting parent certificate, ceremony in progress, the serving dashboard for Root, Intermediate and Issuing at 80x25 and 64x24, degraded, the reset confirmation, a new mismatch screen and resetting, plus the 38x11 compact view. The renderer stays hand-rolled ANSI with no new dependency.It also fixes the footer, which printed
vv0.1.0:version()added a "v" to a git-describe version that already has one.Closes #343
Behaviour beyond layout:
RenderResetConfirmandRenderResettingtake it, and the boot banner printsCryptOS PKI <version>....at the console edge instead of wrapping past it; a long CN on the reset confirmation is split over rows instead of being clipped, because the operator has to retype it.v?in the footer, matching every other screen.Screens that need state the node does not report yet (Root Mode, upgrade in progress, a framed post-boot failure, safe to power off, live boot and ceremony step progress, the key tier, the retry count) are left for later.
Verification
How this was verified
mainafter the TSA work (feat(tsa): issue and rotate the TSA certificate and key #351 to fix(tsa): keep stamping through a grace window after the last good sync #357); no conflict.gofmt -l,go vet ./...,golangci-lint run ./...andgo test ./...all clean locally.TestScreensMatchTheDesigncompares 35 golden frames ininternal/console/testdata/screens/(text, and a per-character colour mask) for every state at 80x25 and 64x24, the boot stream, and the compact views. The framed goldens are the design's own grids.TestFramedScreensFillTheConsolechecks every screen fills 80x25, 64x24, 100x37 and 40x12 exactly.TestLongValuesWrapInTheValueColumnchecks a long CN wraps.TestFooterVersionpins the footer tov0.1.0.TestMismatchSaysNothingWasErasedThenReturnscovers the mismatch screen in the console loop.TestEveryStateRendersAtTheGateSizes: every state at 80x24, 100x37 and 38x11 fills the console, names its state in text with colour stripped, showsv0.1.0once, and reads differently from every other state.TestBootStepsSayTheirStatepins the[ok]/[!!]markers and the banner version.TestCompactCANameStopsAtTheConsoleEdgeandTestResetShowsTheWholeCN: a long CA name is cut with...on the compact dashboard, and the reset screen splits the CN over rows instead of clipping it.TestWithVersionFillsAMissingVersion,TestRenderDegradedShowsTheVersion: the degraded screen showedv?; it now shows the console's build version.Existing tests changed on purpose, because the wording or layout they check changed:
TestBannerHasWordmark(nowTestBannerHasMarkAndVersion) andTestRendererBanner: the mark replaces the shield and the banner carries the version.TestRendererStep: step lines start at column 0.TestRenderResetConfirmContent: the new version argument and the typed sample text.TestRenderDashboardIssuer: the "Intermediate" label.TestRenderCompactShowsTheManagementFingerprint,TestRenderCompactMaintenanceShowsAddressAndFingerprint,TestRenderCompactAwaitingCeremonyShowsTheFingerprint,TestRenderCompactPendingIdentityScreens: the compact view labels the fingerprint "SHA" and the address "IP".screenCases' compact list gains four cases (awaiting parent, ceremony in progress, serving Intermediate, serving Issuing); none of the existing cases changed.The docs site pages that quote console output (boot-qemu, boot-maintenance, reboot-ceremony) will need a matching update.