cl_ui-design-philosophy
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 0
03 SKILL.md 正文
<!-- GENERATED FROM .claude/skills — DO NOT EDIT.
Run npm run gen:skills after editing the source skill (the build does this too). -->
Canary Lab UI Design Philosophy
Canary Lab's UI is a dense, information-first operator console — not a marketing
page. New surfaces must read as part of the same tool. The bar is intentional and
native, not novel. Apply frontend-design polish inside these constraints.
Critique-only requests ("review this design", "design feedback") → cl_design-feedback.
Terminal/CLI output styling is out of scope.
Non-negotiables
- Token system only. Colour, spacing, radius, shadow, type all come from CSS
variables:
--bg-base/-surface/-selected,--text-primary/-secondary/-muted,--border-default,--accent/--success/--warning/--danger,--radius-*,--shadow-*,--font-mono. Never hardcode a hex that competes with a token. Status hues (green verified, amber stale/shallow, sky in-progress, rose danger) are reused consistently so a colour means the same thing everywhere. - No new component library. Compose from existing precedents — don't introduce a UI kit, CSS-in-JS runtime, or competing styling approach.
- Light + dark both. Everything derives from tokens, so both themes work for free — verify you didn't bake in a theme-specific colour.
Layout precedents to copy
| Need | Copy from |
|---|---|
| Full-screen workspace view | CoverageLedgerPage, LogCleanupPage (fixed inset-0, header bar + panes) |
| Modal with tabs | FeatureConfigEditor (.cl-modal-backdrop + .cl-modal + <nav> tabs) |
| Status-bar launcher | the *Pill components in GlobalStatusBar |
| Background-task surface | FlightsPill + FlightPage (features/flights/components/) (see cl_async-task-ux) |
| Long async generation | the Coverage Generating screen — a dedicated full pane (phase stepper + the agent timeline via AgentSessionView, always on) that OWNS the view while a job runs; not a banner over a dimmed result |
| Server-spawned agent with a structured session log | AgentSessionView; external clients use the shared external-agent card |
Principles that make it feel designed
- One structured timeline for agentic work. Server-spawned work with a
readable CLI session log — run heal, coverage, portify, benchmark, flight
stages, localized evaluation rewrite — uses
AgentSessionViewrather than a second home-grown session viewer. The producer pins a session ref (Claude--session-id; Codex located by cwd + start) and exposes a REST snapshot +/ws/.../agent-sessiontail, as coverage does (seecl_async-task-ux). External-client work has no server-owned JSONL; use the sharedExternalAgentCard. Raw/cached tasks may have only progress text. Classify the producer before promising a thinking/tool timeline (seecl_surfacing-agent-work). - A live UI transition needs a reliable trigger, not just a push. A panel that must flip state mid-job may not depend solely on a best-effort broadcast — back it off the per-task stream you already hold. Pattern, worked example, and the "only updates after I refresh" fingerprint: [[cl_live-state-sync]].
- Meaning carries the style, not decoration. Prefer a status dot, a coloured
border-inset, or a typed chip over a heavy accent. (The TestCard has no
decorative left-accent — the verified dot +
@req-*chips already say it.) - Worst-first ordering. Lists of work (gaps, failures) sort the items that need attention to the top; "all good" sinks to the bottom.
- Never dead-end, never blank. Every state has a rendering with a next action
(a
Setup neededempty state offers Generate). While a long job runs, give it a dedicated screen that owns the view (the Coverage Generating pane) instead of a stale/empty ledger behind a banner — the work-in-progress IS the content. - One exercise, not exposed seams. When two steps are really one user goal (PRD summary → coverage mapping), present one flow with chained progress and one set of actions (Regenerate summary / Regenerate coverage) — don't leak the internal two-job boundary or a per-item review gate the user must babysit.
- Route the selection that should survive refresh. Top-level view and
feature live in the URL +
localStorageand sync across tabs. Run, dialog, flight, stage, and config tab live in the URL only, so two tabs can inspect different details without moving each other. Seeapps/web/src/shared/lib/workspace-view-state.tsandcl_route-every-surface. Ephemeral UI (hover, transient filters) stays in React state. - One owner for a long-lived lifecycle; don't split it across views. A background job (or any cross-view live state) must be owned ONCE at the screen level — one poller, rehydrated on open — and every panel reads from it. The Coverage dialog's worst bug came from two tabs each owning their own job + poller that unmounted on switch (orphaned jobs, "nothing happened", raw 409s). The fix wasn't more hydration — it was collapsing the tabs into one never-unmounting view. Prefer one view with panels/rails over tabs when the tabs share live state. Treat a "already running" conflict as attach to the existing, never an error in the user's face.
- Distinct view per lifecycle state. Empty / generating / final each get their own rendering off the single derived state — not one layout that's half-populated. A long-running job earns a full-screen takeover (you watch the agent); the resting states show the working surface.
- Density with breathing room. Tight vertical rhythm (8–12px gaps), small type (10–13px), monospace for ids/tags/paths. Information-rich, not cramped.
- Restrained motion. Subtle opacity/background transitions (~120ms) for hover/active; a pulse for "live". Headless preview forces reduced-motion — don't rely on animation to convey state (use static SVG for the coverage ring).
- Two-way affordances. Hovering one side of a relation lights the other and dims the rest (the ledger's test↔requirement highlight) — makes structure legible.
- No layout shift from a scrollbar. On any scroller whose content grows/shrinks
with a toggle or filter (a disclosure, a gap filter), set
scrollbar-gutter: stableso the appearing scrollbar doesn't eat content width and jump the layout sideways.
Verify
Component behaviour is happy-dom-tested (*.test.tsx); the live look needs the
canary-apply cycle — see cl_verify-changes Tier 3 for who runs it. Typecheck with
tsconfig.build.json.
04 同仓库更多 Skills
off-by-one
暂无简介
multi-failure-cascade
暂无简介
broken-delete-contract
暂无简介
canary-lab
Use when the user wants Canary Lab to take a product repo end to end — "test this app", "onboard this repo", "run a flight", "evaluate what I just built" — through the flight pipeline (start_flight / get_flight / respond_flight_checkpoint over MCP). One conducted pipeline continues a configured suite or takes bare repo(s) to a green, covered, healed run and publishes a downloadable Report; Parallel setup continues as Canary-owned background work. Use a focused skill only when the user asks for that single capability without asking for a Flight or /canary-lab.
canary-lab-verify
Use when verifying a Canary Lab feature against a RUNNING target — a deployed environment ("verify checkout on staging", "run the saved verify config", "check the deployed app") or a locally booted app ("verify a running app") — through the verify MCP tools (list/get/create/update_verification_config, boot_services, execute_verification, get_verification_result). No heal loop. For run + heal use canary-lab-run; for end-to-end onboarding use canary-lab (flight).
canary-lab-run
Use when running or healing an EXISTING Canary Lab feature locally — "run <feature>", "fix the failing run", "rerun 7cvh", "drive the heal loop" — through the repair MCP tools (start_run, wait_for_heal_task, signal_run, get_heal_context, pause_run, cancel_heal, abort_run). Fix failing runs by editing app/service code, not tests. For end-to-end onboarding of a new repo use canary-lab (flight); for deployed-environment checks use canary-lab-verify.