Skip to content

feat(console-ui): bundle Berkeley Mono and share the severity badge and command palette - #5160

Merged
shepherdjerred merged 1 commit into
mainfrom
flags-ux-console
Nov 26, 2026
Merged

shepherdjerred merged 1 commit into
mainfrom
flags-ux-console

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Why

Flags, Delivery, Go link and Errors share @shepherdjerred/console-ui with Hub, but Berkeley Mono was served only by Hub (the other consoles fell back to the system mono font), and two Hub pieces that Flags needs to match Hub, the severity pill and the ⌘K palette, lived only in Hub. Jerred confirmed the font files are intentionally committed, so the "licensed, never commit" guidance is removed.

What

  • Fonts: BerkeleyMono-{Regular,Bold}.woff2 move (git mv) from alert-dashboard/public/fonts into console-ui/src/styles/fonts/, declared in fonts.css (ui.tokens layer). Every console's Vite build now emits them as hashed /assets/*.woff2.
    • Hub loses its own @font-face, its public/fonts directory, its /fonts/* route and the reserved fonts URL segment.
    • The image smoke test and Hub e2e find the font through the built CSS and check status 200, font/woff2 and the wOF2 signature.
  • Shared severity pill: SeverityBadge({ severity, label?, size?, icon? }), an uppercase tinted pill with a glyph and a word. icon swaps the glyph while the tint stays the severity's, so Flags can draw Off with a minus glyph and Targeted with a crosshair. Tag (a neutral category label) and StatusGlyph (a bare glyph) could not serve.
  • Shared ⌘K palette: createCommandPaletteStore, CommandPalette, CommandPaletteSearch, CommandPaletteButton, isCommandPaletteShortcut, promoted out of Hub. The ⌘K/Ctrl+K listener is bound when the store is created, which keeps the repo's no-use-effect rule satisfied. Hub keeps only its item sourcing and search debounce. The palette CSS moves into console-ui as ui-palette-*.
  • Reuses main's page kit (PageBody, PageHeading, Card, SummaryGrid, Tag, SearchField, Segmented, TopBar) unchanged.
  • Guidance: the licensed-font prohibitions are removed from console-ui fonts.css and README, Hub globals.css and README, packages/fonts README and .gitignore, packages/dotfiles/AGENTS.md (live ~/AGENTS.md was reconciled first with a path-targeted chezmoi apply), the chezmoi-helper skill, install_macos.sh, MACOS_FRESH_INSTALL.md, and a sandbox README.
  • Docs: console-ui README and the wiki reference/console-ui.md document the font, the badge and the palette.

Demo

Hub is unchanged. main vs this branch, built Hub through its Playwright fixture server at 1440×900, light and dark: Home, Alerts, Overview, AI, Services, a service page, System and the open ⌘K palette. 0 differing pixels in all 16 pairs. (A first run showed 772 differing pixels in the palette heading, which was missing letter-spacing: normal; fixed and re-shot.)

Before (main) After
before-home-dark.png after-home-dark.png
before-ai-dark.png after-ai-dark.png
before-palette-light.png after-palette-light.png

Every console now serves the font (local Flags build of an earlier revision of this branch; the same CSS and files):

$ curl -s http://127.0.0.1:47661/ | grep stylesheet  ->  /assets/index-89pXqX6e.css
$ grep BerkeleyMono /assets/index-89pXqX6e.css  ->  /assets/BerkeleyMono-Regular-9xmt1tI2.woff2
$ curl -sI http://127.0.0.1:47661/assets/BerkeleyMono-Regular-9xmt1tI2.woff2
HTTP/1.1 200 OK
Content-Type: font/woff2
Cache-Control: public, max-age=31536000, immutable
$ head -c4 (signature): wOF2
document.fonts Berkeley Mono: 400:loaded (bundled face)

Verification

  • bunx turbo run build typecheck test lint --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/alert-dashboard: 23/23 pass (console-ui 259 tests, Hub 399).
  • bunx turbo run build typecheck --filter='...@shepherdjerred/console-ui' --continue: 122/123. The one failure is @shepherdjerred/the-storm#typecheck:ts, where uv can't build the venv because onnxruntime has no CPython 3.15 wheel (AI-951). It is unrelated to this change.
  • vite build of Hub and Flags each emit both Berkeley Mono files and reference them from CSS. Hub bun run test:e2e: 88 passed, twice. The smoke test's script run against the built Hub fixture server exits 0.
  • bunx lefthook run pre-commit: green, including check-agent-guidance with live ~/AGENTS.md reconciled.
  • bun run verify:extended -- --filter='...[origin/main...HEAD]' on 927a3eb7af: 65/66 tasks. The one failure is temporal#test:extended → media/series-pack/rollback-role.integration.test.ts timing out at 60s while the host was loaded (tracked as AI-936). The same file passes alone on an idle host (1/1, 34s), and nothing in this PR touches it.
  • Not yet verified: Woodpecker CI, image publish, ArgoCD, and live Hub/Flags.

Part of FM-228.

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQnKWrycqkZxjQrvL4Q

@shepherdjerred

shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@greptile-apps

greptile-apps Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 26, 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

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T10:31:32.464794Z e82532c Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc3d7d3c33

ℹ️ 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".

Comment on lines +69 to +71
retry: false,
refetchOnWindowFocus: false,
staleTime: Number.POSITIVE_INFINITY,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refresh cached documents when revisiting a deployment

If a deployment changes through toolkit flags apply, another operator's browser, or reconcileFlagsInventory, returning to it through the new client-side navigation reuses its cached document without fetching the updated revision. Documents do not change exclusively through this UI, and staleTime: Infinity prevents revalidation while the cached query remains available. Previously, the ordinary navigation links reloaded the page and fetched current data. Operators now see outdated values and encounter avoidable revision conflicts until they reload or the cache expires. Revalidate on deployment revisit or provide an explicit refresh mechanism while retaining cached data during loading.

Useful? React with 👍 / 👎.

@shepherdjerred
shepherdjerred removed this pull request from stack #5188 November 26, 2026 06:45
@shepherdjerred
shepherdjerred marked this pull request as draft November 26, 2026 06:45
@shepherdjerred
shepherdjerred changed the base branch from flags-ux-schemas to main November 26, 2026 07:02
@shepherdjerred shepherdjerred changed the title feat(console-ui): share Hub heading, severity badge, palette, and Berkeley Mono feat(console-ui): bundle Berkeley Mono and share the severity badge and command palette Nov 26, 2026
…nd command palette

Why
Flags is adopting Hub's look through console-ui, and it needs three things
only Hub had: Berkeley Mono served from the bundle, a severity pill with a
glyph and a word, and the Cmd+K palette shell. Hub served the font from its own
`public/fonts` through a dedicated route, so no other console could render the
mono face. Repo guidance also told agents never to commit the font, which no
longer matches the repository (the WOFF2 files are committed on purpose).

What
- console-ui bundles Berkeley Mono: the Regular and Bold WOFF2 files move to
  `src/styles/fonts/` and `fonts.css` declares them (400/700, swap, relative
  url) inside `@layer ui.tokens`, so every console's Vite build emits hashed
  `/assets/BerkeleyMono-*.woff2`. Hub drops its own `@font-face`,
  `public/fonts`, the `/fonts/*` route and the reserved `fonts` URL segment.
- `SeverityBadge` (severity, label?, size?, icon?): an uppercase pill tinted
  with `--ui-sev-soft`, glyph plus word. `icon` swaps the glyph so Flags can
  show "Off" as `unknown` with a minus and "Targeted" as `info` with a
  crosshair. `Tag` stays the neutral category label; `StatusGlyph` stays the
  bare glyph. `[data-sev]` now also exposes `--ui-sev-soft`.
- The Cmd+K shell moves out of Hub into console-ui: `createCommandPaletteStore`
  (binds the shortcut when created, so no effect), `CommandPalette`,
  `CommandPaletteSearch`, `CommandPaletteButton`, `isCommandPaletteShortcut`.
  Hub keeps only its item sourcing and search debounce on the shared shell;
  the palette CSS becomes `ui-palette-*` in `ui.components`.
- Main's page kit (`PageHeading` with `actions`, `Card`, `SummaryGrid`, `Tag`,
  `SearchField`, `TopBar`) already covers the rest of what Flags needs and is
  left unchanged; no second `PageHeading` is added.
- The "licensed, never commit" wording is replaced by factual install and
  bundling steps in the console-ui, Hub, fonts, dotfiles and sandbox docs and
  `install_macos.sh`; the dotfiles `AGENTS.md` sentence matches the live
  `~/AGENTS.md` so `check-agent-guidance` passes.
- The Hub image smoke test and the Hub e2e now find the font through the built
  stylesheet and assert 200, `font/woff2` and the `wOF2` signature.

Verification
- `bunx turbo run build typecheck test lint --filter=@shepherdjerred/console-ui
  --filter=@shepherdjerred/alert-dashboard`: 23/23 tasks; console-ui 259 tests,
  Hub 399 tests.
- `bunx turbo run build typecheck --filter='...@shepherdjerred/console-ui'
  --continue`: 122/123; only `@shepherdjerred/the-storm#typecheck:ts` fails
  (Python 3.15/onnxruntime, AI-951), unrelated.
- `vite build` of Flags and Hub both emit `BerkeleyMono-Regular-*.woff2` and
  `BerkeleyMono-Bold-*.woff2` under `/assets/`, and the CSS references them.
- Hub `bun run test:e2e`: 88 passed. The image smoke command's JavaScript run
  against the built Hub fixture server exits 0.
- Hub before/after at 1440x900, light and dark, Home, Alerts, Overview, AI,
  Services, a service page, System and the open Cmd+K palette: 0 differing
  pixels in all 16 pairs.
- `bunx lefthook run pre-commit` on the staged paths passes, including
  `check-agent-guidance`.
- Not run: `verify:extended` (host load average about 60, extended
  integration suites time out spuriously). No live deployment or acceptance.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQnKWrycqkZxjQrvL4Q
@shepherdjerred
shepherdjerred marked this pull request as ready for review November 26, 2026 10:28
@shepherdjerred
shepherdjerred merged commit b626144 into main Nov 26, 2026
8 of 9 checks passed
@shepherdjerred
shepherdjerred deleted the flags-ux-console branch November 26, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant