feat(ui): bridge-console rehaul (Refs #100)#101
Conversation
Self-host Chakra Petch (display), Space Grotesk (body), and JetBrains Mono (numerics) via @fontsource. Rebuild global.css around layered surfaces, amber/green/cyan accents, shared motion tokens, and the new HUD/viewport/breadcrumb/console-button class set. All legacy class names preserved so existing screens render unchanged. Refs #100
- New components: Icon, HudStrip, Breadcrumb, SettingsModal - Rewrite TabBar with iconography + Fn hints (desktop only) - TopBar gains desktop HudStrip; mobile content wrapped for media query - RightRail adds news ticker + hold readout cards - App wraps active screen in viewport frame with corner brackets - Store gains UISettings slice (font scale / density / motion) persisted to localStorage independently of the game save Refs #100
- CHANGELOG.md: bridge-console rehaul + settings modal under Unreleased - scripts/ui-screenshots.mjs: Playwright capture across 3 viewports - .gitignore: allow screenshots/pr-*-attachments/** for PR-embed images - screenshots/pr-feat-sol-ui-rehaul-attachments/: 8 after + 4 before shots referenced from the PR description Refs #100
Eight after-screenshots and four before-screenshots captured by scripts/ui-screenshots.mjs at 375 / 960 / 1280 viewports. Referenced from the PR body so reviewers can compare without checking out. Refs #100
…s, starfield title - Layered panel/HUD surfaces with bezel highlights, drop shadows, and clip-path bevel cuts. - Twelve-segment status readouts replace full-width vessel bars (StatusBar.tsx). - Tab rail gains active-state amber bracket and animated scanline sweep. - Buttons get real :active press feedback (inset-shadow + reversed gradient). - Credits use U+00A4 glyph with three-digit-grouped tabular numerals. - Mobile pull-up status sheet (MobileSheet.tsx) restores hidden HUD content. - Topbar becomes 3-col grid with compact credits + ghost actions. - Title screen rebuilt: deterministic 110-star starfield (Starfield.tsx, seeded via createRng), perspective horizon grid, animated wordmark, arrow-clipped action stack, channel-coloured version chip + system status indicator. - New useSfx() hook stub for audio layer. - Fix screenshot script tab matcher (data-screen attribute, four viewports). - All new motion gated behind prefers-reduced-motion and [data-motion='reduce']. Refs #100
There was a problem hiding this comment.
Pull request overview
Draft UI overhaul aligning the app with the “bridge console” identity from #100: new desktop HUD/rails, refreshed title screen, new settings persistence, and several UX affordances (breadcrumb + mobile status sheet + market steppers).
Changes:
- Introduces bridge-console layout components (HudStrip, RightRail refresh, TabBar icon rail, Breadcrumb, MobileSheet) and title-screen rebuild (Starfield + new actions).
- Adds UI-only settings persisted separately from saves (
stellar-reach-settings-v1) and applied via<html>dataset/CSS variables. - Improves trade-flow UX (market quantity stepper w/ hold-to-repeat; helm destination details modal).
Reviewed changes
Copilot reviewed 22 out of 54 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ui/screens/TitleScreen.tsx | Rebuilt title screen (Starfield, actions, settings + changelog modals, Electron-only Quit). |
| src/ui/screens/MarketScreen.tsx | Adds hold-to-repeat quantity controls and a compact trade status summary. |
| src/ui/screens/HelmScreen.tsx | Refactors helm layout and adds destination detail modal with route options + close handling. |
| src/ui/hooks/useSfx.ts | Adds stable no-op SFX hook stub for future audio pass. |
| src/ui/components/TopBar.tsx | Mobile topbar redesign; integrates HudStrip on desktop; adds compact credit formatting. |
| src/ui/components/TabBar.tsx | Console-button styling, icons, F-key hints, data-screen attribute, and SFX on tab change. |
| src/ui/components/StatusBar.tsx | Adds segmented status readout component for hull/fuel/cargo. |
| src/ui/components/Starfield.tsx | Adds deterministic, seeded title starfield (no Math.random). |
| src/ui/components/SettingsModal.tsx | Adds settings modal UI (font scale, density, motion) wired to store. |
| src/ui/components/RightRail.tsx | Refactors desktop right rail to callsign/hold/news panels. |
| src/ui/components/PanelHeader.tsx | Extends status variants and adds status dot/text rendering. |
| src/ui/components/MobileSheet.tsx | Adds mobile pull-up status sheet for callsign/vitals/hold/news. |
| src/ui/components/Icon.tsx | Adds inline SVG icon set for tabs and HUD actions. |
| src/ui/components/HudStrip.tsx | Adds desktop HUD strip with credits/net worth and segmented vessel meters. |
| src/ui/components/Breadcrumb.tsx | Adds breadcrumb/context strip for all screens. |
| src/ui/App.tsx | Integrates new layout pieces, breadcrumb framing, mobile sheet, and settings application to <html>. |
| src/state/store.ts | Adds persisted UI settings + setters alongside existing game store. |
| src/main.tsx | Imports self-hosted fonts via @fontsource/*. |
| src/data/changelog.generated.json | Regenerates in-game changelog data to reflect UI overhaul entries. |
| scripts/ui-screenshots.mjs | Adds Playwright capture script updated to use data-screen tab targeting. |
| screenshots/pr-feat-sol-ui-rehaul-attachments/before-title-1280.png | Adds PR attachment screenshot artifact. |
| package.json | Adds @fontsource dependencies for the new typography pairing. |
| package-lock.json | Locks new @fontsource dependencies. |
| CHANGELOG.md | Adds Unreleased entries describing the UI overhaul + settings modal + pass 2/3 improvements. |
| .gitignore | Adjusts screenshot ignore rules to allow committed PR attachment subfolders. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8293c1447d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@copilot apply changes based on the comments in this thread |
- formatCreditsCompact: use Math.floor to prevent K-suffix rounding to 1000K (e.g. 999 999 / 1000 rounded to 1000 with toFixed(0)) - App: remove dead SettingsModal render in !game branch; TitleScreen already manages its own settings modal - MobileSheet: add aria-modal=true to role=dialog backdrop - SettingsModal: replace role=radiogroup/radio+aria-checked with role=group and aria-pressed buttons to avoid misleading screen readers - CHANGELOG: fix 'rehaul' -> 'overhaul' in all three entries; regenerate changelog.generated.json Agent-Logs-Url: https://github.com/ScottyVenable/stellar-reach/sessions/1bcfbc32-1624-4abe-b861-a8ff0a7c44a5 Co-authored-by: ScottyVenable <20620758+ScottyVenable@users.noreply.github.com>
All five issues from the review thread addressed in 41e503b:
|
UI rehaul: bridge-console identity (Refs #100)
Scope
The mandate from #100 was a quality pass on visual identity, layout
density, and PC-vs-mobile differentiation. Four headline priorities,
plus two bundled improvements I committed to up front.
Design rationale
Typography pairing. Chakra Petch (display) + Space Grotesk (body) +
JetBrains Mono (numerics). Chakra Petch reads as authentic sci-fi
without Orbitron's all-caps stiffness ΓÇö letters keep proportional
spacing so headings don't shout. Space Grotesk gives body copy more
character than Inter while staying highly legible at small sizes.
JetBrains Mono is the workhorse for all credit / hull / fuel / day
numerics. All three are self-hosted via
@fontsourceso there is noruntime CDN call.
Amber as the primary action. Bright amber (#f5b942) is reserved for
"the next thing the captain should do" ΓÇö Launch Campaign, active tab on
desktop, panel corner brackets. Soft neon green is the "nominal /
active" channel. Red is exclusively for danger / illegal / hull damage.
This is opinionated; flag in Open questions if you want primary to
stay green.
Distinct desktop layout. At
>= 960pxthe same React tree reshapesinto:
fuel / cargo bars, credits, net worth, log + settings buttons).
Fnhotkey hints.
with corner brackets, faint scanline overlay, fades in on
navigation.
Mobile preserved. At
< 960pxthe same components collapse back tothe existing portrait stack. The bottom tab bar gains the new icon set
and active-state glow. Every screen still has a 44px minimum tap
target. The breadcrumb adds context without taking real estate.
Motion budget. Two animations only ΓÇö a 220ms fade-in on screen
change and a 360ms HUD flicker on first paint. Both gated behind
prefers-reduced-motion: no-preferenceand overridable via the newSettings modal.
Bundled improvements
mobile). Three controls today:
Persisted to
localStorageunderstellar-reach-settings-v1,independent of the game save.
screen viewport. Format:
SECTION / one-line context … FN0X.Screenshots
After (1280)
Before / after
Open questions for review
Grotesk? Alternatives I considered: Orbitron (rejected ΓÇö stiffness),
Rajdhani (rejected ΓÇö too narrow at small sizes), Inter (acceptable
but generic).
eye toward primary actions; green is reserved for nominal/active.
Easy to swap if you want green-as-primary back.
it land under the hand on a typical mouse setup. Either is one CSS
grid-template-areaschange.Validation
npm run typecheckΓÇö cleannpm run lintΓÇö clean (--max-warnings 0)npm run buildΓÇö 234 KB JS / 66 KB CSS, gzip 76 / 28global.csspreserved; legacy screensrender unchanged
preference
Save format
No save format change. UI settings live in a separate localStorage key
(
stellar-reach-settings-v1) so existing saves continue to load.ΓÇö Sol
Pass 2 ΓÇö AAA polish iteration
Verdict on pass 1:
Assess the screenshots and improve more in depth - AAA style UI. Acknowledged. Iteration on the same branch and the same draft PR.What changed visually
StatusBar.tsxand used in both the desktop HUD strip and the mobile pull-up sheet.prefers-reduced-motion). Mobile tabs gain a top amber border and icon glow.:activeswaps to inset-shadow + reversed gradient for a 60ms snap.MobileSheet.tsxrestores the HUD content the cramped mobile topbar can no longer fit (callsign / vessel readouts / hold / wire). Handle docked above the bottom tab bar; ESC dismisses.Starfield.tsx, seeded viacreateRng('STELLAR-REACH-TITLE')ΓÇö noMath.random), perspective horizon grid, vignette, animated wordmark with tracked-out letter spacing, four-action stack (New Voyage,Patch Notes,Settings,Quitif Electron) clipped into arrows, and a footer with channel-coloured version chip +SYSTEMS NOMINALindicator.useSfx()returns a stable no-op callback today; ready for a real audio layer to drop in without touching component code.What changed under the hood
textContent === 'Market', but tab buttons render the label plus anFnhint span ("MarketF1"). Tabs now exposedata-screenand the screenshot script queries that. Pass-2 screenshots correctly show each screen.prefers-reduced-motion: no-preferenceand the[data-motion='reduce']Settings override.Pass 2 screenshots
Title (1280)
Market ΓÇö desktop (1280)
Helm ΓÇö desktop (1280)
Ship ΓÇö desktop (1280)
Crew ΓÇö desktop (1280)
News ΓÇö desktop (1280)
Title (1920) ΓÇö to confirm scale-up does not collapse
Market ΓÇö mobile (375)
Title ΓÇö mobile (375)
Decisions made unilaterally ΓÇö flag for human override
Icon.tsxrather than pulling inlucide-reactorphosphor-react. Reasoning: bundle size and visual consistency with the existing tab icons. The brief allowed "your choice." Easy to swap in a follow-up if you want denser iconography.U+00A4(generic currency mark), notcrtext or¢. Sci-fi worlds rarely use cents.Quitbutton is Electron-only (UA sniff). Web/PWA users see no Quit button on the title screen.Patch Notesadded as a second top-level title action (not just the version-chip click target it was in pass 1).Status
feat/sol-ui-rehaul. PR target:development. Still draft.npm run typecheck/npm run lint/npm run buildall green locally.Math.randomintroduced. Save format unchanged. No internal-doc verbatim text.ΓÇö Sol
Pass 3 — Helm and trade-flow UX
Summary
-,+, andMaxquantity controls. Holding-or+repeats after a short delay and accelerates while held; timers clean up on release, pointer cancel, pointer leave, blur, and unmount.Screenshots
Follow-up backlog
Validation
npm run typecheck- cleannpm run lint- clean (--max-warnings 0; existing TypeScript parser support warning only)npm run build- cleanscreenshots/pr-feat-sol-ui-rehaul-pass3/and committed curated attachments underscreenshots/pr-feat-sol-ui-rehaul-attachments/pass3/.— Sol