Repository navigation
feat(console-ui): bundle Berkeley Mono and share the severity badge and command palette - #5160
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
e4f4f56 to
af81afb
Compare
607164d to
817d980
Compare
817d980 to
dc3d7d3
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
8768c79 to
d5a3448
Compare
There was a problem hiding this comment.
💡 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".
| retry: false, | ||
| refetchOnWindowFocus: false, | ||
| staleTime: Number.POSITIVE_INFINITY, |
There was a problem hiding this comment.
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 👍 / 👎.
dc3d7d3 to
927a3eb
Compare
…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
927a3eb to
e82532c
Compare
Why
Flags, Delivery, Go link and Errors share
@shepherdjerred/console-uiwith 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
BerkeleyMono-{Regular,Bold}.woff2move (git mv) fromalert-dashboard/public/fontsintoconsole-ui/src/styles/fonts/, declared infonts.css(ui.tokenslayer). Every console's Vite build now emits them as hashed/assets/*.woff2.@font-face, itspublic/fontsdirectory, its/fonts/*route and the reservedfontsURL segment.font/woff2and thewOF2signature.SeverityBadge({ severity, label?, size?, icon? }), an uppercase tinted pill with a glyph and a word.iconswaps 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) andStatusGlyph(a bare glyph) could not serve.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'sno-use-effectrule satisfied. Hub keeps only its item sourcing and search debounce. The palette CSS moves into console-ui asui-palette-*.main's page kit (PageBody,PageHeading,Card,SummaryGrid,Tag,SearchField,Segmented,TopBar) unchanged.fonts.cssand README, Hubglobals.cssand README,packages/fontsREADME and.gitignore,packages/dotfiles/AGENTS.md(live~/AGENTS.mdwas reconciled first with a path-targetedchezmoi apply), the chezmoi-helper skill,install_macos.sh,MACOS_FRESH_INSTALL.md, and a sandbox README.reference/console-ui.mddocument the font, the badge and the palette.Demo
Hub is unchanged.
mainvs 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 missingletter-spacing: normal; fixed and re-shot.)main)Every console now serves the font (local Flags build of an earlier revision of this branch; the same CSS and files):
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, whereuvcan't build the venv becauseonnxruntimehas no CPython 3.15 wheel (AI-951). It is unrelated to this change.vite buildof Hub and Flags each emit both Berkeley Mono files and reference them from CSS. Hubbun 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, includingcheck-agent-guidancewith live~/AGENTS.mdreconciled.bun run verify:extended -- --filter='...[origin/main...HEAD]'on927a3eb7af: 65/66 tasks. The one failure istemporal#test:extended→media/series-pack/rollback-role.integration.test.tstiming 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.Part of FM-228.
🤖 Generated with Claude Code
https://claude.ai/code/session_011u9pQnKWrycqkZxjQrvL4Q