Repository navigation
feat(dashboard): Quantum skin, chain status pill, canary card, responsive layout - #165
Merged
Merged
Conversation
…sive layout The browser UI behind `qring status` now wears the q-ring site's Quantum skin. Palette, radii and motion live in one constant, DASHBOARD_TOKENS in src/core/dashboard-tokens.ts (mirrors apps/qring/app/globals.css in i4c-sites), rendered into the page's :root by tokensToCssVars(); no other dashboard file holds a colour literal, and a test checks that. - Flat cards (bg-card, 1 px border, radius 16); blobs, glass blur and the card-reveal animation are gone. The brand mark keeps the cyan to violet gradient and the only glow. - KPI strip as StatsRow-style tiles; Policy rows with a mode chip; Audit Log with the chain status pill (intact / broken at #n, keeps .chain-badge and the "chain intact" label) and a console-style feed. - New Canary card (none / armed / tripped) fed by a new `canaries` snapshot field; an agent-view dashboard gets an empty array and no card. - Responsive at 768 and 480 px; prefers-reduced-motion stops the pulses and transitions. Binding, the per-launch token, the CSP and the self-contained page are unchanged. Refs #164. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkMFzJ1Zs2thapqFsdGL2K
The blanket *token* pattern in .gitignore swallowed the new tokens file, so the previous commit referenced a module it did not include. Add it to the allow-list next to the other legitimate *token*/*secret* source paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkMFzJ1Zs2thapqFsdGL2K
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkMFzJ1Zs2thapqFsdGL2K
8 of 12 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.
Summary
Restyles the browser UI behind
qring statusso it reads as the same product as the redesigned q-ring site (the Quantum skin), and adds a Canary card.src/core/dashboard-tokens.tsexportsDASHBOARD_TOKENS(colours, radii, motion, font stacks) andtokensToCssVars(), which renders the page's:rootblock. It mirrorsapps/qring/app/globals.cssin i4c-sites and says so in its header.dashboard-html.tsandmain.jsnow hold no hex or rgba literal; tints arecolor-mix()over the variables. A new test (dashboard-tokens.test.ts) checks the rendered values and the absence of literals.intactin success,broken at #nin danger, fromauditChain; still.chain-badgewith a "chain intact" label) and a console-style feed (mono, action chip, source chip, time). Policy rows show their mode as a small read-only segment chip. The secrets table keeps search, chips and sorting.DashboardSnapshotgainscanaries: { key, scope, plantedAt?, trips, lastTripAt?, lastTripBy? }[], built incollectSnapshot()from the canary flags on the entries it already lists plus thecanaryevents in the 24 h audit window. The card has the site's three states: none, armed (pulsing dot), tripped (danger border, "Tripped byprefers-reduced-motionstops the pulses and transitions.<name>/<value>were parsed as HTML tags by htm and rendered blank; they are plain strings now. Zero-value donut slices no longer draw a dot.[Unreleased]Added + Changed, README dashboard card list.docs/stability.mddoes not list snapshot fields, so it is unchanged..gitignore: added!src/core/dashboard-tokens.tsto the allow-list, because the blanket*token*rule would otherwise drop the file.Constraints kept
127.0.0.1only; per-launch random token on every route (403 without it).default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data:; connect-src 'self'; frame-ancestors 'none'; base-uri 'none'; form-action 'none', X-Frame-Options DENY, nosniff, no-referrer, no-store.font-srcchange.canariesfield is an empty array and the card is not rendered (the client learns it is an agent view from the internal__QRING__global). The projection still strips canary and alert actions,prevHash,pidand correlation ids./,P,Rshortcuts unchanged; command, flags and MCP tool unchanged; the payload only gains a field.Type
Checklist
pnpm run typecheckpassespnpm run lintpassespnpm run buildpasses (bundle regenerated and committed; a freshbuild:dashboardmatches it byte for byte)pnpm run test:cipasses (99 files, 862 tests)CHANGELOG.mdupdated under[Unreleased]pnpm run check:parityOK)Verification
dashboard-tokens.test.ts(accent and bg-deep in the rendered:root, no colour literal indashboard-html.tsormain.js);dashboard-agent-view.test.ts(canariesis[]in agent view and the page saysagentView:true; the operator view lists the planted canary withtrips: 1andlastTripBymcp, and not the real key);dashboard-server.test.ts(.canary-card, the plant hint and the pill text ship in the bundle;canariesis an array). Existing class and title assertions are unchanged.node dist/index.js status --port 9878 --no-openand screenshotted with Playwright (Chrome) at 1440x900, 768x1024 and 390x844, viewport and full page: no console errors, no external requests, no horizontal overflow at any width. Response headers carry the CSP and the other headers; a request without the token returns 403.prettier --checkpasses on every touched TypeScript file.src/dashboard-client/main.jswas not run throughprettier --write: it was not Prettier-formatted on main either, it is outside theformatscript'ssrc/**/*.tsglob, and a write would reformat about 1,200 unrelated lines.Breaking changes
None. The snapshot gains a
canariesfield; nothing is removed or renamed.Closes #164
🤖 Generated with Claude Code