The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
feat(ui): design-system component convergence — Card/Badge adoption, multiplicative radius ladder, unified list surfaces (#9240)
scotttongc90e66bdd6a8
diff --git a/doc/design/COMPONENT-INVENTORY.md b/doc/design/COMPONENT-INVENTORY.mdindex 3554292745..9e49c042e0 100644--- a/doc/design/COMPONENT-INVENTORY.md+++ b/doc/design/COMPONENT-INVENTORY.md@@ -366,12 +366,41 @@ All of the below are **leads for human review**, not verdicts, per KNOWN-DUPLICA## 6. Needs human decision (required section)1. **`ChatComposer` vs `MarkdownEditor`-based composer** — KNOWN-DUPLICATES.md already flags this as deliberately unmerged (PAP-101). This audit confirms the split is real (not accidental) given the large capability gap. Human call: keep permanently split, or revisit now. **DECIDED (Run 2 review, DECISION-SHEET.md C1): keep the split, documented as deliberate — user re-confirmed after visual review.**-2. **`FileTree.tsx` vs `WorkspaceFileBrowser.tsx` independent tree models** — is `WorkspaceFileBrowser`'s separate `WorkspaceFileTreeNode` model justified by different data needs, or is it drift that should be refactored onto `FileTree`'s exported `buildFileTree`/`FileTreeNode`? Needs someone who knows both call sites' actual data shapes. **DECIDED (Run 2 review, DECISION-SHEET.md C2): investigate data-shape needs as Run 3 prep; refactor onto FileTree only if shapes align.**+2. **`FileTree.tsx` vs `WorkspaceFileBrowser.tsx` independent tree models** — is `WorkspaceFileBrowser`'s separate `WorkspaceFileTreeNode` model justified by different data needs, or is it drift that should be refactored onto `FileTree`'s exported `buildFileTree`/`FileTreeNode`? Needs someone who knows both call sites' actual data shapes. **DECIDED (Run 2 review, DECISION-SHEET.md C2): investigate data-shape needs as Run 3 prep; refactor onto FileTree only if shapes align.** **RESOLVED (Run 3 investigation): KEEP SEPARATE — shapes do not align; see §7.1.**3. **`agentStatusBadge` vs `brandChipBadge`** (`lib/status-colors.ts`) — these are provably byte-identical for their 4 shared keys. Recommend collapsing, but doing so touches every call site importing `agentStatusBadge`, so it's a human-approved Run 2/3 item, not automatic. **RESOLVED (Run 2 review, DECISION-SHEET.md A1): collapsed — `agentStatusBadge` had zero importing call sites and was deleted; `brandChipBadge` is the single map.**-4. **Entity-picker family** (`ReportsToPicker`, `ExecutionParticipantPicker`, `InlineEntitySelector`, `SearchableSelect`) — plausible consolidation candidate on prop-surface similarity alone; needs a closer prop-by-prop and behavior diff (not done in this pass) before any merge recommendation can be made with confidence. **DECIDED (Run 2 review, DECISION-SHEET.md C3): prop-by-prop diff queued as Run 3 prep; no merge without it.**+4. **Entity-picker family** (`ReportsToPicker`, `ExecutionParticipantPicker`, `InlineEntitySelector`, `SearchableSelect`) — plausible consolidation candidate on prop-surface similarity alone; needs a closer prop-by-prop and behavior diff (not done in this pass) before any merge recommendation can be made with confidence. **DECIDED (Run 2 review, DECISION-SHEET.md C3): prop-by-prop diff queued as Run 3 prep; no merge without it.** **RESOLVED (Run 3 investigation): all four KEEP SEPARATE — no copy-paste drift found; see §7.2.**5. **Finance card family** (5 components, section 5.4) — needs a domain-knowledgeable human to confirm whether all 5 are truly distinct dashboard needs or 2-3 could share a base `FinanceCard`. **DECIDED (Run 2 review, DECISION-SHEET.md C4): keep all five; revisit only if a sixth appears.**6. **Hand-rolled card-shaped containers vs. `Card` primitive** (~26 files) and **hand-rolled pill spans vs. `Badge`** (~34 files) — both are large, low-risk-looking consolidation opportunities, but "low risk" was assessed at a glance only; a real swap pass needs per-site visual verification (this is exactly what Storybook snapshots from Phase 0 would catch if these were touched). **DECIDED (Run 2 review, DECISION-SHEET.md C5): queued for Run 3 as the shadcn-swap list, with per-site snapshot verification.**7. **`plugins/launchers.tsx` custom multiplexed overlay** — the most structurally custom modal-like component in the app; recommend a dedicated closer look before deciding whether/how to route it through `Dialog`/`Sheet`/`Popover`, since it currently does something none of the three do alone (switch shell type per plugin action). **DECIDED (Run 2 review, DECISION-SHEET.md C6): dedicated review task; excluded from Run 3.**8. **`radio-card.tsx` / `toggle-switch.tsx` non-standard "shadcn" primitives** — confirm whether these were deliberately custom-built (and should stay documented as such) or are stale/incidental deviations from `radio-group`/`switch` that should be swapped in a later run. **DECIDED (Run 2 review, DECISION-SHEET.md C7): deliberately custom — documented as such; no swap.**9. **`StatusBadge`/`AgentStatusBadge` not wrapping the installed `Badge` primitive** — worth a human call on whether unifying the base markup (while keeping the custom `.status-chip` color-mix mechanic) is worth the churn, or whether the current bespoke `<span>` approach should just be documented as an intentional, permanent exception (similar to the StatusIcon/ExternalObject/mention-chip three-way split already documented). **DECIDED (Run 2 review, DECISION-SHEET.md C8): documented as an intentional exception — the WCAG-tuned `.status-chip` mechanic stays bespoke.**10. **Toast system has no installed shadcn primitive to compare against** — `ToastViewport`/`ToastContext` is fully custom because no `sonner`/toast component is installed at all. Human call: install one and migrate, or formally document the custom toast as the system's permanent choice (it already has a working tone/variant system). **DECIDED (Run 2 review, DECISION-SHEET.md C9): decision deferred to Run 4, when the toast's palette colors get retokenized; sonner-behind-a-pushToast-facade is the alternative to evaluate then.**++---++## 7. Run 3 investigation verdicts (C2/C3)++Investigated Jul 7 2026 on `design/component-convergence` per DECISION-SHEET.md C2/C3. Both are read-only verdicts; no merges executed (neither met the "copy-paste drift with identical data shapes" bar).++### 7.1 C2 — WorkspaceFileBrowser vs FileTree tree models: KEEP SEPARATE++**Deliberate divergence, not copy-paste drift.** No shared git ancestry: `git log --follow` shows FileTree.tsx originating in 3c73ed26b (plugin host surface, #5205) and WorkspaceFileBrowser.tsx independently in 468edd8b2 (workspace file viewer, #7681); no rename/copy relationship, and the only commit touching both is the mechanical token retune (c07e650cd).++**Data shapes are distinct, not overlapping:**+- `FileTreeNode` (FileTree.tsx:18-25): `kind: "dir"|"file"`, keyed on `path`, children on every node, optional `action` string. Built by `buildFileTree(files: Record<string, unknown>)` — a flat path→content map fed static blobs (CompanyExport.tsx:696/762/832, CompanyImport.tsx:783/903, AgentDetail.tsx:1902).+- `WorkspaceFileTreeNode` (WorkspaceFileBrowser.tsx:211-227): `kind: "folder"|"file"` (different literals), composite `key` = `kind:workspaceId:relativePath`, baked-in `depth`, folder-only `lazy` flag, and file nodes embed the entire `WorkspaceFileListFileItem` server DTO (~15 fields: capabilities, previewKind, byteSize, download URLs — packages/shared/src/types/workspace-file-resource.ts:50-94). Built from an array of server DTOs with rootPath prefix-stripping.++**Behavior domains differ:** FileTree is an eager, static tree with tri-state checkboxes, badges/tones, frontmatter parsing, and a full roving-tabindex keyboard grid; WorkspaceFileBrowser is a server-paginated live browser with lazy folders, per-folder "load more" via `useQueries`, a debounced search combobox, and opposite sort order (folders-first vs FileTree's deliberate files-first, FileTree.tsx:96-99). Neither uses the other's load-bearing features; a merge would be a superficial shared-recursion abstraction both sides immediately override.++### 7.2 C3 — Entity-picker family: all four KEEP SEPARATE++**No copy-paste lineage:** four independent creation commits by different efforts — InlineEntitySelector (3709901db, Feb 26), ReportsToPicker (61f53b647, Mar 20), ExecutionParticipantPicker (be518529b, Apr 7, extracted from inline pill UI), SearchableSelect (50ae8fc65, Jun 24, #8597, born cmdk-based). `git log --follow` shows no cross-file rename/copy.++Per-component rationale:+- **ReportsToPicker**: no search, no keyboard nav, domain `Agent[]` single-select with unique manager-state UI (terminated-manager banner, stale-ID handling, ReportsToPicker.tsx:92-104). 2 call sites. A thin bespoke widget, not a drifted copy.+- **ExecutionParticipantPicker**: the only multi-select (toggle set) and the only one with async data fetching (`useQuery` user directory); encodes selections as `agent:<id>`/`user:<id>` tagged strings coupled to execution-policy plumbing. Not behavior-preservingly mergeable into any single-select.+- **InlineEntitySelector vs SearchableSelect** (the only real candidate pair): different engines (hand-rolled input + manual Arrow/Enter/Tab keyboard machine with tab-advance chain driving NewIssueDialog's field flow, InlineEntitySelector.tsx:154-189/90-101 — vs cmdk `Command shouldFilter={false}`, SearchableSelect.tsx:246); different option shapes (`{id,label,searchText}` flat + synthetic none-row vs `{key,value,label,title,searchText,disabled}` grouped + generic `<TValue,TOption>`); each has unique load-bearing features (recent-ordering/onConfirm vs createItem/deriveGroups/scoreOption/veto-close). ~33 call sites on InlineEntitySelector incl. the plugin bridge (plugins/bridge-init.ts:389/479). High-risk, low-reward rewrite — default keep-as-is holds.++### 7.3 Interactive-card affordance (Run 3 review feedback)++`Card` gained an `interactive` prop — pointer cursor, quiet hover (border→foreground/20 + shadow-md lift), focus-visible ring — used when the whole card is a click target (e.g. Companies selector). Skills tiles (CompanySkills `SkillCard`) and artifact cards (`ArtifactCard`/`ArtifactGroupCard`) apply the same recipe verbatim since they cannot render through Card (button/Link semantics). Static container Cards stay affordance-free by design.diff --git a/doc/design/DECISION-SHEET.md b/doc/design/DECISION-SHEET.mdindex e2cab973f3..8622ba7270 100644--- a/doc/design/DECISION-SHEET.md+++ b/doc/design/DECISION-SHEET.md@@ -31,13 +31,13 @@ Every open question from TOKEN-AUDIT.md §8 + batch logs and COMPONENT-INVENTORY| C2 | FileTree vs WorkspaceFileBrowser parallel tree models | Investigate data-shape needs in Run 3; refactor onto FileTree only if shapes align | APPROVED — investigate data-shape needs in Run 3 prep || C3 | Entity-picker family (4 components) | Prop-by-prop diff as Run 3 prep task; no merge without it | APPROVED — prop-by-prop diff as Run 3 prep task; no merge without it || C4 | Finance card family (5 components) | Keep; revisit only if a 6th appears | APPROVED — keep all five; revisit only if a 6th appears |-| C5 | Hand-rolled cards (~26 files) → `Card`; pills (~34 files) → `Badge` | Run 3 shadcn-swap list, per-site snapshot verification | APPROVED — queued Run 3 shadcn-swap list, per-site snapshot verification |+| C5 | Hand-rolled cards (~26 files) → `Card`; pills (~34 files) → `Badge` | Run 3 shadcn-swap list, per-site snapshot verification | DONE (Run 3, Jul 7) — C5a: ~30 files converted (Card supplies skin, sites keep interior layout; interactive `<button>`/`<Link>` cards, `<li>` rows, string props, and the chart tooltip carry `design-allow(card-pattern)` comments). Deltas sub-pixelmatch-threshold; manual evidence in run3-review/c5a-card-conversions. **RESOLVED Jul 8**: Card now carries rounded-lg on the multiplicative ladder (see 'Radius scale codified'). C5b: 113 pill spans across ~45 files converted to Badge (+PropertyChip wraps Badge internally); StatusBadge/ExternalObjectStatusSummary/MatchSourceChip stay bespoke per C8/§5.1/domain-tokens with pointer comments. 22 stories re-baselined (+2px pill box, font-medium), triplets committed. || C6 | `plugins/launchers.tsx` overlay | Dedicated review task; exclude from Run 3 | APPROVED — dedicated review task, excluded from Run 3 || C7 | radio-card / toggle-switch custom primitives | Document as deliberate custom; skip swaps | APPROVED — documented as deliberate custom; skip swaps || C8 | StatusBadge not wrapping Badge primitive | Document as intentional exception (WCAG-tuned .status-chip mechanic) | APPROVED — documented as intentional exception (WCAG-tuned .status-chip mechanic) || C9 | Toast system (no shadcn primitive installed) | Keep custom toast; document as permanent choice (working tone/variant system; sonner migration = churn without user-visible gain) | DEFERRED to Run 4 — decide when toast palette colors get retokenized; sonner-behind-a-pushToast-facade is the alternative to evaluate || C10 | FeatureGate wrapper pattern (3 near-identical gates) | Nice-to-have shared primitive; backlog, not a run | APPROVED — backlog nice-to-have, not a run |-| C11 | Sidebar agents section: hand-rolled rows (own spacing/icon colors, palette-blue liveness dot) instead of `SidebarNavItem`; only section that is collapsible | Run 3 item: unify rows onto `SidebarNavItem`, settle collapsibility policy across sections, liveness dot → canonical status blue. Wholesale shadcn Sidebar adoption REJECTED for now (app already has equivalent machinery incl. icon-rail height trick; highest-regression chrome) — re-evaluate as a dedicated item after Run 3 only if its behaviors (kbd shortcut, persisted state, mobile sheet) are wanted | APPROVED — user-spotted during :3300 test drive (Jul 6), queued for Run 3 |+| C11 | Sidebar agents section: hand-rolled rows (own spacing/icon colors, palette-blue liveness dot) instead of `SidebarNavItem`; only section that is collapsible | Run 3 item: unify rows onto `SidebarNavItem`, settle collapsibility policy across sections, liveness dot → canonical status blue. Wholesale shadcn Sidebar adoption REJECTED for now (app already has equivalent machinery incl. icon-rail height trick; highest-regression chrome) — re-evaluate as a dedicated item after Run 3 only if its behaviors (kbd shortcut, persisted state, mobile sheet) are wanted | DONE (Run 3, Jul 7) — agent rows render via `SidebarNavItem` (new additive props: `iconNode`, `active`, `dense`, `trailing`, `liveAccessory`); all live dots (agents + nav rows, rail + expanded) now use `--status-agent-running` (#2563eb, was palette blue-500 #3b82f6 — small hue-darkening delta, per-C11 mandate; "N live" text keeps its palette classes for Run 4). **Collapsibility policy** (superseded Jul 8 by user review): EVERY labeled section (Work, Company, Projects, Agents) is collapsible, default-open, session-scoped state — one affordance everywhere. "See all agents" stays a plain muted Link on purpose (must not adopt active-route highlighting). 48 sidebar vitest assertions pass unchanged. |## Gallery feedback round 1 (preset-tune session, Jul 6) — executed@@ -66,6 +66,32 @@ User rulings from the tune-session gallery review; all intentionally visible, sn- `pnpm typecheck` + full `pnpm test:storybook-visual` — re-running independently (in progress).- Eyeball-pass note: the Phase 0 baseline was captured at the master fork point before any change, and the suite compares current rendering to it at `maxDiffPixels: 0` — pixel-equality with master-at-fork is machine-proven; side-by-side Storybook remains available on request (`pnpm storybook` here + `-p 6007` on master).+## Baseline reconcile — Run 3 setup (Jul 7, 2026)++Fresh worktree from origin/master (3b16ac380) on `design/component-convergence`. The baseline-manifest archive is still unpublished (placeholder URL), so the 510 local baselines were seeded from the Run 1 worktree (`~/Projects/DEV/paperclip-design-simplify`, `tests/storybook-visual/__snapshots__/`, branch head 44ab1ad17) into gitignored `tests/storybook-visual/.snapshots/`. First run: 497/510 green; 6 stories (12 snapshots, both themes) diffed, each verified against a specific master commit that postdates the baselines, then re-baselined — nothing else touched:++- `pages-work-timeline--hour-zoom` / `--day-zoom` / `--with-human-activity` ← 59092e85d "[codex] Fix work timeline actor avatars (#9152)" (diff = actor avatar column only)+- `product-navigation-layout--board-chrome-matrix` / `--sidebar-icon-alignment` ← 83f5f5984 "[codex] Hide goals sidebar link behind experiment (#9189)" (diff = one sidebar row removed, rows below shift up)+- `ux-labs-converted-test-pages--issue-chat-review-surface` ← 6d103b835 (system-comment attribution), 696c694a5 + 4f5abf600 (IssueChatThread reply composer / recovery card) (diff = attribution rows + inline reply composer)++Post-reconcile verification: full suite 509 passed clean + 1 known-pattern parallel-load flake (`product-dialogs-modals--new-agent-external-invite [light]`, passed on retry), exit 0. Snapshot PNGs remain outside git by design; this entry is the durable record until the baseline archive publication flow exists.++## Status glyph size reverted to md (Run 3 review feedback, Jul 8 2026)++**Reverses PAP-243/PAP-245.** Task-row status glyphs in the inbox and tasks list standardize on md (16px); the lg (20px) enlargement is withdrawn after user review. IssueRow fallbacks and both lists' slots (the PAP-246 slot-override gotcha) now agree on md; the size tests that documented the lg decision were updated in lockstep. 10 stories re-baselined (run3-review/feedback-round-6).++## Radius scale codified (Run 3 review feedback, Jul 8 2026)++**Multiplicative shadcn ladder adopted, closing B4.** `--radius: 0.5rem` (8px) is the single anchor; sm/md/lg/xl/2xl/3xl/4xl = 0.6/0.8/1.0/1.4/1.8/2.2/2.6 x anchor (rounded-lg IS the anchor). Card now carries `rounded-lg`, and all card surfaces are unified on it: artifact cards (was 8px literal --rad-8, token deleted), skills tiles (was md), chart cards (already lg), the chat plan/interaction card shell (was sm — the "purple border follows the knob but isn't 8px" finding). Inputs/buttons stay at md (6.4px) — controls one step tighter than containers. Shadow decision still open (Design lab).++## Interactive-card pattern (Run 3 review feedback, Jul 7 2026)++**One Card, two modes.** The Card primitive is a static container by default; when the whole card is a click target it takes the `interactive` prop (ui/src/components/ui/card.tsx): `cursor-pointer` + quiet hover (border darkens to foreground/20, shadow lifts to md) + keyboard focus ring. Non-Card interactive cards (skills tiles in CompanySkills, artifact Link-cards) carry the same class recipe verbatim. Chosen over the louder accent-border/tint hover after user review. Cards whose *rows* are the click targets (Costs "By agent") keep the card boundary static — the affordance belongs to the row.++## Run 3 — component convergence — DONE pending review (Jul 7, 2026)++Executed on `design/component-convergence` (worktree focused-agnesi). Scope C2/C3/C5/C11 + AgentDetail story, per RUN3-PROMPT. Verification at close: token gates 3/3 CLEAN (also fixed the master regression in IssueRecoveryActionCard from 4f5abf600); `pnpm typecheck` green; `pnpm --filter @paperclipai/ui build` exit 0; ui vitest 2098/2098; visual suite 512/512 (510 prior + AgentDetail light/dark) against the updated local baseline. Remaining card/pill pattern matches all carry `design-allow(...)` inline comments (audited). Review materials: `doc/design/run3-review/` (C11 dot recolor, C5a corner/shadow pairs, 43 C5b triplets). Two sub-threshold facts a reviewer should know: (1) Playwright pixelmatch's 0.2 per-pixel color threshold means `maxDiffPixels: 0` tolerates low-contrast changes — the C11 dot recolor and C5a corner-squaring pass the suite without re-baselining; manual evidence committed instead. (2) The Card primitive has no rounded-* (square-era survivor) — converted cards render square; one `rounded-*` on card.tsx + re-baseline restores roundness everywhere if wanted.+## Tune session — CLOSED (Jul 6, 2026)User approved the complete new design language via gallery v4 + live test drive on the :3300 worktree instance ("ship it"). Merged origin/master (12 commits; one conflict — upstream deliberately removed the Wakes-on-confirm chip, deletion accepted). 296 snapshots re-baselined; gates 3/3 CLEAN; typecheck green; final suite verification run against the new baseline. Remaining roadmap: Run 3 (cards/pills/C11 sidebar + investigations + AgentDetail story), issue→task rename run, Run 4 (palette classes + toast), ESLint ratchet.diff --git a/tests/storybook-visual/playwright.config.ts b/tests/storybook-visual/playwright.config.tsindex b942bc7798..ac11aaf1b9 100644--- a/tests/storybook-visual/playwright.config.ts+++ b/tests/storybook-visual/playwright.config.ts@@ -33,6 +33,9 @@ export default defineConfig({browserName: "chromium",viewport: { width: 1200, height: 800 },deviceScaleFactor: 1,+ // JS-driven tickers/timers key off prefers-reduced-motion for+ // deterministic captures (CSS animations are already disabled).+ reducedMotion: "reduce",baseURL: "http://localhost:6106",},webServer: {diff --git a/ui/src/components/ActiveAgentsPanel.tsx b/ui/src/components/ActiveAgentsPanel.tsxindex c248c37486..02326a278f 100644--- a/ui/src/components/ActiveAgentsPanel.tsx+++ b/ui/src/components/ActiveAgentsPanel.tsx@@ -15,6 +15,7 @@ import { ExternalLink } from "lucide-react";import { Identity } from "./Identity";import { RunChatSurface } from "./RunChatSurface";import { useLiveRunTranscripts } from "./transcript/useLiveRunTranscripts";+import { Badge } from "@/components/ui/badge";function RunCardRecoveryChip({ action }: { action: IssueRecoveryAction }) {const state = deriveActiveRecoveryDisplayState(action);@@ -22,20 +23,20 @@ function RunCardRecoveryChip({ action }: { action: IssueRecoveryAction }) {const tone = RECOVERY_CHIP_DEFAULT_TONE[state];const Icon = tone.icon;return (- <span+ <Badge variant="outline"data-testid="active-agent-run-recovery-indicator"data-recovery-state={state}role="status"aria-label={tone.label}title={`${tone.label} — open the source task to act.`}className={cn(- "inline-flex shrink-0 items-center gap-0.5 rounded-full border px-1.5 py-0.5 text-(length:--text-nano) font-medium",+ "gap-0.5 px-1.5 text-(length:--text-nano)",tone.className,)}><Icon className="h-2.5 w-2.5" aria-hidden />{tone.label}- </span>+ </Badge>);}diff --git a/ui/src/components/ActivityCharts.tsx b/ui/src/components/ActivityCharts.tsxindex 38a92bea77..429d412f8b 100644--- a/ui/src/components/ActivityCharts.tsx+++ b/ui/src/components/ActivityCharts.tsx@@ -20,10 +20,10 @@ function emptyRunDay(date: string): DashboardRunActivityDay {}const runSegmentColors = {- succeeded: "#10b981",- recovered: "#f59e0b",- failed: "#ef4444",- other: "#737373",+ succeeded: "var(--hex-10b981)",+ recovered: "var(--hex-f59e0b)",+ failed: "var(--hex-ef4444)",+ other: "var(--hex-737373)",} as const;// Compact per-day tooltip that also attributes failures to their error class.diff --git a/ui/src/components/ActivityFeed.tsx b/ui/src/components/ActivityFeed.tsxindex 70100ea0d7..15cd08cb73 100644--- a/ui/src/components/ActivityFeed.tsx+++ b/ui/src/components/ActivityFeed.tsx@@ -263,6 +263,7 @@ function CollapsedFeedGroup({return (<div>+ {/* design-allow(card-pattern): interactive <button> card; Card renders a div and would break button semantics (C5a Run 3) */}<buttontype="button"onClick={() => setExpanded((e) => !e)}diff --git a/ui/src/components/AgentConfigForm.tsx b/ui/src/components/AgentConfigForm.tsxindex 5a0204f26e..7bad3c8117 100644--- a/ui/src/components/AgentConfigForm.tsx+++ b/ui/src/components/AgentConfigForm.tsx@@ -66,6 +66,7 @@ import { resolveForcedKubernetesEnvironment } from "../lib/forced-kubernetes-env// so existing imports from this file keep working.export type { CreateConfigValues } from "@paperclipai/adapter-utils";import type { CreateConfigValues } from "@paperclipai/adapter-utils";+import { Badge } from "@/components/ui/badge";/* ---- Props ---- */@@ -1871,9 +1872,9 @@ function ModelDropdown({<span className="block w-full text-left truncate font-mono text-xs" title={value}>{models.find((m) => m.id === value)?.label ?? value}</span>- <span className="shrink-0 ml-auto text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-green-500/15 text-green-400 border border-green-500/20">+ <Badge variant="outline" className="ml-auto text-(length:--text-nano) px-1.5 bg-green-500/15 text-green-400 border-green-500/20">current- </span>+ </Badge></button>)}{detectedModel && detectedModel !== value && (@@ -1890,9 +1891,9 @@ function ModelDropdown({<span className="block w-full text-left truncate font-mono text-xs" title={detectedModel}>{models.find((m) => m.id === detectedModel)?.label ?? detectedModel}</span>- <span className="shrink-0 ml-auto text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-blue-500/15 text-blue-400 border border-blue-500/20">+ <Badge variant="outline" className="ml-auto text-(length:--text-nano) px-1.5 bg-blue-500/15 text-blue-400 border-blue-500/20">detected- </span>+ </Badge></button>)}{detectedModelCandidates@@ -1914,9 +1915,9 @@ function ModelDropdown({<span className="block w-full text-left truncate font-mono text-xs" title={candidate}>{entry?.label ?? candidate}</span>- <span className="shrink-0 ml-auto text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-sky-500/15 text-sky-400 border border-sky-500/20">+ <Badge variant="outline" className="ml-auto text-(length:--text-nano) px-1.5 bg-sky-500/15 text-sky-400 border-sky-500/20">config- </span>+ </Badge></button>);})}diff --git a/ui/src/components/ApprovalCard.tsx b/ui/src/components/ApprovalCard.tsxindex 0eb6cab476..abfe67cae0 100644--- a/ui/src/components/ApprovalCard.tsx+++ b/ui/src/components/ApprovalCard.tsx@@ -13,6 +13,7 @@ import {import { timeAgo } from "../lib/timeAgo";import type { Approval, Agent } from "@paperclipai/shared";import { cn } from "@/lib/utils";+import { Card } from "@/components/ui/card";function statusIcon(status: string) {if (status === "approved") return <CheckCircle2 className="h-3.5 w-3.5 text-green-600 dark:text-green-400" />;@@ -52,7 +53,7 @@ export function ApprovalCard({const hasFooter = showResolutionButtons || Boolean(detailLink || onOpen);return (- <div className="rounded-xl border border-border/70 bg-card p-4 shadow-sm">+ <Card className="block border-border/70 p-4"><div className="flex items-start justify-between gap-4"><div className="min-w-0 flex-1"><div className="flex items-start gap-3">@@ -147,6 +148,6 @@ export function ApprovalCard({) : null}</div>) : null}- </div>+ </Card>);}diff --git a/ui/src/components/ArtifactsPanel.tsx b/ui/src/components/ArtifactsPanel.tsxindex afa8778941..f5a058b4ba 100644--- a/ui/src/components/ArtifactsPanel.tsx+++ b/ui/src/components/ArtifactsPanel.tsx@@ -21,6 +21,7 @@ import {RotateCcw,} from "lucide-react";import { Button } from "@/components/ui/button";+import { Badge } from "@/components/ui/badge";interface ArtifactsPanelProps {taskId: string;@@ -212,14 +213,14 @@ export function ArtifactsPanel({ taskId, isAgentWorking, openDocKey, openDocTitl{wp.type.replace(/_/g, " ")}</span>{showGenerating ? (- <span className="inline-flex items-center gap-1 text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400">+ <Badge variant="ghost" className="[&>svg]:size-2.5 text-(length:--text-nano) px-1.5 bg-blue-500/10 text-blue-600 dark:text-blue-400"><Loader2 className="h-2.5 w-2.5 animate-spin" />Generating...- </span>+ </Badge>) : (- <span className={cn("text-(length:--text-nano) font-medium px-1.5 py-0.5 rounded-full", badge.className)}>+ <Badge variant="ghost" className={cn("text-(length:--text-nano) px-1.5", badge.className)}>{badge.label}- </span>+ </Badge>)}</div>{wp.summary && (diff --git a/ui/src/components/BlockedInboxView.tsx b/ui/src/components/BlockedInboxView.tsxindex a8408ad28e..871f537324 100644--- a/ui/src/components/BlockedInboxView.tsx+++ b/ui/src/components/BlockedInboxView.tsx@@ -23,6 +23,7 @@ import { IssueRow } from "./IssueRow";import { Identity } from "./Identity";import { StatusIcon } from "./StatusIcon";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";interface BlockedInboxViewProps {companyId: string;@@ -172,9 +173,9 @@ export function BlockedInboxView({if (allRows.length === 0) {return (- <div+ <Carddata-testid="blocked-inbox-empty"- className="flex flex-col items-center gap-3 rounded-lg border border-border/70 bg-card/40 px-6 py-10 text-center"+ className="items-center gap-3 border-border/70 bg-card/40 px-6 py-10 text-center"><span className="inline-flex h-10 w-10 items-center justify-center rounded-full bg-emerald-100 text-emerald-700 dark:bg-emerald-500/15 dark:text-emerald-300"><CheckCircle2 className="h-5 w-5" aria-hidden="true" />@@ -185,19 +186,19 @@ export function BlockedInboxView({Tasks that need a decision, recovery, or external action will appear here.</p></div>- </div>+ </Card>);}if (groups.length === 0) {return (<div className="space-y-3">- <div+ <Carddata-testid="blocked-inbox-no-search-results"- className="rounded-lg border border-border/70 bg-card/40 px-4 py-6 text-center text-sm text-muted-foreground"+ className="block border-border/70 bg-card/40 px-4 py-6 text-center text-sm text-muted-foreground">No stopped items match your search.- </div>+ </Card></div>);}diff --git a/ui/src/components/BootstrapPendingPage.tsx b/ui/src/components/BootstrapPendingPage.tsxindex 659ad5723c..51d2fc7ce3 100644--- a/ui/src/components/BootstrapPendingPage.tsx+++ b/ui/src/components/BootstrapPendingPage.tsx@@ -4,6 +4,7 @@ import { Link } from "@/lib/router";import { Button } from "@/components/ui/button";import { BOOTSTRAP_FALLBACK_COMMAND } from "@/bootstrapSetup";import type { AuthSession } from "@paperclipai/shared";+import { Card } from "@/components/ui/card";type BootstrapPendingPageProps = {claimAvailable: boolean;@@ -36,7 +37,7 @@ function CliFallback({ hasActiveInvite = false }: { hasActiveInvite?: boolean })function StateChrome({ children }: { children: ReactNode }) {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">{children}</div>+ <Card className="block p-6">{children}</Card></div>);}diff --git a/ui/src/components/CloudAccessGate.tsx b/ui/src/components/CloudAccessGate.tsxindex 0ec4592676..762eba5c67 100644--- a/ui/src/components/CloudAccessGate.tsx+++ b/ui/src/components/CloudAccessGate.tsx@@ -6,11 +6,12 @@ import { authApi } from "@/api/auth";import { healthApi } from "@/api/health";import { queryKeys } from "@/lib/queryKeys";import { BootstrapPendingPage } from "@/components/BootstrapPendingPage";+import { Card } from "@/components/ui/card";function NoBoardAccessPage() {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-xl font-semibold">No company access</h1><p className="mt-2 text-sm text-muted-foreground">This account is signed in, but it does not have an active company membership or instance-admin access on@@ -19,7 +20,7 @@ function NoBoardAccessPage() {<p className="mt-2 text-sm text-muted-foreground">Use a company invite or sign in with an account that already belongs to this org.</p>- </div>+ </Card></div>);}diff --git a/ui/src/components/CommentThread.tsx b/ui/src/components/CommentThread.tsxindex 9836380e42..2eda8b8694 100644--- a/ui/src/components/CommentThread.tsx+++ b/ui/src/components/CommentThread.tsx@@ -374,9 +374,9 @@ function CommentCard({)}<span className="flex items-center gap-1.5">{isQueued ? (- <span className="inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">+ <Badge variant="outline" className="border-amber-400/60 bg-amber-100/70 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">Queued- </span>+ </Badge>) : null}{followUpRequested ? (<Badge variant="outline" className="text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow)">diff --git a/ui/src/components/DevRestartBanner.tsx b/ui/src/components/DevRestartBanner.tsxindex 10192406b8..954e2fadf0 100644--- a/ui/src/components/DevRestartBanner.tsx+++ b/ui/src/components/DevRestartBanner.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from "react";import { AlertTriangle, RotateCcw, TimerReset } from "lucide-react";import { healthApi, type DevServerHealthStatus } from "../api/health";+import { Badge } from "@/components/ui/badge";const RESTART_PENDING_RESET_MS = 30_000;@@ -72,9 +73,9 @@ export function DevRestartBanner({ devServer }: { devServer?: DevServerHealthSta<AlertTriangle className="h-3.5 w-3.5 shrink-0" /><span>Restart Required</span>{devServer.autoRestartEnabled ? (- <span className="rounded-full bg-amber-900/10 px-2 py-0.5 text-(length:--text-nano) tracking-(--tracking-eyebrow) dark:bg-amber-100/10">+ <Badge variant="ghost" className="bg-amber-900/10 text-(length:--text-nano) tracking-(--tracking-eyebrow) dark:bg-amber-100/10">Auto-Restart On- </span>+ </Badge>) : null}</div><p className="mt-1 text-sm">diff --git a/ui/src/components/DocumentDiffModal.tsx b/ui/src/components/DocumentDiffModal.tsxindex b9543c3ee4..8c406749bb 100644--- a/ui/src/components/DocumentDiffModal.tsx+++ b/ui/src/components/DocumentDiffModal.tsx@@ -11,6 +11,7 @@ import {DialogHeader,DialogTitle,} from "@/components/ui/dialog";+import { Badge } from "@/components/ui/badge";import {Select,SelectContent,@@ -95,7 +96,7 @@ export function DocumentDiffModal({<div className="flex items-center gap-4 shrink-0"><div className="flex items-center gap-2">- <span className="rounded-full border border-red-500/30 bg-red-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wider text-red-400">Old</span>+ <Badge variant="outline" className="border-red-500/30 bg-red-500/10 text-(length:--text-nano) uppercase tracking-wider text-red-400">Old</Badge><Selectvalue={effectiveLeftId ?? ""}onValueChange={(value) => setLeftRevisionId(value)}@@ -113,7 +114,7 @@ export function DocumentDiffModal({</Select></div><div className="flex items-center gap-2">- <span className="rounded-full border border-green-500/30 bg-green-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wider text-green-400">New</span>+ <Badge variant="outline" className="border-green-500/30 bg-green-500/10 text-(length:--text-nano) uppercase tracking-wider text-green-400">New</Badge><Selectvalue={effectiveRightId ?? ""}onValueChange={(value) => setRightRevisionId(value)}diff --git a/ui/src/components/DocumentFrameHeader.tsx b/ui/src/components/DocumentFrameHeader.tsxindex 1aaa052c0d..5ba3e9dbe6 100644--- a/ui/src/components/DocumentFrameHeader.tsx+++ b/ui/src/components/DocumentFrameHeader.tsx@@ -2,6 +2,7 @@ import type { ReactNode } from "react";import { ChevronDown, ChevronRight } from "lucide-react";import { cn, relativeTime } from "../lib/utils";import { Button } from "@/components/ui/button";+import { Badge } from "@/components/ui/badge";import {DropdownMenu,DropdownMenuContent,@@ -74,14 +75,14 @@ export function DocumentFrameHeader({{documentLabel ? (<><span className="truncate text-sm font-semibold text-foreground">{documentLabel}</span>- <span className="shrink-0 rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">{documentKey}- </span>+ </Badge></>) : (- <span className="shrink-0 rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">{documentKey}- </span>+ </Badge>)}{sourceTrustSlot}{revisionMenu ? (@@ -118,9 +119,9 @@ export function DocumentFrameHeader({<div className="flex items-center gap-2"><span className="font-medium">rev {revision.revisionNumber}</span>{isCurrentRevision ? (- <span className="rounded-full border border-border px-1.5 py-0.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Current- </span>+ </Badge>) : null}</div><span className="text-xs text-muted-foreground">diff --git a/ui/src/components/ExternalObjectStatusSummary.tsx b/ui/src/components/ExternalObjectStatusSummary.tsxindex ead5f1da36..45aa181c11 100644--- a/ui/src/components/ExternalObjectStatusSummary.tsx+++ b/ui/src/components/ExternalObjectStatusSummary.tsx@@ -44,6 +44,8 @@ function buildBreakdownTitle(summary: ExternalObjectSummary): string {* the dominant severity icon plus a count badge. Hidden when there are zero* external objects or every object is in a muted tone.*/+// design-allow(pill-pattern): COMPONENT-INVENTORY §5.1 — external-object status is a deliberately+// separate status-presentation family; not a Badge.export function ExternalObjectStatusSummary({summary,compact,diff --git a/ui/src/components/FeedCard.tsx b/ui/src/components/FeedCard.tsxindex 0bcda8af40..099071969a 100644--- a/ui/src/components/FeedCard.tsx+++ b/ui/src/components/FeedCard.tsx@@ -22,6 +22,7 @@ import {Target,} from "lucide-react";import type { LucideIcon } from "lucide-react";+import { Card } from "@/components/ui/card";/* ------------------------------------------------------------------ *//* Canonical verb table — one verb per action, used on every card. */@@ -433,10 +434,10 @@ export function FeedCard({const mutedTextHover = isMuted ? "" : "group-hover:text-white";const card = (- <div+ <Carddata-fc="card"className={cn(- "group ml-3 mr-3 md:ml-0 my-2 flex items-center gap-2 rounded-lg border bg-card p-(--sz-18px) text-xs",+ "flex-row group ml-3 mr-3 md:ml-0 my-2 items-center gap-2 p-(--sz-18px) text-xs","transition-(--tp-background-color-border-color) duration-150",content.link && "cursor-pointer hover:bg-accent hover:border-muted-foreground/30",className,@@ -472,7 +473,7 @@ export function FeedCard({<span data-fc="time" className="shrink-0 text-muted-foreground">{timeAgo(event.createdAt)}</span>- </div>+ </Card>);if (content.link) {diff --git a/ui/src/components/FileTree.tsx b/ui/src/components/FileTree.tsxindex 650a50ad38..4e7a00f768 100644--- a/ui/src/components/FileTree.tsx+++ b/ui/src/components/FileTree.tsx@@ -12,6 +12,7 @@ import {import { statusBadge, statusBadgeDefault } from "../lib/status-colors";import { Button } from "./ui/button";import { Skeleton } from "./ui/skeleton";+import { Badge } from "@/components/ui/badge";// -- Tree types --------------------------------------------------------------@@ -357,14 +358,14 @@ export function FileTree({className="flex min-h-9 items-center justify-between gap-3 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm"><div className="flex min-w-0 items-center gap-2">- <span+ <Badge variant="ghost"className={cn(- "inline-flex shrink-0 items-center rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap",+ "px-2.5",statusBadge.error ?? statusBadgeDefault,)}>error- </span>+ </Badge><span className="min-w-0 text-destructive">{error.message}</span></div>{error.retry && (@@ -464,15 +465,15 @@ export function FileTree({</span></span>{badge && (- <span+ <Badge variant="ghost"className={cn(- "ml-3 shrink-0 rounded-full px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wide",+ "ml-3 text-(length:--text-nano) uppercase tracking-wide",statusBadge[badge.status] ?? statusBadgeDefault,)}title={badge.tooltip}>{badge.label}- </span>+ </Badge>)}{node.kind === "file" && renderFileExtra?.(node, allChecked)}{node.kind === "dir" && (diff --git a/ui/src/components/IssueAttachmentsSection.tsx b/ui/src/components/IssueAttachmentsSection.tsxindex c68fee2781..8f7b934823 100644--- a/ui/src/components/IssueAttachmentsSection.tsx+++ b/ui/src/components/IssueAttachmentsSection.tsx@@ -18,6 +18,7 @@ import {} from "@/lib/issue-attachments";import { queryKeys } from "@/lib/queryKeys";import { cn } from "@/lib/utils";+import { Card } from "@/components/ui/card";interface IssueAttachmentsSectionProps {attachments: IssueAttachment[];@@ -157,7 +158,7 @@ function VideoAttachmentCard({}) {const filename = attachmentFilename(attachment);return (- <div id={`attachment-${attachment.id}`} className="scroll-mt-20 overflow-hidden rounded-md border border-border bg-card">+ <Card id={`attachment-${attachment.id}`} className="block scroll-mt-20 overflow-hidden py-0"><OutputVideoPlayer src={attachment.contentPath} title={filename} /><div className="flex flex-col gap-2 p-3 md:flex-row md:items-center md:justify-between"><div className="min-w-0">@@ -171,7 +172,7 @@ function VideoAttachmentCard({onPreview={onPreview}/></div>- </div>+ </Card>);}@@ -186,7 +187,7 @@ function GenericAttachmentRow({}) {const filename = attachmentFilename(attachment);return (- <div id={`attachment-${attachment.id}`} className="flex scroll-mt-20 items-center gap-2.5 rounded-md border border-border bg-card p-2">+ <Card id={`attachment-${attachment.id}`} className="flex-row scroll-mt-20 items-center gap-2.5 p-2"><OutputFileTile contentType={attachment.contentType} /><div className="min-w-0 flex-1"><a@@ -203,7 +204,7 @@ function GenericAttachmentRow({</p></div><AttachmentActions attachment={attachment} onDelete={onDelete} deletePending={deletePending} />- </div>+ </Card>);}diff --git a/ui/src/components/IssueBlockedNotice.tsx b/ui/src/components/IssueBlockedNotice.tsxindex 8e9203e1ee..cdca17cd22 100644--- a/ui/src/components/IssueBlockedNotice.tsx+++ b/ui/src/components/IssueBlockedNotice.tsx@@ -14,6 +14,7 @@ import { useRetryNowMutation } from "../hooks/useRetryNowMutation";import { IssueLinkQuicklook } from "./IssueLinkQuicklook";import { RetryErrorBand } from "./IssueScheduledRetryCard";import { isAssignedBacklogBlocker } from "../lib/issue-blockers";+import { Badge } from "@/components/ui/badge";import {deriveActiveRecoveryDisplayState,RECOVERY_CHIP_DEFAULT_TONE,@@ -27,18 +28,18 @@ function BlockerRecoveryIndicator({ action }: { action: IssueRecoveryAction }) {const Icon = tone.icon;const label = recoveryChipLabel(state, action.kind);return (- <span+ <Badge variant="outline"data-testid="issue-blocked-notice-recovery-indicator"data-recovery-state={state}data-recovery-kind={action.kind}role="status"aria-label={label}title={`${label} — open the source task to act.`}- className={`inline-flex shrink-0 items-center gap-0.5 rounded-full border px-1.5 py-0.5 text-(length:--text-nano) font-medium ${tone.className}`}+ className={`[&>svg]:size-2.5 gap-0.5 px-1.5 text-(length:--text-nano) ${tone.className}`}><Icon className="h-2.5 w-2.5" aria-hidden />{label}- </span>+ </Badge>);}diff --git a/ui/src/components/IssueChatThread.tsx b/ui/src/components/IssueChatThread.tsxindex a2067c4574..04f2199df3 100644--- a/ui/src/components/IssueChatThread.tsx+++ b/ui/src/components/IssueChatThread.tsx@@ -76,6 +76,7 @@ import {type IssueTimelineWorkspace,} from "../lib/issue-timeline-events";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { Badge } from "@/components/ui/badge";import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";import {@@ -647,20 +648,20 @@ function IssueChatFallbackThread({</div>{messages.length === 0 ? (- <div className={cn(- "text-center text-sm text-muted-foreground",+ <Card className={cn(+ "block shadow-none text-center text-sm text-muted-foreground",variant === "embedded"- ? "rounded-xl border border-dashed border-border/70 bg-background/60 px-4 py-6"- : "rounded-2xl border border-dashed border-border bg-card px-6 py-10",+ ? "border-dashed border-border/70 bg-background/60 px-4 py-6"+ : "border-dashed px-6 py-10",)}>{emptyMessage}- </div>+ </Card>) : (<div className={cn(variant === "embedded" ? "space-y-3" : "space-y-4")}>{messages.map((message) => {const lines = fallbackTextParts(message);return (- <div key={message.id} className="rounded-xl border border-border/60 bg-card/70 px-4 py-3">+ <Card key={message.id} className="block border-border/60 bg-card/70 px-4 py-3"><div className="mb-2 flex items-center gap-2 text-sm"><span className="font-medium text-foreground">{fallbackAuthorLabel(message)}</span>{message.createdAt ? (@@ -678,7 +679,7 @@ function IssueChatFallbackThread({<p className="text-sm text-muted-foreground">No message content.</p>)}</div>- </div>+ </Card>);})}</div>@@ -1467,9 +1468,9 @@ function IssueChatUserMessage({>{queued ? (<div className="mb-1.5 flex items-center gap-2">- <span className="inline-flex items-center rounded-full border border-amber-400/60 bg-amber-100/70 px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">+ <Badge variant="outline" className="border-amber-400/60 bg-amber-100/70 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:border-amber-400/40 dark:bg-amber-500/20 dark:text-amber-200">{queueBadgeLabel}- </span>+ </Badge>{queueTargetRunId && onInterruptQueued ? (<Buttonsize="sm"@@ -1909,15 +1910,15 @@ function IssueChatAssistantMessage({{isRunning ? (// Gallery feedback r1: running chip uses the canonical brand blue// (brandChipBadge.blue), not cyan; layout/size classes unchanged.- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-(--tracking-eyebrow)",+ "text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow)",brandChipBadge.blue,)}><Loader2 className="h-3 w-3 animate-spin" />Running- </span>+ </Badge>) : null}</div>)}@@ -4840,14 +4841,14 @@ export function IssueChatThread({className={variant === "embedded" ? "space-y-3" : "space-y-4"}>{messages.length === 0 ? (- <div className={cn(- "text-center text-sm text-muted-foreground",+ <Card className={cn(+ "block shadow-none text-center text-sm text-muted-foreground",variant === "embedded"- ? "rounded-xl border border-dashed border-border/70 bg-background/60 px-4 py-6"- : "rounded-2xl border border-dashed border-border bg-card px-6 py-10",+ ? "border-dashed border-border/70 bg-background/60 px-4 py-6"+ : "border-dashed px-6 py-10",)}>{resolvedEmptyMessage}- </div>+ </Card>) : messages.length >= VIRTUALIZED_THREAD_ROW_THRESHOLD ? (<VirtualizedIssueChatThreadListref={virtualizedThreadRef}diff --git a/ui/src/components/IssueColumns.tsx b/ui/src/components/IssueColumns.tsxindex ab76ae10a9..5f1f328d3d 100644--- a/ui/src/components/IssueColumns.tsx+++ b/ui/src/components/IssueColumns.tsx@@ -19,6 +19,7 @@ import { cn } from "../lib/utils";import { timeAgo } from "../lib/timeAgo";import { Identity } from "./Identity";import { StatusIcon } from "./StatusIcon";+import { Badge } from "@/components/ui/badge";export const issueTrailingColumns: InboxIssueColumn[] = ["assignee", "kickedOffBy", "project", "workspace", "parent", "labels", "updated"];@@ -173,9 +174,9 @@ export function InboxIssueMetaLeading({</span>) : null}{isLive && (- <span+ <Badge variant="ghost"className={cn(- "inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 sm:gap-1.5 sm:px-2",+ "px-1.5 sm:gap-1.5 sm:px-2","bg-blue-500/10",)}>@@ -196,12 +197,12 @@ export function InboxIssueMetaLeading({>Live</span>- </span>+ </Badge>)}{showSubtreeLiveChip && !isLive && subtreeLiveCount > 0 && (- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 sm:gap-1.5 sm:px-2",+ "px-1.5 sm:gap-1.5 sm:px-2","border-border bg-transparent",)}title={`${subtreeLiveCount} sub-task${subtreeLiveCount === 1 ? "" : "s"} running below`}@@ -216,7 +217,7 @@ export function InboxIssueMetaLeading({<span className="hidden text-(length:--text-micro) font-medium text-muted-foreground sm:inline">{subtreeLiveCount} live below</span>- </span>+ </Badge>)}</>);@@ -388,9 +389,9 @@ export function InboxIssueTrailingColumns({return (<span key={column} className="flex min-w-0 items-center gap-1 overflow-hidden">{(issue.labels ?? []).slice(0, 2).map((label) => (- <span+ <Badge variant="outline"key={label.id}- className="inline-flex min-w-0 max-w-full shrink-0 items-center rounded-full border px-1.5 py-0 text-(length:--text-nano) font-medium"+ className="min-w-0 max-w-full px-1.5 py-0 text-(length:--text-nano)"style={{borderColor: label.color,color: pickTextColorForPillBg(label.color, 0.12),@@ -398,7 +399,7 @@ export function InboxIssueTrailingColumns({}}><span className="truncate">{label.name}</span>- </span>+ </Badge>))}{(issue.labels ?? []).length > 2 ? (<span className="shrink-0 text-(length:--text-nano) font-medium text-muted-foreground">diff --git a/ui/src/components/IssueContinuationHandoff.tsx b/ui/src/components/IssueContinuationHandoff.tsxindex 431b0a0cb6..e7124bcee4 100644--- a/ui/src/components/IssueContinuationHandoff.tsx+++ b/ui/src/components/IssueContinuationHandoff.tsx@@ -5,6 +5,7 @@ import { Button } from "@/components/ui/button";import { cn, relativeTime } from "../lib/utils";import { MarkdownBody, type MarkdownExternalReferenceMap } from "./MarkdownBody";import { Check, ChevronDown, ChevronRight, Copy, History } from "lucide-react";+import { Badge } from "@/components/ui/badge";type IssueContinuationHandoffProps = {document: IssueDocument | null | undefined;@@ -77,9 +78,9 @@ export function IssueContinuationHandoff({<div className="min-w-0 flex-1"><div className="flex flex-wrap items-center gap-2"><span className="text-sm font-medium text-foreground">{title}</span>- <span className="rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase text-muted-foreground">+ <Badge variant="outline" className="border-border font-mono text-(length:--text-nano) uppercase text-muted-foreground">handoff- </span>+ </Badge></div><div className="text-(length:--text-micro) text-muted-foreground">Updated {relativeTime(document.updatedAt)}diff --git a/ui/src/components/IssueDocumentsSection.tsx b/ui/src/components/IssueDocumentsSection.tsxindex 42688138dc..6628b976b0 100644--- a/ui/src/components/IssueDocumentsSection.tsx+++ b/ui/src/components/IssueDocumentsSection.tsx@@ -36,6 +36,7 @@ import { Check, Copy, Diff, Download, FilePenLine, FileText, Lock, MoreHorizontaimport { DocumentDiffModal } from "./DocumentDiffModal";import { DocumentFrameHeader } from "./DocumentFrameHeader";import { SourceTrustBadge } from "./SourceTrustBadge";+import { Badge } from "@/components/ui/badge";type DraftState = {key: string;@@ -881,9 +882,9 @@ export function IssueDocumentsSection({><div className="mb-2 flex items-center gap-2"><FileText className="h-4 w-4 text-amber-600" />- <span className="rounded-full border border-amber-500/30 px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-700 dark:text-amber-300">+ <Badge variant="outline" className="border-amber-500/30 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-700 dark:text-amber-300">PLAN- </span>+ </Badge></div><div className={documentBodyPaddingClassName}>{renderFoldableBody(issue.legacyPlanDocument.body, documentBodyContentClassName, externalReferences)}diff --git a/ui/src/components/IssuePlanDecompositionsSection.tsx b/ui/src/components/IssuePlanDecompositionsSection.tsxindex cf7e3577cd..45cddff037 100644--- a/ui/src/components/IssuePlanDecompositionsSection.tsx+++ b/ui/src/components/IssuePlanDecompositionsSection.tsx@@ -85,6 +85,7 @@ export function IssuePlanDecompositionsSection({return (<likey={record.id}+ // design-allow(card-pattern): semantic <li> row inside a <ul>; Card renders a div (C5a Run 3)className="rounded-md border border-border bg-card/50 p-3 text-sm"><div className="flex flex-wrap items-center gap-2">diff --git a/ui/src/components/IssueRecoveryActionCard.tsx b/ui/src/components/IssueRecoveryActionCard.tsxindex 8df5c7385d..adb4ef8152 100644--- a/ui/src/components/IssueRecoveryActionCard.tsx+++ b/ui/src/components/IssueRecoveryActionCard.tsx@@ -28,6 +28,7 @@ import {import { Textarea } from "@/components/ui/textarea";import { agentUrl } from "@/lib/utils";import { cn } from "@/lib/utils";+import { Badge } from "@/components/ui/badge";import {deriveRecoveryDisplayState,type RecoveryDisplayState,@@ -354,15 +355,15 @@ function DivergenceDiagnosis({<span className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Divergence diagnosis</span>- <span+ <Badge variant="outline"data-testid="recovery-ancestry-verdict"className={cn(- "inline-flex items-center rounded-full border px-2 py-0.5 text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-label)",+ "text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-label)",badge.className,)}>{badge.label}- </span>+ </Badge></div><div className="grid gap-2 sm:grid-cols-2"><BranchFacet@@ -424,17 +425,17 @@ function BreakGlassOverride({align="start"sideOffset={6}aria-labelledby="recovery-breakglass-title"- className="w-96 max-w-[calc(100vw-2rem)] space-y-3 p-3"+ className="w-96 max-w-(--sz-calc-4) space-y-3 p-3"><div className="space-y-1"><divid="recovery-breakglass-title"- className="flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-[0.12em] text-red-700 dark:text-red-300"+ className="flex items-center gap-1.5 text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-eyebrow) text-red-700 dark:text-red-300"><OctagonAlert className="h-3.5 w-3.5" aria-hidden />Break-glass reconciliation</div>- <p className="text-[12px] leading-5 text-muted-foreground">+ <p className="text-xs leading-5 text-muted-foreground">This overrides Paperclip's safety check and points the recorded workspace at the livebranch{" "}<span className="font-medium text-foreground/80">without an ancestry proof</span>. Confirm@@ -443,7 +444,7 @@ function BreakGlassOverride({</div><dldata-testid="recovery-breakglass-restated-divergence"- className="space-y-1.5 rounded-md border border-red-400/40 bg-red-500/5 px-2.5 py-2 text-[11px]"+ className="space-y-1.5 rounded-md border border-red-400/40 bg-red-500/5 px-2.5 py-2 text-(length:--text-micro)"><div className="flex items-center justify-between gap-2"><dt className="shrink-0 text-muted-foreground">Recorded · expected</dt>@@ -465,7 +466,7 @@ function BreakGlassOverride({</div></dl><div className="space-y-1">- <Label htmlFor="recovery-breakglass-reason" className="text-[11px] text-muted-foreground">+ <Label htmlFor="recovery-breakglass-reason" className="text-(length:--text-micro) text-muted-foreground">Reason <span className="text-red-600 dark:text-red-400">(required — recorded in the audit log)</span></Label><Textarea@@ -473,7 +474,7 @@ function BreakGlassOverride({value={reason}onChange={(event) => setReason(event.target.value)}placeholder="e.g. Verified the live branch carries only the intended follow-up commits; safe to adopt."- className="min-h-20 text-[12px]"+ className="min-h-20 text-xs"data-testid="recovery-breakglass-reason"aria-required="true"/>diff --git a/ui/src/components/IssueRelatedWorkPanel.tsx b/ui/src/components/IssueRelatedWorkPanel.tsxindex c194663aa3..90b998c57b 100644--- a/ui/src/components/IssueRelatedWorkPanel.tsx+++ b/ui/src/components/IssueRelatedWorkPanel.tsx@@ -3,6 +3,7 @@ import { IssueReferencePill } from "./IssueReferencePill";import { ExternalObjectPill } from "./ExternalObjectPill";import type { IssueExternalObjectGroup } from "../hooks/useIssueExternalObjects";import { externalObjectToneSeverity } from "../lib/external-objects";+import { Badge } from "@/components/ui/badge";type GroupedSource = {label: string;@@ -65,16 +66,16 @@ function Section({) : null}<div className="flex flex-wrap items-center gap-1.5">{groupedSources.map((group) => (- <span+ <Badge variant="outline"key={`${item.issue.id}:${group.label}`}- className="inline-flex items-center gap-1 rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground"+ className="border-border bg-muted/40 text-muted-foreground"title={group.sampleMatchedText ?? undefined}><span>{group.label}</span>{group.count > 1 ? (<span className="tabular-nums text-(length:--text-nano) font-medium opacity-80">×{group.count}</span>) : null}- </span>+ </Badge>))}</div></li>@@ -152,12 +153,12 @@ function ExternalObjectsSection({) : null}<div className="flex flex-wrap items-center gap-1.5">{sourceLabels.map((label) => (- <span+ <Badge variant="outline"key={`${object?.id ?? pill.url ?? label}:${label}`}- className="inline-flex items-center gap-1 rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground"+ className="border-border bg-muted/40 text-muted-foreground"><span>{label}</span>- </span>+ </Badge>))}</div></li>diff --git a/ui/src/components/IssueRow.test.tsx b/ui/src/components/IssueRow.test.tsxindex 28a2ce6e87..85255d5930 100644--- a/ui/src/components/IssueRow.test.tsx+++ b/ui/src/components/IssueRow.test.tsx@@ -85,7 +85,7 @@ describe("IssueRow", () => {container.remove();});- it("renders the list status glyph at lg (20px)", () => {+ it("renders the list status glyph at md (16px)", () => {const root = createRoot(container);act(() => {@@ -95,8 +95,8 @@ describe("IssueRow", () => {const glyphs = container.querySelectorAll('svg[viewBox="0 0 24 24"]');expect(glyphs.length).toBeGreaterThan(0);glyphs.forEach((glyph) => {- expect(glyph.getAttribute("width")).toBe("20");- expect(glyph.getAttribute("height")).toBe("20");+ expect(glyph.getAttribute("width")).toBe("16");+ expect(glyph.getAttribute("height")).toBe("16");});act(() => {diff --git a/ui/src/components/IssueRow.tsx b/ui/src/components/IssueRow.tsxindex 412bbb7ee7..80e3a0eb0d 100644--- a/ui/src/components/IssueRow.tsx+++ b/ui/src/components/IssueRow.tsx@@ -17,6 +17,7 @@ import { StatusIcon } from "./StatusIcon";import { productivityReviewTriggerLabel } from "./ProductivityReviewBadge";import { hasAssignedBacklogBlocker } from "../lib/issue-blockers";import { ExternalObjectStatusSummary } from "./ExternalObjectStatusSummary";+import { Badge } from "@/components/ui/badge";type UnreadState = "hidden" | "visible" | "fading";@@ -46,6 +47,12 @@ interface IssueRowProps {onArchive?: () => void;archiveDisabled?: boolean;className?: string;+ /** Pointer entered the row (used by list keyboard nav to track hover). */+ onMouseEnter?: () => void;+ /** Ancestor levels; renders that many vertical tree-guide slots (desktop). */+ treeGuides?: number;+ /** Suppress the row divider (parents with expanded children keep visual attachment to their subtree). */+ hideDivider?: boolean;}export function IssueRow({@@ -70,6 +77,9 @@ export function IssueRow({onArchive,archiveDisabled,className,+ onMouseEnter,+ treeGuides = 0,+ hideDivider = false,}: IssueRowProps) {const issuePathId = issue.identifier ?? issue.id;const identifier = issue.identifier ?? issue.id.slice(0, 8);@@ -99,14 +109,14 @@ export function IssueRow({const recoveryAction = issue.activeRecoveryAction ?? null;const recoveryIndicator = recoveryAction ? renderRecoveryChip(recoveryAction, selected) : null;const parkedBlockerIndicator = hasAssignedBacklogBlocker(issue.blockedBy) ? (- <span+ <Badge variant="outline"data-testid="issue-row-parked-blocker"- className="ml-1.5 inline-flex shrink-0 items-center gap-0.5 rounded-full border border-amber-500/60 bg-amber-500/15 px-2 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300"+ className="[&>svg]:size-2.5 ml-1.5 gap-0.5 border-amber-500/60 bg-amber-500/15 text-(length:--text-nano) text-amber-700 dark:text-amber-300"title="Blocked by parked work — at least one assigned blocker is in backlog and will not wake its assignee."><Flag className="h-2.5 w-2.5" aria-hidden />Blocked by parked work- </span>+ </Badge>) : null;return (@@ -119,15 +129,17 @@ export function IssueRow({id={checklistRowId}aria-current={checklistCurrentStep ? "step" : undefined}onClickCapture={() => rememberIssueDetailLocationState(issuePathId, detailState)}+ onMouseEnter={onMouseEnter}className={cn(- "group flex items-start gap-2 border-b border-border py-2.5 pl-2 pr-3 text-sm no-underline text-inherit transition-colors last:border-b-0 sm:items-center sm:py-2 sm:pl-1",+ "group flex items-start gap-2 rounded-lg py-2.5 pl-2 pr-3 text-sm no-underline text-inherit transition-colors sm:items-center sm:py-2 sm:pl-1",+ !hideDivider && "border-b border-border last:border-b-0",selected ? "hover:bg-transparent" : "hover:bg-accent/50",checklistCurrentStep ? "border-l-2 border-l-primary bg-primary/5 pl-(--sz-calc-11) sm:pl-(--sz-calc-12)" : null,className,)}><span className="flex shrink-0 items-center gap-1 pt-px sm:hidden">- {mobileLeading ?? <StatusIcon status={issue.status} blockerAttention={issue.blockerAttention} size="lg" className={selectedStatusClass} />}+ {mobileLeading ?? <StatusIcon status={issue.status} blockerAttention={issue.blockerAttention} size="md" className={selectedStatusClass} />}{productivityReviewIndicator}{parkedBlockerIndicator}{recoveryIndicator}@@ -141,14 +153,30 @@ export function IssueRow({{checklistDependencyChips}</span>) : null}- <span className="flex items-center gap-2 sm:order-1 sm:shrink-0">+ <span className="flex items-center gap-2 self-stretch sm:order-1 sm:shrink-0">+ {treeGuides > 0+ ? Array.from({ length: treeGuides }, (_, level) => (+ // Tree guide: occupies the same flex slot as the parent's+ // chevron column so the line lands under the parent's status+ // column; stretched past the row padding so consecutive rows+ // read as one continuous line.+ <span key={`guide-${level}`} aria-hidden="true" className="relative hidden w-4 shrink-0 self-stretch sm:block">+ {/* bg-background underlay: dark-mode --border is translucent,+ so overlapping row segments would stack brighter without+ an opaque base. */}+ <span className="absolute -inset-y-3 left-1/2 w-px bg-background">+ <span className="absolute inset-0 bg-border" />+ </span>+ </span>+ ))+ : null}{desktopLeadingSpacer ? (<span className="hidden w-3.5 shrink-0 sm:block" />) : null}{desktopMetaLeading ?? (<><span className="hidden shrink-0 items-center gap-1 sm:inline-flex">- <StatusIcon status={issue.status} blockerAttention={issue.blockerAttention} size="lg" className={selectedStatusClass} />+ <StatusIcon status={issue.status} blockerAttention={issue.blockerAttention} size="md" className={selectedStatusClass} />{productivityReviewIndicator}</span>{checklistStep}@@ -249,14 +277,14 @@ function renderRecoveryChip(action: IssueRecoveryAction, selected: boolean): Reaconst Icon = tone.icon;const label = recoveryChipLabel(state, action.kind);return (- <span+ <Badge variant="outline"data-testid="issue-row-recovery-indicator"data-recovery-state={state}data-recovery-kind={action.kind}role="status"aria-label={label}className={cn(- "ml-1.5 inline-flex shrink-0 items-center gap-0.5 rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium",+ "ml-1.5 gap-0.5 text-(length:--text-nano)",tone.className,selected ? "!border-muted-foreground !text-muted-foreground" : null,)}@@ -264,6 +292,6 @@ function renderRecoveryChip(action: IssueRecoveryAction, selected: boolean): Rea><Icon className="h-2.5 w-2.5" aria-hidden />{label}- </span>+ </Badge>);}diff --git a/ui/src/components/IssueScheduledRetryCard.tsx b/ui/src/components/IssueScheduledRetryCard.tsxindex aeeb1802c9..46a7474245 100644--- a/ui/src/components/IssueScheduledRetryCard.tsx+++ b/ui/src/components/IssueScheduledRetryCard.tsx@@ -6,6 +6,7 @@ import { formatMonitorOffset } from "@/lib/issue-monitor";import { formatRetryReason } from "@/lib/runRetryState";import type { IssueScheduledRetry } from "@paperclipai/shared";import { useRetryNowMutation, type RetryNowError } from "../hooks/useRetryNowMutation";+import { Badge } from "@/components/ui/badge";const MAX_TURN_CONTINUATION = "max_turns_continuation";@@ -74,10 +75,10 @@ export function IssueScheduledRetryCard({<div className="flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between"><div className="min-w-0 flex-1"><div className="flex flex-wrap items-center gap-2 text-xs">- <span className="inline-flex items-center gap-1 rounded-full border border-blue-500/30 bg-blue-500/10 px-2 py-0.5 font-medium text-blue-700 dark:text-blue-300">+ <Badge variant="outline" className="border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300"><Clock className="h-3 w-3" aria-hidden="true" />{badgeLabel}- </span>+ </Badge>{attempt !== null ? (<span className="text-muted-foreground">Attempt {attempt}</span>) : null}diff --git a/ui/src/components/IssueSiblingNavigation.tsx b/ui/src/components/IssueSiblingNavigation.tsxindex 7585e94771..2eb80c8a10 100644--- a/ui/src/components/IssueSiblingNavigation.tsx+++ b/ui/src/components/IssueSiblingNavigation.tsx@@ -53,6 +53,7 @@ function SiblingLink({return (<Link+ // design-allow(card-pattern): navigation <Link> card; Card renders a div and would break anchor semantics (C5a Run 3)to={createIssueDetailPath(issuePathId)}state={withIssueDetailHeaderSeed(linkState, issue)}issuePrefetch={issue}diff --git a/ui/src/components/IssueThreadInteractionCard.tsx b/ui/src/components/IssueThreadInteractionCard.tsxindex bd37062467..65ddb6ba7f 100644--- a/ui/src/components/IssueThreadInteractionCard.tsx+++ b/ui/src/components/IssueThreadInteractionCard.tsx@@ -27,6 +27,7 @@ import { Checkbox } from "./ui/checkbox";import { PriorityIcon } from "./PriorityIcon";import { Textarea } from "./ui/textarea";import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip";+import { Badge } from "@/components/ui/badge";const OTHER_ANSWER_ID = "__paperclip_other__";@@ -842,10 +843,10 @@ function AskUserQuestionsCard({return (<div className="space-y-4"><div className="flex flex-wrap items-center gap-2 text-xs text-muted-foreground">- <span className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2.5 py-1 font-medium uppercase tracking-(--tracking-eyebrow) text-foreground/70">+ <Badge variant="outline" className="border-border/70 bg-background/70 px-2.5 py-1 uppercase tracking-(--tracking-eyebrow) text-foreground/70"><MessageSquareQuote className="h-3 w-3" />Ask user questions- </span>+ </Badge><span>{questions.length === 1? "1 question"@@ -1931,7 +1932,7 @@ export function IssueThreadInteractionCard({: null;return (- <div className={cn("rounded-sm border p-5 shadow-none", styles.shell)}>+ <div className={cn("rounded-lg border p-5 shadow-none", styles.shell)}><div className="flex flex-wrap items-start justify-between gap-4"><div className="min-w-0 flex-1 basis-64"><div className="flex flex-wrap items-center gap-2">diff --git a/ui/src/components/IssueWorkspaceCard.tsx b/ui/src/components/IssueWorkspaceCard.tsxindex a4a096c4f5..ad75baf88a 100644--- a/ui/src/components/IssueWorkspaceCard.tsx+++ b/ui/src/components/IssueWorkspaceCard.tsx@@ -16,6 +16,7 @@ import { cn, projectWorkspaceUrl } from "../lib/utils";import { Button } from "@/components/ui/button";import { Check, Copy, FileSearch, FolderOpen, FolderSearch, GitBranch, Pencil, X } from "lucide-react";import { ReusableExecutionWorkspaceSelect } from "./ReusableExecutionWorkspaceSelect";+import { Badge } from "@/components/ui/badge";/* -------------------------------------------------------------------------- *//* Utility helpers (mirrored from IssueProperties for self-containment) */@@ -144,9 +145,9 @@ function statusBadge(status: string) {archived: "bg-muted text-muted-foreground",};return (- <span className={cn("text-(length:--text-nano) px-1.5 py-0.5 rounded-full font-medium", colors[status] ?? colors.idle)}>+ <Badge variant="ghost" className={cn("text-(length:--text-nano) px-1.5", colors[status] ?? colors.idle)}>{status.replace(/_/g, " ")}- </span>+ </Badge>);}diff --git a/ui/src/components/IssuesList.test.tsx b/ui/src/components/IssuesList.test.tsxindex 1be7d87ff8..f04a618e4d 100644--- a/ui/src/components/IssuesList.test.tsx+++ b/ui/src/components/IssuesList.test.tsx@@ -56,6 +56,7 @@ vi.mock("../context/DialogContext", () => ({}));vi.mock("@/lib/router", () => ({+ useNavigate: () => vi.fn(),Link: ({children,to,@@ -1895,12 +1896,11 @@ describe("IssuesList", () => {});});- // PAP-246 (QA of PAP-245/PAP-243a): the desktop row status glyph must render- // at lg (20px). The earlier IssueRow unit test passed because it rendered- // IssueRow WITHOUT IssuesList's own leading slots, hitting the- // `?? <StatusIcon size="lg">` fallback — but the live list always supplies its- // own `statusSlot`. This asserts the real list-supplied slot is lg.- it("renders the desktop row status glyph at lg (20px)", async () => {+ // Run 3 review (Jul 8) reversed PAP-243's lg enlargement: task rows in the+ // list and inbox standardize on md (16px). The live list always supplies its+ // own `statusSlot` (the PAP-246 slot-override gotcha), so assert the real+ // slot size here.+ it("renders the desktop row status glyph at md (16px)", async () => {const { root } = renderWithQueryClient(<IssuesListissues={[createIssue({ status: "in_progress" })]}@@ -1914,14 +1914,14 @@ describe("IssuesList", () => {await waitForAssertion(() => {const glyphs = Array.from(container.querySelectorAll("svg")).filter(- (svg) => svg.getAttribute("width") === "20" && svg.getAttribute("height") === "20",+ (svg) => svg.getAttribute("width") === "16" && svg.getAttribute("height") === "16",);expect(glyphs.length).toBeGreaterThan(0);- // No 16px (md) status glyph should leak through from the list's slot.- const mdGlyphs = Array.from(container.querySelectorAll("svg")).filter(- (svg) => svg.getAttribute("width") === "16" && svg.getAttribute("height") === "16",+ // No 20px (lg) status glyph should leak through from the list's slot.+ const lgGlyphs = Array.from(container.querySelectorAll("svg")).filter(+ (svg) => svg.getAttribute("width") === "20" && svg.getAttribute("height") === "20",);- expect(mdGlyphs.length).toBe(0);+ expect(lgGlyphs.length).toBe(0);});act(() => {diff --git a/ui/src/components/IssuesList.tsx b/ui/src/components/IssuesList.tsxindex 2758ed98da..fb929288a3 100644--- a/ui/src/components/IssuesList.tsx+++ b/ui/src/components/IssuesList.tsx@@ -3,7 +3,7 @@ import { useQueries, useQuery } from "@tanstack/react-query";import { accessApi } from "../api/access";import { useDialogActions } from "../context/DialogContext";import { useCompany } from "../context/CompanyContext";-import { Link } from "@/lib/router";+import { Link, useNavigate } from "@/lib/router";import { executionWorkspacesApi } from "../api/execution-workspaces";import { issuesApi } from "../api/issues";import { authApi } from "../api/auth";@@ -16,7 +16,7 @@ import {} from "../lib/keyboardShortcuts";import { formatAssigneeUserLabel } from "../lib/assignees";import { buildCompanyUserLabelMap, buildCompanyUserProfileMap } from "../lib/company-members";-import { createIssueDetailPath, withIssueDetailHeaderSeed } from "../lib/issueDetailBreadcrumb";+import { createIssueDetailPath, rememberIssueDetailLocationState, withIssueDetailHeaderSeed } from "../lib/issueDetailBreadcrumb";import {buildSubIssueProgressSummary,shouldRenderSubIssueProgressSummary,@@ -62,7 +62,9 @@ import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover";import { Collapsible, CollapsibleContent } from "@/components/ui/collapsible";-import { CircleDot, Plus, ArrowUpDown, Layers, Check, ChevronRight, List, ListTree, Columns3, User, Search, CircleSlash2, ChevronsDownUp, PanelTopClose, RotateCcw, ListCollapse } from "lucide-react";+import { CircleDot, Plus, ArrowUpDown, Layers, Check, ChevronRight, List, ListTree, User, Search, CircleSlash2, ChevronsDownUp, PanelTopClose, RotateCcw, ListCollapse,+ SquareKanban,+} from "lucide-react";import {KanbanBoard,KANBAN_BOARD_HIGH_VOLUME_THRESHOLD,@@ -72,11 +74,15 @@ import {type KanbanColumnPageSize,} from "./KanbanBoard";import { buildIssueTree, countDescendants } from "../lib/issue-tree";+import { getInboxKeyboardSelectionIndex } from "../lib/inbox";+import { hasBlockingShortcutDialog, isKeyboardShortcutTextInputTarget } from "../lib/keyboardShortcuts";+import { useGeneralSettings } from "../context/GeneralSettingsContext";import { buildSubIssueDefaultsForViewer } from "../lib/subIssueDefaults";import { statusBadge } from "../lib/status-colors";import { workflowSort } from "../lib/workflow-sort";import { isSuccessfulRunHandoffRequired } from "../lib/successful-run-handoff";import { deriveOriginatingActor, ISSUE_STATUSES, type Issue, type IssueStatus, type Project } from "@paperclipai/shared";+import { Badge } from "@/components/ui/badge";const ISSUE_SEARCH_DEBOUNCE_MS = 250;const ISSUE_SEARCH_RESULT_LIMIT = 200;const ISSUE_BOARD_COLUMN_RESULT_LIMIT = 200;@@ -146,7 +152,7 @@ const defaultViewState: IssueViewState = {collapsedGroups: [],collapsedParents: [],boardCardDensity: "auto",- boardColdLaneMode: "auto",+ boardColdLaneMode: "expanded",boardColumnPageSize: KANBAN_COLUMN_DEFAULT_PAGE_SIZE,};@@ -596,6 +602,9 @@ function SubIssueProgressSummaryStrip({);}+// Mobile-only indent for nested task rows (desktop uses IssueRow treeGuides).+const MOBILE_TREE_INDENT = ["", "pl-4 sm:pl-0", "pl-8 sm:pl-0", "pl-12 sm:pl-0", "pl-16 sm:pl-0"];+export function IssuesList({issues,isLoading,@@ -626,6 +635,24 @@ export function IssuesList({onUpdateIssue,}: IssuesListProps) {const rootRef = useRef<HTMLDivElement | null>(null);+ const navigate = useNavigate();+ const { keyboardShortcutsEnabled } = useGeneralSettings();+ // Keyboard selection for the list view (mirrors the inbox). Hover moves the+ // selection only after real pointer movement, so keyboard-driven scrolling+ // doesn't hand the selection to whatever row lands under the cursor.+ const [selectedNavIssueId, setSelectedNavIssueId] = useState<string | null>(null);+ const pointerMovedSinceKeyNavRef = useRef(true);+ useEffect(() => {+ const handlePointerMove = () => {+ pointerMovedSinceKeyNavRef.current = true;+ };+ window.addEventListener("mousemove", handlePointerMove, { passive: true });+ return () => window.removeEventListener("mousemove", handlePointerMove);+ }, []);+ const setNavSelectionFromPointer = useCallback((issueId: string) => {+ if (!pointerMovedSinceKeyNavRef.current) return;+ setSelectedNavIssueId(issueId);+ }, []);const { selectedCompanyId } = useCompany();const { openNewIssue } = useDialogActions();const { data: session } = useQuery({@@ -1193,6 +1220,109 @@ export function IssuesList({projectById,]);+ // Flattened visible row order (groups -> tree DFS, skipping collapsed+ // groups/parents) — must match render order below for keyboard traversal.+ const flatNavIssues = useMemo(() => {+ if (viewState.viewMode !== "list") return [] as Issue[];+ const out: Issue[] = [];+ for (const group of groupedContent) {+ if (group.label && viewState.collapsedGroups.includes(group.key)) continue;+ const { roots, childMap } = viewState.nestingEnabled+ ? buildIssueTree(group.items)+ : { roots: group.items, childMap: new Map<string, Issue[]>() };+ const walk = (issue: Issue) => {+ out.push(issue);+ if (!viewState.collapsedParents.includes(issue.id)) {+ for (const child of childMap.get(issue.id) ?? []) walk(child);+ }+ };+ for (const root of roots) walk(root);+ }+ return out;+ }, [+ groupedContent,+ viewState.viewMode,+ viewState.collapsedGroups,+ viewState.collapsedParents,+ viewState.nestingEnabled,+ ]);++ const listNavStateRef = useRef({ flatNavIssues, selectedNavIssueId, viewMode: viewState.viewMode, issueLinkState });+ listNavStateRef.current = { flatNavIssues, selectedNavIssueId, viewMode: viewState.viewMode, issueLinkState };++ const findSelectedNavRowLink = useCallback((issueId: string) => {+ const row = rootRef.current?.querySelector(`[data-issue-row-id="${CSS.escape(issueId)}"]`);+ const link = row?.querySelector(":scope > [data-inbox-issue-link]");+ return link instanceof HTMLElement ? link : null;+ }, []);++ useEffect(() => {+ if (!keyboardShortcutsEnabled) return;+ const handleKeyDown = (e: KeyboardEvent) => {+ if (e.defaultPrevented) return;+ const target = e.target;+ if (+ !(target instanceof HTMLElement) ||+ isKeyboardShortcutTextInputTarget(target) ||+ hasBlockingShortcutDialog(document) ||+ e.metaKey ||+ e.ctrlKey ||+ e.altKey+ ) {+ return;+ }+ const st = listNavStateRef.current;+ if (st.viewMode !== "list" || st.flatNavIssues.length === 0) return;+ const currentIndex = st.selectedNavIssueId+ ? st.flatNavIssues.findIndex((issue) => issue.id === st.selectedNavIssueId)+ : -1;+ switch (e.key) {+ case "j":+ case "ArrowDown":+ case "k":+ case "ArrowUp": {+ e.preventDefault();+ pointerMovedSinceKeyNavRef.current = false;+ const direction = e.key === "j" || e.key === "ArrowDown" ? "next" : "previous";+ const nextIndex = getInboxKeyboardSelectionIndex(currentIndex, st.flatNavIssues.length, direction);+ const nextIssue = st.flatNavIssues[nextIndex];+ if (!nextIssue) break;+ setSelectedNavIssueId(nextIssue.id);+ // The list renders progressively; make sure the selected row is+ // within the render budget so the band mounts and can scroll into+ // view (the +1 keeps the next row visible as a scroll cue).+ setRenderedIssueRowLimit((current) => Math.max(current, nextIndex + 2));+ break;+ }+ case "Enter": {+ if (currentIndex < 0) return;+ const issue = st.flatNavIssues[currentIndex];+ if (!issue) return;+ e.preventDefault();+ // Navigate from the entry data (like the inbox) rather than the DOM+ // row — the selected row may sit past the mounted render batch.+ const pathId = issue.identifier ?? issue.id;+ const detailState = withIssueDetailHeaderSeed(st.issueLinkState, issue);+ rememberIssueDetailLocationState(pathId, detailState);+ navigate(createIssueDetailPath(pathId), { state: detailState });+ break;+ }+ default:+ return;+ }+ };+ window.addEventListener("keydown", handleKeyDown);+ return () => window.removeEventListener("keydown", handleKeyDown);+ }, [keyboardShortcutsEnabled, navigate]);++ // Keep the keyboard selection visible while navigating. Depends on the+ // render budget too: a selection past the mounted batch scrolls once its+ // row mounts.+ useEffect(() => {+ if (!selectedNavIssueId) return;+ findSelectedNavRowLink(selectedNavIssueId)?.scrollIntoView({ block: "nearest" });+ }, [findSelectedNavRowLink, renderedIssueRowLimit, selectedNavIssueId]);+useEffect(() => {if (viewState.viewMode !== "list") return;const nextIssueIds = filtered.map((issue) => issue.id).join("|");@@ -1390,7 +1520,7 @@ export function IssuesList({{/* View mode toggle */}<div className="flex items-center border border-border rounded-md overflow-hidden mr-1" role="group" aria-label="View mode"><button- className={`p-1.5 transition-colors ${viewState.viewMode === "list" ? "bg-accent text-foreground" : "text-muted-foreground hover:text-foreground"}`}+ className={`flex h-8 w-8 items-center justify-center transition-colors ${viewState.viewMode === "list" ? "bg-accent text-foreground" : "text-muted-foreground hover:text-foreground"}`}onClick={() => updateView({ viewMode: "list" })}title="List view"aria-label="List view"@@ -1399,13 +1529,13 @@ export function IssuesList({<List className="h-3.5 w-3.5" /></button><button- className={`p-1.5 transition-colors ${viewState.viewMode === "board" ? "bg-accent text-foreground" : "text-muted-foreground hover:text-foreground"}`}+ className={`flex h-8 w-8 items-center justify-center transition-colors ${viewState.viewMode === "board" ? "bg-accent text-foreground" : "text-muted-foreground hover:text-foreground"}`}onClick={() => updateView({ viewMode: "board" })}title="Board view"aria-label="Board view"aria-pressed={viewState.viewMode === "board"}>- <Columns3 className="h-3.5 w-3.5" />+ <SquareKanban className="h-3.5 w-3.5" /></button></div>@@ -1488,7 +1618,7 @@ export function IssuesList({className="h-8 w-8 shrink-0"onClick={() => updateView({boardCardDensity: "auto",- boardColdLaneMode: "auto",+ boardColdLaneMode: "expanded",boardColumnPageSize: KANBAN_COLUMN_DEFAULT_PAGE_SIZE,})}disabled={!boardDensityCustomized}@@ -1511,6 +1641,7 @@ export function IssuesList({<IssueFiltersPopoverstate={viewState}onChange={updateView}+ buttonVariant="outline"activeFilterCount={activeFilterCount}agents={agents}creators={creatorOptions}@@ -1774,19 +1905,25 @@ export function IssuesList({return (<divkey={issue.id}- style={{- ...(depth > 0 ? { paddingLeft: `${depth * 16}px` } : {}),- ...(useDeferredRowRendering- ? {- contentVisibility: "auto",- containIntrinsicSize: "44px",- }- : {}),- }}+ data-issue-row-id={issue.id}+ // Desktop indentation comes from IssueRow's treeGuides+ // (vertical connector slots); mobile keeps a plain+ // padding indent (guides are sm-only).+ className={depth > 0 ? MOBILE_TREE_INDENT[Math.min(depth, MOBILE_TREE_INDENT.length - 1)] : undefined}+ style={useDeferredRowRendering+ ? {+ contentVisibility: "auto",+ containIntrinsicSize: "44px",+ }+ : undefined}><IssueRowissue={issue}issueLinkState={issueLinkState}+ selected={selectedNavIssueId === issue.id}+ onMouseEnter={() => setNavSelectionFromPointer(issue.id)}+ treeGuides={depth}+ hideDivider={hasChildren && isExpanded}checklistStepNumber={checklistStepNumber}checklistCurrentStep={checklistMeta?.currentStepIssueId === issue.id}checklistDependencyChips={checklistDependencyChips}@@ -1802,33 +1939,33 @@ export function IssuesList({) : null}{issueBadge ? (issueBadge === "Paused" ? (- <span- className={cn("ml-1.5 inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium", statusBadge.paused)}+ <Badge variant="ghost"+ className={cn("ml-1.5 px-1.5 text-(length:--text-nano)", statusBadge.paused)}aria-label="Paused"title="Paused"><CircleSlash2 className="h-3 w-3" />Paused- </span>+ </Badge>) : (- <span className="ml-1.5 inline-flex items-center rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300">+ <Badge variant="outline" className="ml-1.5 border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) text-amber-700 dark:text-amber-300">{issueBadge}- </span>+ </Badge>)) : null}{isSuccessfulRunHandoffRequired(issue) ? (- <span- className="ml-1.5 inline-flex items-center gap-1 rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"+ <Badge variant="outline"+ className="ml-1.5 border-amber-400/45 bg-amber-50/60 px-1.5 text-(length:--text-nano) text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"aria-label="Needs next step"title="This task needs a next step"><CircleDot className="h-3 w-3" />Needs next step- </span>+ </Badge>) : null}</>)}- className={isMutedIssue ? "opacity-70" : undefined}+ className={cn(isMutedIssue && "opacity-70", selectedNavIssueId === issue.id && "bg-accent/50")}mobileLeading={hasChildren ? (<button type="button" data-slot="icon-button" onClick={toggleCollapse}>@@ -1836,7 +1973,7 @@ export function IssuesList({</button>) : (<span className="inline-flex items-center" onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}>- <StatusIcon status={issue.status} size="lg" blockerAttention={issue.blockerAttention} onChange={(s) => onUpdateIssue(issue.id, { status: s })} />+ <StatusIcon status={issue.status} size="md" blockerAttention={issue.blockerAttention} onChange={(s) => onUpdateIssue(issue.id, { status: s })} /></span>)}@@ -1863,7 +2000,7 @@ export function IssuesList({checklistStepNumber={checklistStepNumber}statusSlot={(<span className="inline-flex items-center" onClick={(e) => { e.preventDefault(); e.stopPropagation(); }}>- <StatusIcon status={issue.status} size="lg" blockerAttention={issue.blockerAttention} onChange={(s) => onUpdateIssue(issue.id, { status: s })} />+ <StatusIcon status={issue.status} size="md" blockerAttention={issue.blockerAttention} onChange={(s) => onUpdateIssue(issue.id, { status: s })} /></span>)}/>diff --git a/ui/src/components/KanbanBoard.test.tsx b/ui/src/components/KanbanBoard.test.tsxindex 1d6cc89be3..df0860057a 100644--- a/ui/src/components/KanbanBoard.test.tsx+++ b/ui/src/components/KanbanBoard.test.tsx@@ -187,9 +187,12 @@ describe("KanbanBoard", () => {expect(container.textContent).not.toContain("Issue 1");});- it("uses distinct review, done, and cancelled column tones", () => {- expect(getKanbanColumnTone("in_progress").body).toBe("bg-muted/20");+ it("gives every column a status-hued tone", () => {+ expect(getKanbanColumnTone("backlog").body).toContain("bg-muted/30");+ expect(getKanbanColumnTone("todo").body).toContain("amber");+ expect(getKanbanColumnTone("in_progress").body).toContain("blue");expect(getKanbanColumnTone("in_review").body).toContain("violet");+ expect(getKanbanColumnTone("blocked").body).toContain("red");expect(getKanbanColumnTone("done").body).toContain("green");expect(getKanbanColumnTone("cancelled").body).toContain("bg-muted/25");expect(getKanbanColumnTone("cancelled").card).toContain("opacity-80");diff --git a/ui/src/components/KanbanBoard.tsx b/ui/src/components/KanbanBoard.tsxindex 88eeb6248e..abe0eff2c6 100644--- a/ui/src/components/KanbanBoard.tsx+++ b/ui/src/components/KanbanBoard.tsx@@ -25,6 +25,8 @@ import { AlertTriangle } from "lucide-react";import { isSuccessfulRunHandoffRequired } from "../lib/successful-run-handoff";import { collectSubtreeLiveCounts } from "../lib/liveIssueIds";import { cn } from "../lib/utils";+import { Card } from "@/components/ui/card";+import { Badge } from "@/components/ui/badge";export const KANBAN_BOARD_HIGH_VOLUME_THRESHOLD = 100;export const KANBAN_COLUMN_PAGE_SIZE_OPTIONS = [10, 25, 50] as const;@@ -54,7 +56,46 @@ const defaultKanbanColumnTone = {card: "",};+// Every column carries a status-hued tint (matching the app-wide status+// vocabulary: gray backlog, amber todo, blue in-progress, violet review,+// red blocked, green done) so no column reads as accidentally unstyled.export const kanbanColumnTones: Partial<Record<IssueStatus, typeof defaultKanbanColumnTone>> = {+ backlog: {+ rail: "border-border bg-muted/30",+ railOver: "bg-muted/50 ring-1 ring-neutral-400/25",+ header: "text-muted-foreground",+ count: "text-muted-foreground/60",+ body: "bg-muted/30 ring-1 ring-inset ring-border/50",+ bodyOver: "bg-muted/50 ring-1 ring-inset ring-neutral-400/25",+ card: "",+ },+ todo: {+ rail: "border-amber-500/25 bg-amber-50/60 dark:bg-amber-950/20",+ railOver: "bg-amber-100/70 ring-1 ring-amber-500/25 dark:bg-amber-950/35",+ header: "text-amber-700 dark:text-amber-300",+ count: "text-amber-700/65 dark:text-amber-300/65",+ body: "bg-amber-50/45 ring-1 ring-inset ring-amber-500/15 dark:bg-amber-950/15",+ bodyOver: "bg-amber-100/70 ring-1 ring-inset ring-amber-500/25 dark:bg-amber-950/30",+ card: "",+ },+ in_progress: {+ rail: "border-blue-500/25 bg-blue-50/60 dark:bg-blue-950/20",+ railOver: "bg-blue-100/70 ring-1 ring-blue-500/25 dark:bg-blue-950/35",+ header: "text-blue-700 dark:text-blue-300",+ count: "text-blue-700/65 dark:text-blue-300/65",+ body: "bg-blue-50/45 ring-1 ring-inset ring-blue-500/15 dark:bg-blue-950/15",+ bodyOver: "bg-blue-100/70 ring-1 ring-inset ring-blue-500/25 dark:bg-blue-950/30",+ card: "",+ },+ blocked: {+ rail: "border-red-500/25 bg-red-50/60 dark:bg-red-950/20",+ railOver: "bg-red-100/70 ring-1 ring-red-500/25 dark:bg-red-950/35",+ header: "text-red-700 dark:text-red-300",+ count: "text-red-700/65 dark:text-red-300/65",+ body: "bg-red-50/45 ring-1 ring-inset ring-red-500/15 dark:bg-red-950/15",+ bodyOver: "bg-red-100/70 ring-1 ring-inset ring-red-500/25 dark:bg-red-950/30",+ card: "",+ },in_review: {rail: "border-violet-500/25 bg-violet-50/60 dark:bg-violet-950/20",railOver: "bg-violet-100/70 ring-1 ring-violet-500/25 dark:bg-violet-950/35",@@ -163,32 +204,28 @@ function KanbanColumn({<span className={cn("mt-2 [writing-mode:vertical-rl] rotate-180 text-(length:--text-nano) font-semibold uppercase tracking-wide", tone.header)}>{statusLabel(status)}</span>- <span className={cn("mt-auto rounded-full bg-background px-1.5 py-0.5 text-(length:--text-nano) font-medium tabular-nums", tone.header)}>+ <Badge variant="ghost" className={cn("mt-auto bg-background px-1.5 text-(length:--text-nano) tabular-nums", tone.header)}>{issues.length}- </span>+ </Badge></div>);}return (- <div className={`flex flex-col shrink-0 transition-(--tp-width-min-width) ${isEmpty && !isOver ? "min-w-(--sz-48px) w-(--sz-48px)" : "min-w-(--sz-260px) w-(--sz-260px)"}`}>- <div className={`flex items-center gap-2 px-2 py-2 mb-1 ${isEmpty && !isOver ? "justify-center" : ""}`}>+ <div className="flex flex-col shrink-0 min-w-(--sz-260px) w-(--sz-260px)">+ <div className="flex items-center gap-2 px-3 py-2 mb-1"><StatusIcon status={status} />- {(!isEmpty || isOver) && (- <>- <span className={cn("text-xs font-semibold uppercase tracking-wide", tone.header)}>- {statusLabel(status)}- </span>- <span className={cn("ml-auto text-xs tabular-nums", tone.count)}>- {issues.length}- </span>- </>- )}+ <span className={cn("text-xs font-semibold uppercase tracking-wide", tone.header)}>+ {statusLabel(status)}+ </span>+ <span className={cn("ml-auto text-xs tabular-nums", tone.count)}>+ {issues.length}+ </span></div><divref={setNodeRef}className={cn(- "flex-1 min-h-(--sz-120px) rounded-md p-1 space-y-1 transition-colors",+ "flex-1 min-h-(--sz-120px) rounded-md p-2 space-y-1 transition-colors",isOver ? tone.bodyOver : tone.body,)}>@@ -267,13 +304,13 @@ function KanbanCard({};return (- <div+ <Cardref={setNodeRef}style={style}{...attributes}{...listeners}className={cn(- "rounded-md border bg-card cursor-grab active:cursor-grabbing transition-shadow",+ "block cursor-grab active:cursor-grabbing transition-shadow",isDragging && !isOverlay ? "opacity-30" : "",isOverlay ? "shadow-lg ring-1 ring-primary/20" : "hover:shadow-sm",compact ? "p-2" : "p-2.5",@@ -294,14 +331,14 @@ function KanbanCard({{issue.identifier ?? issue.id.slice(0, 8)}</span>{isSuccessfulRunHandoffRequired(issue) ? (- <span- className="inline-flex items-center gap-1 rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"+ <Badge variant="outline"+ className="border-amber-400/45 bg-amber-50/60 px-1.5 text-(length:--text-nano) text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300"title="This task needs a next step"aria-label="Needs next step"><AlertTriangle className="h-3 w-3" />Next step- </span>+ </Badge>) : null}{isLive && (<span className="inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium text-blue-600 dark:text-blue-400">@@ -313,13 +350,13 @@ function KanbanCard({</span>)}{!isLive && subtreeLiveCount > 0 && (- <span- className="inline-flex shrink-0 items-center gap-1 rounded-full border border-border px-1.5 py-0.5 text-(length:--text-nano) font-medium text-muted-foreground"+ <Badge variant="outline"+ className="border-border px-1.5 text-(length:--text-nano) text-muted-foreground"title={`${subtreeLiveCount} sub-task${subtreeLiveCount === 1 ? "" : "s"} running below`}><span className="h-2 w-2 shrink-0 rounded-full border border-muted-foreground/60" aria-hidden="true" />{subtreeLiveCount} live below- </span>+ </Badge>)}</div><p className={`${compact ? "mb-1.5 text-xs" : "mb-2 text-sm"} leading-snug line-clamp-2`}>{issue.title}</p>@@ -337,7 +374,7 @@ function KanbanCard({})()}</div></Link>- </div>+ </Card>);}@@ -432,7 +469,10 @@ export function KanbanBoard({liveIssueIds={liveIssueIds}subtreeLiveCounts={subtreeLiveCounts}compactCards={compactCards}- collapsed={collapsedStatusSet.has(status)}+ // Compact mode (any lane explicitly collapsed) also collapses+ // empty lanes to the same labeled rail, so an empty In Progress+ // reads like the other rails instead of a lone expanded column.+ collapsed={collapsedStatusSet.has(status) || (collapsedStatusSet.size > 0 && columnIssues[status].length === 0)}visibleCount={visibleCountByStatus[status] ?? initialVisibleCount}revealIncrement={revealIncrement}onShowMore={() => {diff --git a/ui/src/components/Layout.tsx b/ui/src/components/Layout.tsxindex 080f362283..73e5b9fb2a 100644--- a/ui/src/components/Layout.tsx+++ b/ui/src/components/Layout.tsx@@ -338,6 +338,7 @@ export function Layout() {onToggleCollapse: toggleCollapse,onTogglePanel: togglePanel,onShowShortcuts: () => setShortcutsOpen(true),+ onGoToInbox: () => navigate("/inbox"),});useEffect(() => {diff --git a/ui/src/components/MobileBottomNav.tsx b/ui/src/components/MobileBottomNav.tsxindex 44eda28a97..0f8c47c70f 100644--- a/ui/src/components/MobileBottomNav.tsx+++ b/ui/src/components/MobileBottomNav.tsx@@ -12,6 +12,7 @@ import { useDialogActions } from "../context/DialogContext";import { SIDEBAR_SCROLL_RESET_STATE } from "../lib/navigation-scroll";import { cn } from "../lib/utils";import { useInboxBadge } from "../hooks/useInboxBadge";+import { Badge } from "@/components/ui/badge";interface MobileBottomNavProps {visible: boolean;@@ -108,9 +109,9 @@ export function MobileBottomNav({ visible }: MobileBottomNavProps) {<span className="relative"><Icon className={cn("h-(--sz-18px) w-(--sz-18px)", isActive && "stroke-(length:--sw-2_3)")} />{item.badge != null && item.badge > 0 && (- <span className="absolute -right-2 -top-2 rounded-full bg-primary px-1.5 py-0.5 text-(length:--text-nano) leading-none text-primary-foreground">+ <Badge variant="ghost" className="absolute -right-2 -top-2 bg-primary px-1.5 text-(length:--text-nano) leading-none text-primary-foreground">{item.badge > 99 ? "99+" : item.badge}- </span>+ </Badge>)}</span><span className="truncate">{item.label}</span>diff --git a/ui/src/components/NewAgentDialog.tsx b/ui/src/components/NewAgentDialog.tsxindex be489954ea..285eb161af 100644--- a/ui/src/components/NewAgentDialog.tsx+++ b/ui/src/components/NewAgentDialog.tsx@@ -27,6 +27,7 @@ import { isVisualAdapterChoice } from "../adapters/metadata";import { getAdapterDisplay } from "../adapters/adapter-display-registry";import { useDisabledAdaptersSync } from "../adapters/use-disabled-adapters";import { useToast } from "../context/ToastContext";+import { Badge } from "@/components/ui/badge";/*** Adapter types that are suitable for agent creation (excludes internal@@ -311,9 +312,9 @@ export function NewAgentDialog() {}}>{opt.recommended && (- <span className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-(length:--text-nano) font-semibold px-1.5 py-0.5 rounded-full leading-none">+ <Badge variant="ghost" className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-(length:--text-nano) font-semibold px-1.5 leading-none">Recommended- </span>+ </Badge>)}<opt.icon className="h-4 w-4" /><span className="font-medium">{opt.label}</span>diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsxindex 87a62341f2..38636c9792 100644--- a/ui/src/components/NewIssueDialog.tsx+++ b/ui/src/components/NewIssueDialog.tsx@@ -115,6 +115,7 @@ type StagedIssueFile = {title?: string | null;};+import { Badge } from "@/components/ui/badge";import {buildAssigneeAdapterOverrides,ISSUE_OVERRIDE_ADAPTER_TYPES,@@ -1976,9 +1977,9 @@ export function NewIssueDialog() {<div key={file.id} className="flex items-start justify-between gap-3 rounded-md border border-border/70 px-3 py-2"><div className="min-w-0"><div className="flex items-center gap-2">- <span className="rounded-full border border-border px-2 py-0.5 font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">{file.documentKey}- </span>+ </Badge><span className="truncate text-sm">{file.file.name}</span></div><div className="mt-1 flex items-center gap-2 text-(length:--text-micro) text-muted-foreground">diff --git a/ui/src/components/OnboardingWizard.tsx b/ui/src/components/OnboardingWizard.tsxindex 1047217b46..e6b878faf3 100644--- a/ui/src/components/OnboardingWizard.tsx+++ b/ui/src/components/OnboardingWizard.tsx@@ -47,6 +47,7 @@ import { resolveRouteOnboardingOptions } from "../lib/onboarding-route";import { AsciiArtAnimation } from "./AsciiArtAnimation";import { FrontDoor } from "./FrontDoor";import { AgentCapsule } from "./AgentCapsule";+import { Badge } from "@/components/ui/badge";import {Building2,Bot,@@ -1265,9 +1266,9 @@ export function OnboardingWizard() {}}>{opt.recommended && (- <span className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-(length:--text-nano) font-semibold px-1.5 py-0.5 rounded-full leading-none">+ <Badge variant="ghost" className="absolute -top-1.5 right-1.5 bg-green-500 text-white text-(length:--text-nano) font-semibold px-1.5 leading-none">Recommended- </span>+ </Badge>)}<opt.icon className="h-4 w-4" /><span className="font-medium">{opt.label}</span>diff --git a/ui/src/components/PipelineStageHistoryPanel.tsx b/ui/src/components/PipelineStageHistoryPanel.tsxindex 864604e556..dd44be512e 100644--- a/ui/src/components/PipelineStageHistoryPanel.tsx+++ b/ui/src/components/PipelineStageHistoryPanel.tsx@@ -9,6 +9,7 @@ import { timeAgo } from "../lib/timeAgo";import { Button } from "@/components/ui/button";import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";import { cn } from "../lib/utils";+import { Badge } from "@/components/ui/badge";/*** Compact revisions panel for a per-stage instructions document. Mirrors the@@ -113,9 +114,9 @@ export function PipelineStageHistoryPanel({<p className="text-sm font-medium">Revision {revision.revisionNumber}{isCurrent ? (- <span className="ml-2 rounded-full bg-muted px-2 py-0.5 text-(length:--text-micro) font-medium text-muted-foreground">+ <Badge variant="ghost" className="ml-2 bg-muted text-(length:--text-micro) text-muted-foreground">Current- </span>+ </Badge>) : null}</p><p className="text-xs text-muted-foreground">diff --git a/ui/src/components/ProjectProperties.tsx b/ui/src/components/ProjectProperties.tsxindex 8e44a92c2f..a7ba99d228 100644--- a/ui/src/components/ProjectProperties.tsx+++ b/ui/src/components/ProjectProperties.tsx@@ -22,6 +22,7 @@ import { ToggleSwitch } from "@/components/ui/toggle-switch";import { DraftInput } from "./agent-config-primitives";import { InlineEditor } from "./InlineEditor";import { EnvironmentVariablesEditor } from "./environment-variables-editor";+import { Badge } from "@/components/ui/badge";const PROJECT_STATUSES = [{ value: "backlog", label: "Backlog" },@@ -798,9 +799,9 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa<div className="min-w-0 space-y-0.5"><div className="flex items-center gap-2"><span className="text-(length:--text-micro) font-medium">{service.serviceName}</span>- <span+ <Badge variant="ghost"className={cn(- "rounded-full px-1.5 py-0.5 text-(length:--text-nano) uppercase tracking-wide",+ "px-1.5 text-(length:--text-nano) uppercase tracking-wide",service.status === "running"? "bg-green-500/15 text-green-700 dark:text-green-300": service.status === "failed"@@ -809,7 +810,7 @@ export function ProjectProperties({ project, onUpdate, onFieldUpdate, getFieldSa)}>{service.status}- </span>+ </Badge></div><div className="text-(length:--text-micro) text-muted-foreground">{service.url ? (diff --git a/ui/src/components/ProjectWorkspaceSummaryCard.tsx b/ui/src/components/ProjectWorkspaceSummaryCard.tsxindex fb6887ac15..77fa319766 100644--- a/ui/src/components/ProjectWorkspaceSummaryCard.tsx+++ b/ui/src/components/ProjectWorkspaceSummaryCard.tsx@@ -7,6 +7,7 @@ import type { ProjectWorkspaceLinkedIssue, ProjectWorkspaceSummary } from "../liimport { cn, projectWorkspaceUrl } from "../lib/utils";import { timeAgo } from "../lib/timeAgo";import { Copy, ExternalLink, FolderOpen, GitBranch, Loader2, Play, Square } from "lucide-react";+import { Badge } from "@/components/ui/badge";function workspaceKindLabel(kind: ProjectWorkspaceSummary["kind"]) {return kind === "execution_workspace" ? "Execution workspace" : "Project workspace";@@ -59,16 +60,16 @@ export function ProjectWorkspaceSummaryCard({<div className="flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between"><div className="min-w-0 space-y-2"><div className="flex flex-wrap items-center gap-2">- <span className="inline-flex items-center rounded-full border border-border bg-background px-2.5 py-1 text-(length:--text-micro) font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border bg-background px-2.5 py-1 text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">{workspaceKindLabel(summary.kind)}- </span>- <span className="inline-flex items-center rounded-full border border-border/70 bg-background px-2.5 py-1 text-xs text-muted-foreground">+ </Badge>+ <Badge variant="outline" className="border-border/70 bg-background px-2.5 py-1 text-muted-foreground">Updated {timeAgo(summary.lastUpdatedAt)}- </span>+ </Badge>{summary.serviceCount > 0 ? (- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs",+ "gap-1.5 px-2.5 py-1",hasRunningServices? "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300": "border-border/70 bg-background text-muted-foreground",@@ -81,12 +82,12 @@ export function ProjectWorkspaceSummaryCard({)}/>{summary.runningServiceCount}/{summary.serviceCount} services- </span>+ </Badge>) : null}{summary.executionWorkspaceStatus ? (- <span className="inline-flex items-center rounded-full border border-border/70 bg-background px-2.5 py-1 text-xs text-muted-foreground">+ <Badge variant="outline" className="border-border/70 bg-background px-2.5 py-1 text-muted-foreground">{summary.executionWorkspaceStatus.replace(/_/g, " ")}- </span>+ </Badge>) : null}</div><Linkdiff --git a/ui/src/components/RoutineHistoryTab.tsx b/ui/src/components/RoutineHistoryTab.tsxindex 13bdc28a45..9d273b1407 100644--- a/ui/src/components/RoutineHistoryTab.tsx+++ b/ui/src/components/RoutineHistoryTab.tsx@@ -35,6 +35,7 @@ import { Label } from "@/components/ui/label";import { Skeleton } from "@/components/ui/skeleton";import { EmptyState } from "./EmptyState";import { MarkdownBody } from "./MarkdownBody";+import { Badge } from "@/components/ui/badge";type AgentLookup = Map<string, { id: string; name: string }>;type ProjectLookup = Map<string, { id: string; name: string }>;@@ -460,14 +461,14 @@ function RevisionList({<div className="flex items-center gap-2 text-sm font-medium"><span>rev {revision.revisionNumber}</span>{isCurrent && (- <span className="rounded-full border border-border px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Current- </span>+ </Badge>)}{revision.restoredFromRevisionId && (- <span className="rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:text-amber-200">+ <Badge variant="outline" className="border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:text-amber-200">Restored- </span>+ </Badge>)}</div><div className="text-xs text-muted-foreground truncate">@@ -611,9 +612,9 @@ function RevisionPreview({<p className="text-sm">{row.value || <span className="text-muted-foreground">—</span>}{row.differs && (- <span className="ml-2 rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:text-amber-200">+ <Badge variant="outline" className="ml-2 border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-amber-800 dark:text-amber-200">differs from current- </span>+ </Badge>)}</p></div>@@ -644,9 +645,9 @@ function RevisionPreview({<ul className="divide-y divide-border">{triggers.map((trigger) => (<li key={trigger.id} className="py-2 flex flex-wrap items-center gap-2 text-sm">- <span className="rounded-full border border-border px-2 py-0.5 text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">+ <Badge variant="outline" className="border-border text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">{trigger.kind}- </span>+ </Badge><span className="font-medium">{trigger.label ?? trigger.kind}</span><span className="text-xs text-muted-foreground">{summarizeTriggerSnapshot(trigger)}@@ -911,11 +912,11 @@ function RevisionPicker({: "border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300";return (<div className="flex items-center gap-2">- <span- className={`rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wider ${toneClass}`}+ <Badge variant="outline"+ className={`text-(length:--text-nano) uppercase tracking-wider ${toneClass}`}>{label}- </span>+ </Badge><selectvalue={value}onChange={(event) => onChange(event.target.value)}diff --git a/ui/src/components/Sidebar.test.tsx b/ui/src/components/Sidebar.test.tsxindex 8007cb2848..4a5a184805 100644--- a/ui/src/components/Sidebar.test.tsx+++ b/ui/src/components/Sidebar.test.tsx@@ -174,7 +174,12 @@ describe("Sidebar", () => {const workSection = [...container.querySelectorAll("nav [data-plugin-launcher-zone]")].find((node) => node.getAttribute("data-plugin-launcher-zone") === "sidebar");expect(workSection?.textContent).toContain("Plugin launcher outlet");- const workSectionContainer = workSection?.parentElement?.parentElement;+ // The Work section is a Collapsible now (one extra wrapper level), so+ // resolve the section root by walking up until the header label appears.+ let workSectionContainer = workSection?.parentElement ?? null;+ while (workSectionContainer && !workSectionContainer.textContent?.includes("Work")) {+ workSectionContainer = workSectionContainer.parentElement;+ }expect(workSectionContainer?.textContent).toContain("Work");expect(workSectionContainer?.textContent).toContain("Tasks");expect(workSectionContainer?.textContent).not.toContain("Goals");diff --git a/ui/src/components/Sidebar.tsx b/ui/src/components/Sidebar.tsxindex d8f630d102..cc5e9b2610 100644--- a/ui/src/components/Sidebar.tsx+++ b/ui/src/components/Sidebar.tsx@@ -20,6 +20,7 @@ import {MessagesSquare,GanttChartSquare,} from "lucide-react";+import { useState } from "react";import { useQuery } from "@tanstack/react-query";import { NavLink } from "@/lib/router";import { SidebarSection } from "./SidebarSection";@@ -43,6 +44,10 @@ import { SidebarCompanyMenu } from "./SidebarCompanyMenu";export function Sidebar() {const { openNewIssue } = useDialogActions();+ // Every labeled section is collapsible (session-scoped, default open) —+ // one policy across static nav groups and the data-driven sections.+ const [workOpen, setWorkOpen] = useState(true);+ const [companyOpen, setCompanyOpen] = useState(true);const { selectedCompanyId, selectedCompany } = useCompany();const { isMobile, collapsed, collapseLocked, peeking, toggleCollapsed, setCollapsed } = useSidebar();const rail = collapsed && !peeking;@@ -147,7 +152,7 @@ export function Sidebar() {onClick={() => openNewIssue()}data-slot="icon-button"aria-label={rail ? "New Task" : undefined}- className="flex items-center gap-2.5 px-3 py-2 pointer-coarse:py-1.5 text-(length:--text-compact) font-medium text-foreground/80 hover:bg-accent/50 hover:text-foreground transition-colors"+ className="flex items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium text-foreground/80 hover:bg-accent/50 hover:text-foreground transition-colors"><SquarePen className="h-4 w-4 shrink-0" /><span className={rail ? SIDEBAR_RAIL_HIDDEN_LABEL : "truncate"}>New Task</span>@@ -177,7 +182,7 @@ export function Sidebar() {) : null}</div>- <SidebarSection label="Work">+ <SidebarSection label="Work" collapsible={{ open: workOpen, onOpenChange: setWorkOpen }}><SidebarNavItem to="/issues" label="Tasks" icon={CircleDot} /><SidebarNavItem to="/routines" label="Routines" icon={Repeat} />{showPipelines ? (@@ -188,7 +193,7 @@ export function Sidebar() {) : goalsLinkPending ? (<divdata-testid="sidebar-goals-placeholder"- className="h-9 pointer-coarse:h-8"+ className="h-8 pointer-coarse:h-7"aria-hidden="true"/>) : null}@@ -223,7 +228,7 @@ export function Sidebar() {<SidebarAgents streamlined={streamlined} />- <SidebarSection label="Company">+ <SidebarSection label="Company" collapsible={{ open: companyOpen, onOpenChange: setCompanyOpen }}><SidebarNavItem to="/org" label="Org" icon={Network} /><SidebarNavItem to="/timeline" label="Timeline" icon={GanttChartSquare} /><SidebarNavItem to="/costs" label="Costs" icon={DollarSign} />diff --git a/ui/src/components/SidebarAccountMenu.tsx b/ui/src/components/SidebarAccountMenu.tsxindex 769c749dc4..17a9394a26 100644--- a/ui/src/components/SidebarAccountMenu.tsx+++ b/ui/src/components/SidebarAccountMenu.tsx@@ -18,6 +18,7 @@ import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";import { ThemeToggle } from "./ThemeToggle";import { SidebarServerInfo } from "./SidebarServerInfo";+import { Badge } from "@/components/ui/badge";const PROFILE_SETTINGS_PATH = "/company/settings/instance/profile";const DOCS_URL = "https://docs.paperclip.ing/";@@ -172,9 +173,9 @@ export function SidebarAccountMenu({<div className="min-w-0 flex-1 pt-1"><div className="flex items-center gap-2"><h2 className="truncate text-base font-semibold text-foreground">{displayName}</h2>- <span className="rounded-full bg-accent px-2 py-0.5 text-(length:--text-nano) font-semibold uppercase tracking-wide text-muted-foreground">+ <Badge variant="ghost" className="bg-accent text-(length:--text-nano) font-semibold uppercase tracking-wide text-muted-foreground">{accountBadge}- </span>+ </Badge></div><p className="truncate text-sm text-muted-foreground">{secondaryLabel}</p>{version ? (diff --git a/ui/src/components/SidebarAgents.tsx b/ui/src/components/SidebarAgents.tsxindex 2b0db3702f..3ea070ef26 100644--- a/ui/src/components/SidebarAgents.tsx+++ b/ui/src/components/SidebarAgents.tsx@@ -1,5 +1,5 @@import { useCallback, useEffect, useMemo, useState } from "react";-import { Link, NavLink, useLocation } from "@/lib/router";+import { Link, useLocation } from "@/lib/router";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import {MoreHorizontal,@@ -41,6 +41,7 @@ import {} from "../lib/agent-order";import { AgentIcon } from "./AgentIconPicker";import { BudgetSidebarMarker } from "./BudgetSidebarMarker";+import { SidebarNavItem } from "./SidebarNavItem";import { SidebarSection, type SidebarSectionRadioChoice } from "./SidebarSection";import { StarToggle } from "./StarToggle";import { Button } from "@/components/ui/button";@@ -147,69 +148,45 @@ function SidebarAgentItem({? "Invalid org chain": pauseResumeLabel;- const link = (- <NavLink+ // C11 (DECISION-SHEET.md): the row itself is a SidebarNavItem, so agent rows+ // share the nav-row chrome (type, active state, rail tooltip, live dot).+ const navItem = (+ <SidebarNavItemto={href}- state={SIDEBAR_SCROLL_RESET_STATE}- onClick={() => {- if (isMobile) setSidebarOpen(false);- }}+ label={agent.name}+ iconNode={<AgentIcon icon={agent.icon} className="shrink-0 h-4 w-4" />}+ active={isActive}+ liveCount={runCount}className={cn(- "flex min-w-0 flex-1 items-center gap-2.5 px-3 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium transition-colors",- // Reserve room for the ⋯ menu, plus the inline unstar star on starred rows.+ "min-w-0 flex-1",+ // Reserve room for the hover ⋯ menu; starred rows widen it for the+ // inline unstar star.starred && !isMobile ? "pr-14" : "pr-8",- isActive- ? "bg-accent text-foreground"- : "text-foreground/80 hover:bg-accent/50 hover:text-foreground"- )}- >- <AgentIcon icon={agent.icon} className="shrink-0 h-3.5 w-3.5 text-muted-foreground" />- <span className={rail ? SIDEBAR_RAIL_HIDDEN_LABEL : "flex-1 truncate"}>{agent.name}</span>- {!rail && hasInvalidOrgChain ? (- <AlertTriangle className="h-3.5 w-3.5 shrink-0 text-amber-500" aria-label="Invalid reporting chain" />- ) : null}- {!rail && (agent.pauseReason === "budget" || runCount > 0) && (- <span className="ml-auto flex items-center gap-1.5 shrink-0">- {agent.pauseReason === "budget" ? (- <BudgetSidebarMarker title="Agent paused by budget" />- ) : null}- {runCount > 0 ? (- <span className="relative flex h-2 w-2">- <span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />- <span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500" />- </span>- ) : null}- {runCount > 0 ? (- <span className="text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400">- {runCount} live- </span>- ) : null}- </span>)}- </NavLink>+ trailing={+ hasInvalidOrgChain ? (+ <AlertTriangle className="h-3.5 w-3.5 shrink-0 text-amber-500" aria-label="Invalid reporting chain" />+ ) : undefined+ }+ trailingLabel={hasInvalidOrgChain ? "Invalid reporting chain" : undefined}+ liveAccessory={+ agent.pauseReason === "budget" ? <BudgetSidebarMarker title="Agent paused by budget" /> : undefined+ }+ />);+ // Rail: the star/menu overlays are hidden, so render the nav item bare (it+ // supplies its own rail tooltip) and let it fill the column like every other+ // rail row.+ if (rail) return navItem;+return (<div className="group/agent relative flex items-center">- {rail ? (- // Anchor the tooltip to a wrapper, not the NavLink: Radix `asChild` (Slot)- // drops React Router's function className, which would strip `flex` off the- // <a> and let the in-flow label stack under the icon, growing the row.- // Keeping the <a> out of Slot preserves a 1:1 row height with the expanded- // state so the icon never moves (PAP-10676).- <Tooltip>- <TooltipTrigger asChild>- <div className="min-w-0 flex-1">{link}</div>- </TooltipTrigger>- <TooltipContent side="right">{agent.name}</TooltipContent>- </Tooltip>- ) : (- link- )}+ {navItem}- {!rail && starred && !isMobile && onToggleStar ? (+ {starred && !isMobile && onToggleStar ? (// Desktop: quiet inline unstar, left of the ⋯ menu, revealed on hover/focus.- <span className="absolute right-8 top-1/2 -translate-y-1/2">+ <span className="absolute right-10 top-1/2 -translate-y-1/2"><StarTogglesize="row"quiet@@ -222,14 +199,13 @@ function SidebarAgentItem({</span>) : null}- {!rail && (<DropdownMenu><DropdownMenuTrigger asChild><Buttonvariant="ghost"size="icon-xs"className={cn(- "absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 transition-opacity data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",+ "absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 transition-opacity data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",isMobile? "opacity-100": "pointer-events-none opacity-0 group-hover/agent:pointer-events-auto group-hover/agent:opacity-100 group-focus-within/agent:pointer-events-auto group-focus-within/agent:opacity-100",@@ -295,7 +271,6 @@ function SidebarAgentItem({</DropdownMenuItem></DropdownMenuContent></DropdownMenu>- )}</div>);}@@ -572,6 +547,8 @@ export function SidebarAgents({ streamlined = false }: { streamlined?: boolean }{starredAgents.map((agent: Agent) => renderAgentRow(agent, true))}{dedupedDisplayedAgents.map((agent: Agent) => renderAgentRow(agent, false))}{showSeeAllLink && (() => {+ // Deliberately NOT a SidebarNavItem: this is a quiet muted affordance+ // (plain Link) that must not adopt nav-row active-route highlighting.const seeAllLink = (<Linkto="/agents/all"@@ -580,9 +557,9 @@ export function SidebarAgents({ streamlined = false }: { streamlined?: boolean }onClick={() => {if (isMobile) setSidebarOpen(false);}}- className="flex items-center gap-2.5 px-3 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground"+ className="flex items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground">- <Users className="shrink-0 h-3.5 w-3.5" />+ <Users className="shrink-0 h-4 w-4" /><span className={rail ? SIDEBAR_RAIL_HIDDEN_LABEL : undefined}>See all agents</span></Link>);diff --git a/ui/src/components/SidebarNavItem.test.tsx b/ui/src/components/SidebarNavItem.test.tsxindex 4111cc8204..959a80fd1b 100644--- a/ui/src/components/SidebarNavItem.test.tsx+++ b/ui/src/components/SidebarNavItem.test.tsx@@ -102,6 +102,23 @@ describe("SidebarNavItem", () => {expect(link().parentElement?.getAttribute("data-slot")).toBe("tooltip-trigger");});+ it("surfaces the trailing status label in the rail aria-label", () => {+ sidebarState.collapsed = true;+ render(+ <SidebarNavItem+ to="/agents/codexcoder"+ label="CodexCoder"+ icon={Inbox}+ trailing={<span aria-label="Invalid reporting chain" />}+ trailingLabel="Invalid reporting chain"+ />,+ );++ // The trailing warning is hidden in the rail, so its text equivalent must+ // ride on the link's accessible name.+ expect(link().getAttribute("aria-label")).toBe("CodexCoder, Invalid reporting chain");+ });+it("keeps the full presentation while peeking even when collapsed", () => {sidebarState.collapsed = true;sidebarState.peeking = true;diff --git a/ui/src/components/SidebarNavItem.tsx b/ui/src/components/SidebarNavItem.tsxindex f3464cebab..e7d7619afa 100644--- a/ui/src/components/SidebarNavItem.tsx+++ b/ui/src/components/SidebarNavItem.tsx@@ -5,6 +5,7 @@ import { cn, SIDEBAR_RAIL_HIDDEN_LABEL } from "../lib/utils";import { useSidebar } from "../context/SidebarContext";import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";import type { LucideIcon } from "lucide-react";+import { Badge } from "@/components/ui/badge";/*** Forces the full-label (non-rail) presentation for any `SidebarNavItem`@@ -34,7 +35,13 @@ export function useSidebarNavExpanded() {interface SidebarNavItemProps {to: string;label: string;- icon: LucideIcon;+ icon?: LucideIcon;+ /**+ * Pre-rendered icon element for rows whose icon isn't a plain Lucide+ * component (e.g. the agent rows' `AgentIcon`). Takes precedence over `icon`;+ * the caller owns its sizing/color classes.+ */+ iconNode?: ReactNode;end?: boolean;className?: string;badge?: number;@@ -48,12 +55,24 @@ interface SidebarNavItemProps {textBadgeTone?: "default" | "amber";alert?: boolean;liveCount?: number;+ /**+ * Overrides NavLink's own route matching for rows whose active state is+ * computed externally (agent rows match `/agents/:ref` across tab suffixes).+ */+ active?: boolean;+ /** Rendered after the label, before the right-aligned status cluster. */+ trailing?: ReactNode;+ /** Accessible text for `trailing` status content, surfaced in the collapsed rail (where `trailing` is hidden). */+ trailingLabel?: string;+ /** Rendered inside the right-aligned status cluster, before the live dot. */+ liveAccessory?: ReactNode;}export function SidebarNavItem({to,label,icon: Icon,+ iconNode,end,className,badge,@@ -63,6 +82,10 @@ export function SidebarNavItem({textBadgeTone = "default",alert = false,liveCount,+ active,+ trailing,+ trailingLabel,+ liveAccessory,}: SidebarNavItemProps) {const { isMobile, setSidebarOpen, collapsed, peeking } = useSidebar();// A fixed-width contextual pane (SecondarySidebar) forces full labels even@@ -78,15 +101,16 @@ export function SidebarNavItem({// Accessible text equivalent for the collapsed dot indicator. The visible// label is `sr-only` in the rail, so the count must be surfaced here.- const railAriaLabel = !rail+ const railStatusText = hasLive+ ? `${liveCount} live`+ : hasBadge+ ? `${badge}${badgeLabel ? ` ${badgeLabel}` : ""}`+ : alert+ ? "attention needed"+ : undefined;+ const railAriaLabel = !rail || (!railStatusText && !trailingLabel)? undefined- : hasLive- ? `${label}, ${liveCount} live`- : hasBadge- ? `${label}, ${badge}${badgeLabel ? ` ${badgeLabel}` : ""}`- : alert- ? `${label}, attention needed`- : undefined;+ : `${label}${railStatusText ? `, ${railStatusText}` : ""}${trailingLabel ? `, ${trailingLabel}` : ""}`;const link = (<NavLink@@ -97,8 +121,12 @@ export function SidebarNavItem({onClick={() => { if (isMobile) setSidebarOpen(false); }}className={({ isActive }) =>cn(- "flex items-center gap-2.5 px-3 py-2 pointer-coarse:py-1.5 text-(length:--text-compact) font-medium transition-colors",- isActive+ // One rhythm and one inset pill highlight: mx-2 floats the row off+ // the sidebar edges, rounded-lg matches the card anchor, px-2 gives+ // the icon breathing room inside the pill. Rows with hover menus+ // (agents/projects) reserve extra right padding via className.+ "flex items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium transition-colors",+ (active ?? isActive)? "bg-accent text-foreground": "text-foreground/80 hover:bg-accent/50 hover:text-foreground",className,@@ -106,7 +134,7 @@ export function SidebarNavItem({}><span className="relative shrink-0">- <Icon className="h-4 w-4" />+ {iconNode ?? (Icon ? <Icon className="h-4 w-4" /> : null)}{alert && (<span className="absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-red-500 shadow-(--shadow-extract-12)" aria-hidden="true" />)}@@ -114,8 +142,8 @@ export function SidebarNavItem({icon. The icon markup is untouched so it stays pixel-aligned. */}{rail && !alert && hasLive && (<span className="absolute -right-0.5 -top-0.5 flex h-2 w-2" aria-hidden="true">- <span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />- <span className="relative inline-flex h-2 w-2 rounded-full bg-blue-500 shadow-(--shadow-extract-12)" />+ <span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-(--status-agent-running) opacity-75" />+ <span className="relative inline-flex h-2 w-2 rounded-full bg-(--status-agent-running) shadow-(--shadow-extract-12)" /></span>)}{rail && !alert && !hasLive && hasBadge && (@@ -129,38 +157,44 @@ export function SidebarNavItem({)}</span><span className={rail ? SIDEBAR_RAIL_HIDDEN_LABEL : "flex-1 truncate"}>{label}</span>+ {!rail && trailing}{!rail && textBadge && (- <span+ <Badge variant="ghost"className={cn(- "ml-auto rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium leading-none",+ "ml-auto px-1.5 text-(length:--text-nano) leading-none",textBadgeTone === "amber"? "bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-400": "bg-muted text-muted-foreground",)}>{textBadge}- </span>+ </Badge>)}- {!rail && hasLive && (+ {!rail && (hasLive || liveAccessory) && (<span className="ml-auto flex items-center gap-1.5">- <span className="relative flex h-2 w-2">- <span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" />- <span className="relative inline-flex rounded-full h-2 w-2 bg-blue-500" />- </span>- <span className="text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400">{liveCount} live</span>+ {liveAccessory}+ {hasLive && (+ <>+ <span className="relative flex h-2 w-2">+ <span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-(--status-agent-running) opacity-75" />+ <span className="relative inline-flex rounded-full h-2 w-2 bg-(--status-agent-running)" />+ </span>+ <span className="text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400">{liveCount} live</span>+ </>+ )}</span>)}{!rail && hasBadge && (- <span+ <Badge variant="ghost"className={cn(- "ml-auto rounded-full px-1.5 py-0.5 text-xs leading-none",+ "ml-auto px-1.5 leading-none",badgeTone === "danger"? "bg-red-600/90 text-red-50": "bg-primary text-primary-foreground",)}>{badge}- </span>+ </Badge>)}</NavLink>);diff --git a/ui/src/components/SidebarProjects.tsx b/ui/src/components/SidebarProjects.tsxindex 100cc8bed2..e5d28c5f2a 100644--- a/ui/src/components/SidebarProjects.tsx+++ b/ui/src/components/SidebarProjects.tsx@@ -138,7 +138,7 @@ function ProjectItem({if (isMobile) setSidebarOpen(false);}}className={cn(- "flex min-w-0 flex-1 items-center gap-2.5 px-3 py-1.5 pr-8 pointer-coarse:py-1 text-(length:--text-compact) font-medium transition-colors",+ "flex min-w-0 flex-1 items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pr-8 pointer-coarse:py-1 text-(length:--text-compact) font-medium transition-colors",activeProjectRef === routeRef || activeProjectRef === project.id? "bg-accent text-foreground": "text-foreground/80 hover:bg-accent/50 hover:text-foreground",@@ -177,7 +177,7 @@ function ProjectItem({variant="ghost"size="icon-xs"className={cn(- "absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 transition-opacity data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",+ "absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 transition-opacity data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",isMobile? "opacity-100": "pointer-events-none opacity-0 group-hover/project:pointer-events-auto group-hover/project:opacity-100 group-focus-within/project:pointer-events-auto group-focus-within/project:opacity-100",diff --git a/ui/src/components/SidebarStarredProjects.test.tsx b/ui/src/components/SidebarStarredProjects.test.tsxindex e8088f4f46..fcce78b718 100644--- a/ui/src/components/SidebarStarredProjects.test.tsx+++ b/ui/src/components/SidebarStarredProjects.test.tsx@@ -188,7 +188,7 @@ describe("SidebarStarredProjects", () => {await render();- expect(projectLink(container, "alpha")?.className).toContain("pl-8");+ expect(projectLink(container, "alpha")?.className).toContain("pl-6");await act(async () => root?.unmount());root = null;@@ -199,7 +199,7 @@ describe("SidebarStarredProjects", () => {await render();const railProjectLink = projectLink(container, "alpha");- expect(railProjectLink?.className).not.toContain("pl-8");+ expect(railProjectLink?.className).not.toContain("pl-6");const nameSpan = Array.from(container.querySelectorAll("span")).find((el) => el.textContent === "Alpha");expect(nameSpan?.className).toContain("w-0");});diff --git a/ui/src/components/SidebarStarredProjects.tsx b/ui/src/components/SidebarStarredProjects.tsxindex f6e8711b17..38bd96adcf 100644--- a/ui/src/components/SidebarStarredProjects.tsx+++ b/ui/src/components/SidebarStarredProjects.tsx@@ -121,8 +121,8 @@ export function SidebarStarredProjects() {if (isMobile) setSidebarOpen(false);}}className={cn(- "flex min-w-0 flex-1 items-center gap-2.5 px-3 py-1.5 pointer-coarse:py-1 pr-8 text-(length:--text-compact) font-medium transition-colors",- !rail && "pl-8",+ "flex min-w-0 flex-1 items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 pr-8 text-(length:--text-compact) font-medium transition-colors",+ !rail && "pl-6",isActive? "bg-accent text-foreground": "text-foreground/80 hover:bg-accent/50 hover:text-foreground",@@ -151,7 +151,7 @@ export function SidebarStarredProjects() {{!rail && !isMobile ? (// Desktop: quiet inline unstar revealed on hover/focus.- <span className="absolute right-1 top-1/2 -translate-y-1/2">+ <span className="absolute right-3 top-1/2 -translate-y-1/2"><StarTogglesize="row"quiet@@ -171,7 +171,7 @@ export function SidebarStarredProjects() {<Buttonvariant="ghost"size="icon-xs"- className="absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 opacity-100"+ className="absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 opacity-100"aria-label={`Open actions for ${project.name}`}><MoreHorizontal className="h-3.5 w-3.5" />diff --git a/ui/src/components/StatusBadge.tsx b/ui/src/components/StatusBadge.tsxindex 6b121b6696..ed50dffca5 100644--- a/ui/src/components/StatusBadge.tsx+++ b/ui/src/components/StatusBadge.tsx@@ -25,6 +25,8 @@ function sentenceCaseStatus(status: string): string {/*** Generic status badge for runs / goals / approvals (not task status).*/+// design-allow(pill-pattern): DECISION-SHEET.md C8 — status badges keep the bespoke WCAG-tuned+// .status-chip color-mix mechanic and do not wrap the Badge primitive.export function StatusBadge({ status }: { status: string }) {return (<spandiff --git a/ui/src/components/SwipeToArchive.test.tsx b/ui/src/components/SwipeToArchive.test.tsxindex d46d3514bc..5c50617239 100644--- a/ui/src/components/SwipeToArchive.test.tsx+++ b/ui/src/components/SwipeToArchive.test.tsx@@ -243,8 +243,8 @@ describe("SwipeToArchive", () => {const surface = container.querySelector("[data-inbox-row-surface]") as HTMLDivElement | null;expect(surface).not.toBeNull();- expect(surface?.className).toContain("bg-zinc-100");- expect(surface?.className).toContain("dark:bg-zinc-800");+ expect(surface?.className).toContain("bg-accent/50");+ expect(surface?.className).toContain("rounded-lg");expect(surface?.className).not.toContain("bg-card");expect(surface?.style.backgroundColor).toBe("");expect(surface?.style.boxShadow).toBe("");diff --git a/ui/src/components/SwipeToArchive.tsx b/ui/src/components/SwipeToArchive.tsxindex b177f98774..10c34f8f81 100644--- a/ui/src/components/SwipeToArchive.tsx+++ b/ui/src/components/SwipeToArchive.tsx@@ -192,8 +192,11 @@ export function SwipeToArchive({><divaria-hidden="true"- className="pointer-events-none absolute inset-0 flex items-center justify-end bg-emerald-600 px-4 text-white"- style={{ opacity: Math.max(archiveReveal, 0.2) }}+ // Visible only while actually swiping: the selected row surface is+ // translucent (matching the task-list hover), so a resting opacity+ // floor would tint the whole row green and ghost the label through.+ className="pointer-events-none absolute inset-0 flex items-center justify-end rounded-lg bg-emerald-600 px-4 text-white"+ style={{ opacity: archiveReveal }}><span className="inline-flex items-center gap-2 text-sm font-medium"><Archive className="h-4 w-4" />@@ -204,7 +207,7 @@ export function SwipeToArchive({data-inbox-row-surfaceclassName={cn("relative will-change-transform",- selected ? "bg-zinc-100 dark:bg-zinc-800" : "bg-background",+ selected ? "rounded-lg bg-accent/50" : "bg-background",)}style={{transform: `translate3d(${offsetX}px, 0, 0)`,diff --git a/ui/src/components/WorkspaceRuntimeControls.tsx b/ui/src/components/WorkspaceRuntimeControls.tsxindex 2ef657cfbd..575c18fbd4 100644--- a/ui/src/components/WorkspaceRuntimeControls.tsx+++ b/ui/src/components/WorkspaceRuntimeControls.tsx@@ -10,6 +10,7 @@ import {import { Activity, ExternalLink, Loader2, Play, RotateCcw, Square } from "lucide-react";import { Button } from "@/components/ui/button";import { cn } from "@/lib/utils";+import { Badge } from "@/components/ui/badge";export type WorkspaceRuntimeAction = "start" | "stop" | "restart" | "run";@@ -353,8 +354,8 @@ function CommandSection({</div>{item.healthStatus && item.statusLabel !== "stopped" ? (<div className="flex items-center gap-2">- <span className={cn(- "inline-flex items-center rounded-full border px-2.5 py-1 text-(length:--text-micro)",+ <Badge variant="outline" className={cn(+ "px-2.5 py-1 text-(length:--text-micro)",item.healthStatus === "healthy"? "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300": item.healthStatus === "unhealthy"@@ -362,7 +363,7 @@ function CommandSection({: "border-border text-muted-foreground",)}>{item.healthStatus}- </span>+ </Badge></div>) : null}</div>@@ -407,9 +408,9 @@ export function WorkspaceRuntimeControls({<div className="space-y-1"><div className="text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Workspace commands</div><div className="flex flex-wrap items-center gap-2">- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-medium",+ "gap-1.5 px-2.5 py-1",runningCount > 0? "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300": "border-border bg-background text-muted-foreground",@@ -417,7 +418,7 @@ export function WorkspaceRuntimeControls({><Activity className="h-3.5 w-3.5" />{runningCount > 0 ? `${runningCount} services running` : "No services running"}- </span>+ </Badge><span className="text-xs text-muted-foreground">{resolvedSections.jobs.length > 0? `${resolvedSections.jobs.length} job${resolvedSections.jobs.length === 1 ? "" : "s"} available to run on demand.`diff --git a/ui/src/components/artifacts/ArtifactCard.test.tsx b/ui/src/components/artifacts/ArtifactCard.test.tsxindex be2728603a..538691e8de 100644--- a/ui/src/components/artifacts/ArtifactCard.test.tsx+++ b/ui/src/components/artifacts/ArtifactCard.test.tsx@@ -52,7 +52,7 @@ describe("ArtifactCard", () => {expect(markup).toContain('href="/issues/PAP-10306#attachment-art-1"');expect(markup).toContain('data-disable-issue-quicklook="true"');expect(markup).toContain('data-media-kind="image"');- expect(markup).toContain("rounded-(--rad-8)");+ expect(markup).toContain("rounded-lg");expect(markup).toContain('src="/files/art-1.png"');expect(markup).toContain("object-cover");expect(markup).toContain("Hero shot");diff --git a/ui/src/components/artifacts/ArtifactCard.tsx b/ui/src/components/artifacts/ArtifactCard.tsxindex 5a23575293..2415d4e729 100644--- a/ui/src/components/artifacts/ArtifactCard.tsx+++ b/ui/src/components/artifacts/ArtifactCard.tsx@@ -193,11 +193,12 @@ function SecondaryAction({export function ArtifactCard({ artifact }: ArtifactCardProps) {return (<Link+ // design-allow(card-pattern): navigation <Link> card; Card renders a div and would break anchor semantics (C5a Run 3)to={artifact.href}disableIssueQuicklookdata-testid="artifact-card"data-media-kind={artifact.mediaKind}- className="group flex flex-col overflow-hidden rounded-(--rad-8) border border-border bg-card transition-colors hover:border-foreground/20"+ className="group flex flex-col overflow-hidden rounded-lg border border-border bg-card cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><ArtifactPreview artifact={artifact} />diff --git a/ui/src/components/artifacts/ArtifactGroupCard.tsx b/ui/src/components/artifacts/ArtifactGroupCard.tsxindex 7d1059b20d..ce8e560af2 100644--- a/ui/src/components/artifacts/ArtifactGroupCard.tsx+++ b/ui/src/components/artifacts/ArtifactGroupCard.tsx@@ -4,6 +4,7 @@ import type { CompanyArtifactGroup } from "@/api/artifacts";import { Link } from "@/lib/router";import { ArtifactPreview } from "@/components/artifacts/ArtifactCard";import { formatDate } from "@/lib/utils";+import { Badge } from "@/components/ui/badge";interface ArtifactGroupCardProps {group: CompanyArtifactGroup;@@ -29,16 +30,17 @@ export function ArtifactGroupCard({ group, to }: ArtifactGroupCardProps) {<divaria-hidden="true"data-testid="artifact-stack-layer"- className="pointer-events-none absolute inset-0 translate-x-(--sz-8px) translate-y-(--sz-8px) rounded-(--rad-8) border border-border bg-muted/40 shadow-sm"+ className="pointer-events-none absolute inset-0 translate-x-(--sz-8px) translate-y-(--sz-8px) rounded-lg border border-border bg-muted/70"/><divaria-hidden="true"data-testid="artifact-stack-layer"- className="pointer-events-none absolute inset-0 translate-x-(--sz-4px) translate-y-(--sz-4px) rounded-(--rad-8) border border-border bg-muted/70 shadow-sm"+ className="pointer-events-none absolute inset-0 translate-x-(--sz-4px) translate-y-(--sz-4px) rounded-lg border border-border bg-muted/40"/></>) : null}+ {/* design-allow(card-pattern): navigation <Link> card; Card renders a div and would break anchor semantics (C5a Run 3) */}<Linkto={to}title={countLabel}@@ -46,7 +48,7 @@ export function ArtifactGroupCard({ group, to }: ArtifactGroupCardProps) {data-group-id={group.id}data-count={group.count}data-stacked={stacked ? "true" : "false"}- className="group relative flex flex-col overflow-hidden rounded-(--rad-8) border border-border bg-card transition-colors hover:border-foreground/20"+ className="group relative flex flex-col overflow-hidden rounded-lg border border-border bg-card cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"><div className="relative">{preview ? (@@ -56,10 +58,10 @@ export function ArtifactGroupCard({ group, to }: ArtifactGroupCardProps) {<Layers className="h-7 w-7" aria-hidden="true" /></div>)}- <span className="absolute right-2 top-2 inline-flex items-center gap-1 rounded-full bg-background/85 px-2 py-0.5 text-(length:--text-micro) font-medium text-foreground/90 shadow-sm backdrop-blur">+ <Badge variant="ghost" className="absolute right-2 top-2 bg-background/85 text-(length:--text-micro) text-foreground/90 shadow-sm backdrop-blur"><Layers className="h-3 w-3" aria-hidden="true" />{group.count}- </span>+ </Badge></div><div className="flex flex-1 flex-col gap-1 p-3">diff --git a/ui/src/components/issue-output/OutputPrimaryCard.tsx b/ui/src/components/issue-output/OutputPrimaryCard.tsxindex 31547b1124..ceae885a05 100644--- a/ui/src/components/issue-output/OutputPrimaryCard.tsx+++ b/ui/src/components/issue-output/OutputPrimaryCard.tsx@@ -11,6 +11,7 @@ import {} from "@/lib/issue-output";import { OutputVideoPlayer } from "./OutputVideoPlayer";import { OutputFileTile } from "./OutputFileTile";+import { Card } from "@/components/ui/card";interface OutputPrimaryCardProps {item: IssueOutputItem;@@ -34,7 +35,7 @@ export function OutputPrimaryCard({ item, creatorName, onMediaClick }: OutputPriconst isVideo = Boolean(meta && isVideoLikeOutput(contentType, meta.originalFilename));return (- <div className="overflow-hidden rounded-md border border-border bg-card">+ <Card className="block overflow-hidden py-0">{/* Media region */}{isVideo && meta ? (<OutputVideoPlayer src={meta.contentPath} title={filename} />@@ -121,6 +122,6 @@ export function OutputPrimaryCard({ item, creatorName, onMediaClick }: OutputPri</div>) : null}</div>- </div>+ </Card>);}diff --git a/ui/src/components/issue-output/OutputRow.tsx b/ui/src/components/issue-output/OutputRow.tsxindex 66e688bfc4..b4bb27398a 100644--- a/ui/src/components/issue-output/OutputRow.tsx+++ b/ui/src/components/issue-output/OutputRow.tsx@@ -3,6 +3,7 @@ import { Button } from "@/components/ui/button";import { cn, relativeTime } from "@/lib/utils";import { formatBytes, outputFilename, type IssueOutputItem } from "@/lib/issue-output";import { OutputFileTile } from "./OutputFileTile";+import { Card } from "@/components/ui/card";interface OutputRowProps {item: IssueOutputItem;@@ -23,7 +24,7 @@ export function OutputRow({ item, creatorName }: OutputRowProps) {metaBits.push(relativeTime(item.createdAt));return (- <div className="flex items-center gap-2.5 rounded-md border border-border bg-card p-2">+ <Card className="flex-row items-center gap-2.5 p-2"><OutputFileTile contentType={meta?.contentType} /><div className="min-w-0 flex-1"><p className="truncate text-sm font-medium text-foreground" title={filename}>@@ -52,6 +53,6 @@ export function OutputRow({ item, creatorName }: OutputRowProps) {</Button></div>) : null}- </div>+ </Card>);}diff --git a/ui/src/components/issue-properties/IssueProperties.tsx b/ui/src/components/issue-properties/IssueProperties.tsxindex 90067a5f53..e9f41bd41e 100644--- a/ui/src/components/issue-properties/IssueProperties.tsx+++ b/ui/src/components/issue-properties/IssueProperties.tsx@@ -74,6 +74,7 @@ import {import { PropertyPicker } from "./property-picker";import { PropertyChip, PropertyRow, PropertySection } from "./primitives";import { ExpandRelationListButton, RemovableIssueReferencePill } from "./relation-controls";+import { Badge } from "@/components/ui/badge";function TruncatedCopyable({ value, icon: Icon }: { value: string; icon: ComponentType<{ className?: string }> }) {const [copied, setCopied] = useState(false);@@ -1235,9 +1236,9 @@ export function IssueProperties({</PropertyChip>))}{selectedIssueLabels.length > 3 && (- <span className="inline-flex items-center gap-1 rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground">+ <Badge variant="outline" className="border-border text-muted-foreground">+{selectedIssueLabels.length - 3} more- </span>+ </Badge>)}</div>) : (diff --git a/ui/src/components/issue-properties/primitives.tsx b/ui/src/components/issue-properties/primitives.tsxindex 3c7daa8054..d2fcb94223 100644--- a/ui/src/components/issue-properties/primitives.tsx+++ b/ui/src/components/issue-properties/primitives.tsx@@ -1,4 +1,5 @@import type { CSSProperties, ReactNode } from "react";+import { Badge } from "@/components/ui/badge";import { cn } from "../../lib/utils";export function PropertySection({@@ -74,12 +75,14 @@ export function PropertyChip({style?: CSSProperties;}) {return (- <span- className={cn("inline-flex max-w-full min-w-0 items-center gap-1 truncate rounded-full border px-2 py-0.5 text-xs", className)}+ <Badge+ variant="outline"+ // Badge chassis; keep this chip's truncation + normal weight + start alignment.+ className={cn("max-w-full min-w-0 justify-start truncate font-normal", className)}style={style}title={typeof children === "string" ? children : undefined}>{children}- </span>+ </Badge>);}diff --git a/ui/src/components/search/MatchSourceChip.tsx b/ui/src/components/search/MatchSourceChip.tsxindex d370bdd533..95c3adf084 100644--- a/ui/src/components/search/MatchSourceChip.tsx+++ b/ui/src/components/search/MatchSourceChip.tsx@@ -27,6 +27,8 @@ export interface MatchSourceChipProps {className?: string;}+// design-allow(pill-pattern): --chip-match-* domain token family (DESIGN.md domain tier); a+// deliberately separate chip system, not a Badge.export function MatchSourceChip({ kind, count, label, className }: MatchSourceChipProps) {const text = label ?? chipLabels[kind];const showCount = typeof count === "number" && count > 1;diff --git a/ui/src/components/timeline/WorkTimelineChart.tsx b/ui/src/components/timeline/WorkTimelineChart.tsxindex 3f223797de..1c155f7a45 100644--- a/ui/src/components/timeline/WorkTimelineChart.tsx+++ b/ui/src/components/timeline/WorkTimelineChart.tsx@@ -752,6 +752,7 @@ function Tooltip({ tooltip, now }: { tooltip: TooltipState; now: number }) {const left = Math.min(tooltip.x + 14, (typeof window !== "undefined" ? window.innerWidth : 1200) - 300);return (<div+ // design-allow(card-pattern): floating cursor-follow chart tooltip, not a content card (C5a Run 3)className="pointer-events-none fixed z-50 max-w-(--sz-280px) rounded-md border border-foreground bg-card px-2.5 py-2 text-xs shadow-md"style={{ left, top: tooltip.y + 14 }}>diff --git a/ui/src/components/ui/card.tsx b/ui/src/components/ui/card.tsxindex 3a67a4b7b6..c4e82f8518 100644--- a/ui/src/components/ui/card.tsx+++ b/ui/src/components/ui/card.tsx@@ -2,12 +2,25 @@ import * as React from "react"import { cn } from "@/lib/utils"-function Card({ className, ...props }: React.ComponentProps<"div">) {+function Card({+ className,+ interactive = false,+ ...props+}: React.ComponentProps<"div"> & {+ /**+ * The whole card is a click target: quiet hover affordance (border darkens,+ * slight lift), pointer cursor, keyboard focus ring. Static containers omit+ * it — one Card, two modes.+ */+ interactive?: boolean+}) {return (<divdata-slot="card"className={cn(- "bg-card text-card-foreground flex flex-col gap-6 border py-6 shadow-sm",+ "bg-card text-card-foreground flex flex-col gap-6 rounded-lg border py-6",+ interactive &&+ "cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",className)}{...props}diff --git a/ui/src/hooks/useKeyboardShortcuts.test.tsx b/ui/src/hooks/useKeyboardShortcuts.test.tsxindex f2279ec24a..a309a46272 100644--- a/ui/src/hooks/useKeyboardShortcuts.test.tsx+++ b/ui/src/hooks/useKeyboardShortcuts.test.tsx@@ -12,16 +12,19 @@ function TestHarness({onNewIssue,onSearch,onToggleCollapse,+ onGoToInbox,}: {onNewIssue: () => void;onSearch?: () => void;onToggleCollapse?: () => void;+ onGoToInbox?: () => void;}) {useKeyboardShortcuts({enabled: true,onNewIssue,onSearch,onToggleCollapse,+ onGoToInbox,});return <div>keyboard shortcuts test</div>;@@ -139,6 +142,65 @@ describe("useKeyboardShortcuts", () => {});});+ const pressKey = (key: string) => {+ const event = new KeyboardEvent("keydown", { key, bubbles: true, cancelable: true });+ document.dispatchEvent(event);+ return event;+ };++ it("navigates to the inbox on the g \u2192 i chord", () => {+ const root = createRoot(container);+ const onGoToInbox = vi.fn();+ const onNewIssue = vi.fn();++ act(() => {+ root.render(<TestHarness onNewIssue={onNewIssue} onGoToInbox={onGoToInbox} />);+ });++ // Bare "i" does nothing.+ pressKey("i");+ expect(onGoToInbox).not.toHaveBeenCalled();++ pressKey("g");+ const chordEvent = pressKey("i");+ expect(onGoToInbox).toHaveBeenCalledTimes(1);+ expect(chordEvent.defaultPrevented).toBe(true);++ // Chord disarms after firing.+ pressKey("i");+ expect(onGoToInbox).toHaveBeenCalledTimes(1);+ expect(onNewIssue).not.toHaveBeenCalled();++ act(() => {+ root.unmount();+ });+ });++ it("swallows armed chord keys instead of firing bare shortcuts", () => {+ const root = createRoot(container);+ const onGoToInbox = vi.fn();+ const onNewIssue = vi.fn();++ act(() => {+ root.render(<TestHarness onNewIssue={onNewIssue} onGoToInbox={onGoToInbox} />);+ });++ // g \u2192 c is the issue-detail focus-comment chord; globally it must not+ // open the new-issue dialog.+ pressKey("g");+ pressKey("c");+ expect(onNewIssue).not.toHaveBeenCalled();+ expect(onGoToInbox).not.toHaveBeenCalled();++ // Bare "c" still creates.+ pressKey("c");+ expect(onNewIssue).toHaveBeenCalledTimes(1);++ act(() => {+ root.unmount();+ });+ });+it("does not fire onToggleCollapse for a bare 'b' keypress", () => {const root = createRoot(container);const onToggleCollapse = vi.fn();diff --git a/ui/src/hooks/useKeyboardShortcuts.ts b/ui/src/hooks/useKeyboardShortcuts.tsindex 2bc51a2ec7..1f37a9630a 100644--- a/ui/src/hooks/useKeyboardShortcuts.ts+++ b/ui/src/hooks/useKeyboardShortcuts.ts@@ -3,6 +3,7 @@ import {focusPageSearchShortcutTarget,hasBlockingShortcutDialog,isKeyboardShortcutTextInputTarget,+ resolveIssueDetailGoKeyAction,} from "../lib/keyboardShortcuts";interface ShortcutHandlers {@@ -13,6 +14,7 @@ interface ShortcutHandlers {onToggleCollapse?: () => void;onTogglePanel?: () => void;onShowShortcuts?: () => void;+ onGoToInbox?: () => void;}export function useKeyboardShortcuts({@@ -23,15 +25,72 @@ export function useKeyboardShortcuts({onToggleCollapse,onTogglePanel,onShowShortcuts,+ onGoToInbox,}: ShortcutHandlers) {useEffect(() => {if (!enabled) return;+ // g → i chord state. IssueDetail runs its own capture-phase handler with+ // extra chords (g c, g f) and stops propagation when it handles one, so+ // this bubble-phase chord only fires outside the issue detail page.+ let goChordArmed = false;+ let goChordTimeout: number | null = null;+ const clearGoChordTimeout = () => {+ if (goChordTimeout !== null) {+ window.clearTimeout(goChordTimeout);+ goChordTimeout = null;+ }+ };+ const disarmGoChord = () => {+ goChordArmed = false;+ clearGoChordTimeout();+ };+ const armGoChord = () => {+ goChordArmed = true;+ clearGoChordTimeout();+ goChordTimeout = window.setTimeout(() => {+ goChordArmed = false;+ goChordTimeout = null;+ }, 1200);+ };+function handleKeyDown(e: KeyboardEvent) {if (e.defaultPrevented) {+ disarmGoChord();return;}+ if (onGoToInbox) {+ const chordAction = resolveIssueDetailGoKeyAction({+ armed: goChordArmed,+ defaultPrevented: e.defaultPrevented,+ key: e.key,+ metaKey: e.metaKey,+ ctrlKey: e.ctrlKey,+ altKey: e.altKey,+ target: e.target,+ hasOpenDialog: hasBlockingShortcutDialog(),+ });+ if (chordAction === "arm") {+ armGoChord();+ return;+ }+ if (chordAction === "navigate_inbox") {+ disarmGoChord();+ e.preventDefault();+ onGoToInbox();+ return;+ }+ if (chordAction === "focus_comment" || chordAction === "open_file_viewer") {+ // Armed chord keys that only mean something on the issue detail+ // page — swallow them so they don't trigger bare shortcuts (c).+ disarmGoChord();+ e.preventDefault();+ return;+ }+ if (chordAction === "disarm") disarmGoChord();+ }+// Don't fire shortcuts when typing in inputsif (isKeyboardShortcutTextInputTarget(e.target)) {return;@@ -82,7 +141,19 @@ export function useKeyboardShortcuts({}}+ const handlePointerDown = () => disarmGoChord();+ const handleFocusIn = (e: FocusEvent) => {+ if (e.target instanceof HTMLElement && e.target !== document.body) disarmGoChord();+ };++ document.addEventListener("pointerdown", handlePointerDown, true);+ document.addEventListener("focusin", handleFocusIn, true);document.addEventListener("keydown", handleKeyDown);- return () => document.removeEventListener("keydown", handleKeyDown);- }, [enabled, onNewIssue, onSearch, onToggleSidebar, onToggleCollapse, onTogglePanel, onShowShortcuts]);+ return () => {+ disarmGoChord();+ document.removeEventListener("pointerdown", handlePointerDown, true);+ document.removeEventListener("focusin", handleFocusIn, true);+ document.removeEventListener("keydown", handleKeyDown);+ };+ }, [enabled, onNewIssue, onSearch, onToggleSidebar, onToggleCollapse, onTogglePanel, onShowShortcuts, onGoToInbox]);}diff --git a/ui/src/index.css b/ui/src/index.cssindex d836dd7b2b..78631c1643 100644--- a/ui/src/index.css+++ b/ui/src/index.css@@ -54,13 +54,15 @@--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);--color-sidebar-border: var(--sidebar-border);--color-sidebar-ring: var(--sidebar-ring);- /* Monotonic radius ladder, all derived from the single --radius knob- (DECISION-SHEET B4): retune the whole app's corner language by editing- --radius alone. Replaces the legacy square-brand lg/xl = 0px. */- --radius-sm: calc(var(--radius) - 4px);- --radius-md: calc(var(--radius) - 2px);+ /* Multiplicative radius ladder (modern shadcn/Tailwind v4 mapping):+ sm/md/lg/xl/2xl/3xl/4xl = 0.6/0.8/1.0/1.4/1.8/2.2/2.6 x the single+ --radius knob (base anchor 0.5rem = 8px; rounded-lg IS the anchor).+ Replaces the additive +/-px ladder (DECISION-SHEET B4 → Run 3 review):+ retune the whole app's corner language by editing --radius alone. */+ --radius-sm: calc(var(--radius) * 0.6);+ --radius-md: calc(var(--radius) * 0.8);--radius-lg: var(--radius);- --radius-xl: calc(var(--radius) + 4px);+ --radius-xl: calc(var(--radius) * 1.4);--font-heading: var(--font-sans);--radius-2xl: calc(var(--radius) * 1.8);--radius-3xl: calc(var(--radius) * 2.2);@@ -69,7 +71,7 @@:root {color-scheme: light;- --radius: 0.45rem;+ --radius: 0.5rem;--background: oklch(1 0 0);--foreground: oklch(0.145 0 0);--card: oklch(1 0 0);@@ -1463,11 +1465,13 @@ span.paperclip-mention-chip[data-mention-kind="external-object"] {--hex-facc15: #facc15; /* OrgChart.tsx agent status dot — 'paused' / 'idle' (shared value). */--hex-f87171: #f87171; /* OrgChart.tsx agent status dot — 'error'. */--hex-a3a3a3: #a3a3a3; /* OrgChart.tsx agent status dot — 'terminated' + defaultDotColor fallback. */- --hex-ef4444: #ef4444; /* ActivityCharts.tsx — priority 'critical'; also the <0.5 success-rate bar tint. (Chart STATUS hues re-pointed at --status-task-* in DECISION-SHEET.md B5; priority/success series stay independent.) */+ --hex-ef4444: #ef4444; /* ActivityCharts.tsx — priority 'critical'; also the <0.5 success-rate bar tint and the run-activity 'failed' segment. (Chart STATUS hues re-pointed at --status-task-* in DECISION-SHEET.md B5; priority/success series stay independent.) */--hex-f97316: #f97316; /* ActivityCharts.tsx — priority 'high'. */--hex-eab308: #eab308; /* ActivityCharts.tsx — priority 'medium'; also the 0.5-0.8 success-rate bar tint. */--hex-6b7280: #6b7280; /* ActivityCharts.tsx — priority 'low' + unknown-status statusColors fallback. */- --hex-10b981: #10b981; /* ActivityCharts.tsx — >=0.8 success-rate bar tint. */+ --hex-10b981: #10b981; /* ActivityCharts.tsx — >=0.8 success-rate bar tint; also the run-activity 'succeeded' segment. */+ --hex-f59e0b: #f59e0b; /* ActivityCharts.tsx — run-activity 'recovered' segment (independent run-outcome series; same value as --status-task-todo by coincidence, decoupled on purpose). */+ --hex-737373: #737373; /* ActivityCharts.tsx — run-activity 'other' segment (neutral). */--project-none: #64748b; /* Semantic rename of --hex-64748b (DECISION-SHEET.md A3, value unchanged). 'No project assigned' muted-slate fallback (TOKEN-AUDIT.md 1.3) across Routines/MarkdownEditor/RoutineRunVariablesDialog/RoutineList/IssueColumns/editable-sections; also ActivityCharts.tsx status 'backlog'. */--project-seed: #6366f1; /* Semantic rename of --hex-6366f1 (DECISION-SHEET.md A3, value unchanged). Project-color-fallback indigo seed default (ProjectDetail/PipelineSettings/IssueProperties/NewIssueDialog) — new-project-color-picker-seed family per TOKEN-AUDIT.md 1.3. */--liveness-blue: #2563eb; /* DECISION-SHEET.md A6: IssueChatThread.tsx human-message 'liveness blue' bubble (PAP-95 rev 5). Same value as --status-task-in_progress by coincidence, decoupled on purpose so a future status-hue change doesn't drag the chat bubble along. */@@ -1671,7 +1675,6 @@ span.paperclip-mention-chip[data-mention-kind="external-object"] {--rad-3: 3px; /* Extracted from ui/src/components/ExternalObjectPill.tsx (ring-[3px]). */--rad-4: 4px; /* Extracted from ui/src/components/IssueChatThread.tsx (rounded-br-[4px]). */--rad-2: 2px; /* Extracted from ui/src/components/SidebarCompanyMenu.tsx (ring-[2px]). */- --rad-8: 8px; /* Extracted from ui/src/components/artifacts/ArtifactCard.test.tsx (rounded-[8px]). */--rad-14: 14px; /* Extracted from ui/src/pages/CompanySettings.tsx (rounded-[14px]). */--rad-28: 28px; /* Extracted from ui/src/pages/InviteUxLab.tsx (rounded-[28px]). */--rad-24: 24px; /* Extracted from ui/src/pages/InviteUxLab.tsx (rounded-[24px]). */diff --git a/ui/src/pages/Activity.tsx b/ui/src/pages/Activity.tsxindex e205212e1c..b335b4458b 100644--- a/ui/src/pages/Activity.tsx+++ b/ui/src/pages/Activity.tsx@@ -19,6 +19,7 @@ import {SelectValue,} from "@/components/ui/select";import { History } from "lucide-react";+import { Card } from "@/components/ui/card";const ACTIVITY_PAGE_LIMIT = 200;@@ -142,7 +143,7 @@ export function Activity() {)}{filtered && filtered.length > 0 && (- <div className="border border-border divide-y divide-border">+ <Card className="block py-0 overflow-hidden divide-y divide-border">{filtered.map((event) => (<ActivityRowkey={event.id}@@ -153,7 +154,7 @@ export function Activity() {entityTitleMap={entityTitleMap}/>))}- </div>+ </Card>)}</div>);diff --git a/ui/src/pages/AdapterManager.tsx b/ui/src/pages/AdapterManager.tsxindex 733b59d89a..887c2e7e68 100644--- a/ui/src/pages/AdapterManager.tsx+++ b/ui/src/pages/AdapterManager.tsx@@ -546,7 +546,8 @@ export function AdapterManager() {</CardContent></Card>) : (- <ul className="divide-y rounded-md border bg-card">+ <Card className="block py-0">+ <ul className="divide-y">{externalAdapters.map((adapter) => {const isBuiltinOverride = adapter.overriddenBuiltin;const overridePaused = isBuiltinOverride && !!adapter.overridePaused;@@ -580,6 +581,7 @@ export function AdapterManager() {);})}</ul>+ </Card>)}</section>@@ -593,7 +595,8 @@ export function AdapterManager() {{builtinAdapters.length === 0 && overriddenBuiltins.length === 0 ? (<div className="text-sm text-muted-foreground">No built-in adapters found.</div>) : (- <ul className="divide-y rounded-md border bg-card">+ <Card className="block py-0">+ <ul className="divide-y">{builtinAdapters.map((adapter) => (<AdapterRowkey={adapter.type}@@ -630,6 +633,7 @@ export function AdapterManager() {/>))}</ul>+ </Card>)}</section>diff --git a/ui/src/pages/AgentDetail.tsx b/ui/src/pages/AgentDetail.tsxindex bc838024bf..dea43a2d4f 100644--- a/ui/src/pages/AgentDetail.tsx+++ b/ui/src/pages/AgentDetail.tsx@@ -107,6 +107,7 @@ import {useResourceMembershipMutation,useResourceMemberships,} from "../hooks/useResourceMemberships";+import { Badge } from "@/components/ui/badge";import {applyAgentSkillSnapshot,arraysEqual,@@ -487,14 +488,14 @@ function workspaceOperationStatusTone(status: WorkspaceOperation["status"]) {function WorkspaceOperationStatusBadge({ status }: { status: WorkspaceOperation["status"] }) {return (- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center rounded-full border px-2 py-0.5 text-(length:--text-micro) font-medium capitalize",+ "text-(length:--text-micro) capitalize",workspaceOperationStatusTone(status),)}>{status.replace("_", " ")}- </span>+ </Badge>);}@@ -1305,15 +1306,15 @@ function LatestRunCard({ runs, agentId }: { runs: HeartbeatRun[]; agentId: strin<StatusIcon className={cn("h-3.5 w-3.5", statusInfo.color, run.status === "running" && "animate-spin")} /><StatusBadge status={run.status} /><span className="font-mono text-xs text-muted-foreground">{run.id.slice(0, 8)}</span>- <span className={cn(- "inline-flex items-center rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium",+ <Badge variant="ghost" className={cn(+ "px-1.5 text-(length:--text-nano)",run.invocationSource === "timer" ? "bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300": run.invocationSource === "assignment" ? "bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300": run.invocationSource === "on_demand" ? "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/50 dark:text-cyan-300": "bg-muted text-muted-foreground")}>{sourceLabels[run.invocationSource] ?? run.invocationSource}- </span>+ </Badge><span className="ml-auto text-xs text-muted-foreground">{relativeTime(run.createdAt)}</span></div>@@ -3042,15 +3043,15 @@ function RunListItem({ run, isSelected, agentId }: { run: HeartbeatRun; isSelect<span className="font-mono text-xs text-muted-foreground">{run.id.slice(0, 8)}</span>- <span className={cn(- "inline-flex items-center rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium shrink-0",+ <Badge variant="ghost" className={cn(+ "px-1.5 text-(length:--text-nano)",run.invocationSource === "timer" ? "bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300": run.invocationSource === "assignment" ? "bg-violet-100 text-violet-700 dark:bg-violet-900/50 dark:text-violet-300": run.invocationSource === "on_demand" ? "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/50 dark:text-cyan-300": "bg-muted text-muted-foreground")}>{sourceLabels[run.invocationSource] ?? run.invocationSource}- </span>+ </Badge>{sourceResolvedFold ? <SourceResolvedFoldBadge showIcon={false} className="shrink-0 text-(length:--text-nano) py-0" /> : null}<span className="ml-auto text-(length:--text-micro) text-muted-foreground shrink-0">{relativeTime(run.createdAt)}diff --git a/ui/src/pages/Agents.tsx b/ui/src/pages/Agents.tsxindex bcc7570274..2f0ff53210 100644--- a/ui/src/pages/Agents.tsx+++ b/ui/src/pages/Agents.tsx@@ -455,7 +455,7 @@ export function Agents() {{/* List view */}{effectiveView === "list" && filtered.length > 0 && (- <div className="border border-border">+ <div>{filtered.map(renderAgentRow)}</div>)}@@ -468,7 +468,7 @@ export function Agents() {{/* Org chart view */}{effectiveView === "org" && filteredOrg.length > 0 && (- <div className="border border-border py-1">+ <div className="py-1">{filteredOrg.map((node) => (<OrgTreeNodekey={node.id}@@ -540,7 +540,7 @@ function OrgTreeNode({<Linkto={agent ? agentUrl(agent) : `/agents/${node.id}`}className={cn(- "group flex items-center gap-3 px-3 py-2 hover:bg-accent/30 transition-colors w-full text-left no-underline text-inherit",+ "group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-accent/50 transition-colors w-full text-left no-underline text-inherit",agent?.pausedAt && tab !== "paused" && "opacity-50",membershipState === "left" && "text-foreground/55",)}@@ -627,7 +627,7 @@ function OrgTreeNode({</div></Link>{node.reports && node.reports.length > 0 && (- <div className="border-l border-border/50 ml-4">+ <div className="border-l border-border ml-4">{node.reports.map((child) => (<OrgTreeNodekey={child.id}diff --git a/ui/src/pages/Approvals.tsx b/ui/src/pages/Approvals.tsxindex 4369d83359..597e48e1eb 100644--- a/ui/src/pages/Approvals.tsx+++ b/ui/src/pages/Approvals.tsx@@ -12,6 +12,7 @@ import { Tabs } from "@/components/ui/tabs";import { ShieldCheck } from "lucide-react";import { ApprovalCard } from "../components/ApprovalCard";import { PageSkeleton } from "../components/PageSkeleton";+import { Badge } from "@/components/ui/badge";type StatusFilter = "pending" | "all";@@ -88,12 +89,12 @@ export function Approvals() {<Tabs value={statusFilter} onValueChange={(v) => navigate(`/approvals/${v}`)}><PageTabBar items={[{ value: "pending", label: <>Pending{pendingCount > 0 && (- <span className={cn(- "ml-1.5 rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium",+ <Badge variant="ghost" className={cn(+ "ml-1.5 px-1.5 text-(length:--text-nano)","bg-yellow-500/20 text-yellow-500")}>{pendingCount}- </span>+ </Badge>)}</> },{ value: "all", label: "All" },]} />diff --git a/ui/src/pages/BoardChat.tsx b/ui/src/pages/BoardChat.tsxindex cb6037cc0c..0faafa9cc8 100644--- a/ui/src/pages/BoardChat.tsx+++ b/ui/src/pages/BoardChat.tsx@@ -796,6 +796,7 @@ export function BoardChat() {setInput(chip.prompt);composerRef.current?.focus();}}+ // design-allow(card-pattern): interactive suggestion-pill <button>, not a content card (C5a Run 3)className="rounded-full border border-border bg-card px-3 py-1.5 text-xs text-muted-foreground transition-colors duration-150 hover:bg-accent hover:text-foreground">{chip.label}@@ -941,6 +942,7 @@ export function BoardChat() {type="button"onClick={() => scrollToLatest("smooth")}aria-label="Jump to latest messages"+ // design-allow(card-pattern): floating scroll-to-bottom <button>, not a content card (C5a Run 3)className="absolute bottom-24 left-1/2 z-20 grid h-8 w-8 -translate-x-1/2 place-items-center rounded-full border border-border bg-card text-foreground shadow-md transition-colors duration-150 hover:bg-accent hover:border-muted-foreground/30"><ArrowDown className="h-4 w-4" />diff --git a/ui/src/pages/BoardClaim.tsx b/ui/src/pages/BoardClaim.tsxindex 334a086155..0af36cb35f 100644--- a/ui/src/pages/BoardClaim.tsx+++ b/ui/src/pages/BoardClaim.tsx@@ -5,6 +5,7 @@ import { accessApi } from "../api/access";import { authApi } from "../api/auth";import { queryKeys } from "../lib/queryKeys";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";export function BoardClaimPage() {const queryClient = useQueryClient();@@ -51,12 +52,12 @@ export function BoardClaimPage() {if (statusQuery.error) {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-lg font-semibold">Claim challenge unavailable</h1><p className="mt-2 text-sm text-muted-foreground">{statusQuery.error instanceof Error ? statusQuery.error.message : "Challenge is invalid or expired."}</p>- </div>+ </Card></div>);}@@ -69,7 +70,7 @@ export function BoardClaimPage() {if (status.status === "claimed") {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-lg font-semibold">Board ownership claimed</h1><p className="mt-2 text-sm text-muted-foreground">This instance is now linked to your authenticated user.@@ -77,7 +78,7 @@ export function BoardClaimPage() {<Button asChild className="mt-4"><Link to="/">Open board</Link></Button>- </div>+ </Card></div>);}@@ -85,7 +86,7 @@ export function BoardClaimPage() {if (!sessionQuery.data) {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-lg font-semibold">Sign in required</h1><p className="mt-2 text-sm text-muted-foreground">Sign in or create an account, then return to this page to claim Board ownership.@@ -93,14 +94,14 @@ export function BoardClaimPage() {<Button asChild className="mt-4"><Link to={`/auth?next=${encodeURIComponent(currentPath)}`}>Sign in / Create account</Link></Button>- </div>+ </Card></div>);}return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-xl font-semibold">Claim Board ownership</h1><p className="mt-2 text-sm text-muted-foreground">This will promote your user to instance admin and migrate company ownership access from local trusted mode.@@ -119,7 +120,7 @@ export function BoardClaimPage() {>{claimMutation.isPending ? "Claiming…" : "Claim ownership"}</Button>- </div>+ </Card></div>);}diff --git a/ui/src/pages/BootstrapSetupUxLab.tsx b/ui/src/pages/BootstrapSetupUxLab.tsxindex 35d49644c8..d13b897142 100644--- a/ui/src/pages/BootstrapSetupUxLab.tsx+++ b/ui/src/pages/BootstrapSetupUxLab.tsx@@ -2,6 +2,7 @@ import type { ReactElement, ReactNode } from "react";import { Loader2, ShieldCheck, Terminal, TriangleAlert } from "lucide-react";import { BOOTSTRAP_FALLBACK_COMMAND } from "@/bootstrapSetup";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";type LabFixtureKey =| "signed-out-private"@@ -51,7 +52,7 @@ function CliFallback({ hasActiveInvite }: { hasActiveInvite: boolean }) {function StateChrome({ children }: { children: ReactNode }) {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">{children}</div>+ <Card className="block p-6">{children}</Card></div>);}diff --git a/ui/src/pages/CliAuth.tsx b/ui/src/pages/CliAuth.tsxindex 6ccb2a55d4..cb40bc6958 100644--- a/ui/src/pages/CliAuth.tsx+++ b/ui/src/pages/CliAuth.tsx@@ -2,6 +2,7 @@ import { useMemo } from "react";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { Link, useParams, useSearchParams } from "@/lib/router";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { accessApi } from "../api/access";import { authApi } from "../api/auth";import { queryKeys } from "../lib/queryKeys";@@ -55,12 +56,12 @@ export function CliAuthPage() {if (challengeQuery.error) {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-lg font-semibold">CLI auth challenge unavailable</h1><p className="mt-2 text-sm text-muted-foreground">{challengeQuery.error instanceof Error ? challengeQuery.error.message : "Challenge is invalid or expired."}</p>- </div>+ </Card></div>);}@@ -73,7 +74,7 @@ export function CliAuthPage() {if (challenge.status === "approved") {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-xl font-semibold">CLI access approved</h1><p className="mt-2 text-sm text-muted-foreground">The Paperclip CLI can now finish authentication on the requesting machine.@@ -81,7 +82,7 @@ export function CliAuthPage() {<p className="mt-4 text-sm text-muted-foreground">Command: <span className="font-mono text-foreground">{challenge.command}</span></p>- </div>+ </Card></div>);}@@ -89,14 +90,14 @@ export function CliAuthPage() {if (challenge.status === "cancelled" || challenge.status === "expired") {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-xl font-semibold">{challenge.status === "expired" ? "CLI auth challenge expired" : "CLI auth challenge cancelled"}</h1><p className="mt-2 text-sm text-muted-foreground">Start the CLI auth flow again from your terminal to generate a new approval request.</p>- </div>+ </Card></div>);}@@ -104,7 +105,7 @@ export function CliAuthPage() {if (challenge.requiresSignIn || !sessionQuery.data) {return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-xl font-semibold">Sign in required</h1><p className="mt-2 text-sm text-muted-foreground">Sign in or create an account, then return to this page to approve the CLI access request.@@ -112,14 +113,14 @@ export function CliAuthPage() {<Button asChild className="mt-4"><Link to={`/auth?next=${encodeURIComponent(currentPath)}`}>Sign in / Create account</Link></Button>- </div>+ </Card></div>);}return (<div className="mx-auto max-w-xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><h1 className="text-xl font-semibold">Approve Paperclip CLI access</h1><p className="mt-2 text-sm text-muted-foreground">A local Paperclip CLI process is requesting board access to this instance.@@ -178,7 +179,7 @@ export function CliAuthPage() {{cancelMutation.isPending ? "Cancelling..." : "Cancel"}</Button></div>- </div>+ </Card></div>);}diff --git a/ui/src/pages/Companies.tsx b/ui/src/pages/Companies.tsxindex d6438e9b5f..cc21eabb5a 100644--- a/ui/src/pages/Companies.tsx+++ b/ui/src/pages/Companies.tsx@@ -8,6 +8,7 @@ import { queryKeys } from "../lib/queryKeys";import { formatCents, relativeTime } from "../lib/utils";import { Input } from "@/components/ui/input";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import {DropdownMenu,DropdownMenuContent,@@ -15,6 +16,7 @@ import {DropdownMenuSeparator,DropdownMenuTrigger,} from "@/components/ui/dropdown-menu";+import { Badge } from "@/components/ui/badge";import {Pencil,Check,@@ -117,7 +119,7 @@ export function Companies() {: 0;return (- <div+ <Cardkey={company.id}role="button"tabIndex={0}@@ -128,10 +130,9 @@ export function Companies() {setSelectedCompanyId(company.id);}}}- className={`group text-left bg-card border rounded-lg p-5 transition-colors cursor-pointer ${- selected- ? "border-primary ring-1 ring-primary"- : "border-border hover:border-muted-foreground/30"+ interactive+ className={`block group text-left p-5 ${+ selected ? "border-primary ring-1 ring-primary hover:border-primary" : ""}`}>{/* Header row: name + menu */}@@ -167,8 +168,8 @@ export function Companies() {) : (<div className="flex items-center gap-2"><h3 className="font-semibold text-base">{company.name}</h3>- <span- className={`inline-flex items-center rounded-full px-2 py-0.5 text-(length:--text-micro) font-medium ${+ <Badge variant="ghost"+ className={`text-(length:--text-micro) ${company.status === "active"? "bg-green-500/10 text-green-600 dark:text-green-400": company.status === "paused"@@ -177,7 +178,7 @@ export function Companies() {}`}>{company.status}- </span>+ </Badge><Buttonvariant="ghost"size="icon-xs"@@ -288,7 +289,7 @@ export function Companies() {</div></div>)}- </div>+ </Card>);})}</div>diff --git a/ui/src/pages/CompanyImport.tsx b/ui/src/pages/CompanyImport.tsxindex 08d041af9f..785a261bdc 100644--- a/ui/src/pages/CompanyImport.tsx+++ b/ui/src/pages/CompanyImport.tsx@@ -47,6 +47,7 @@ import {} from "../components/FileTree";import { readZipArchive } from "../lib/zip";import { getPortableFileDataUrl, getPortableFileText, isPortableImageFile } from "../lib/portable-files";+import { Badge } from "@/components/ui/badge";// ── Import-specific helpers ───────────────────────────────────────────@@ -150,12 +151,12 @@ function renderImportFileExtra(node: FileTreeNode, checked: boolean, renameMap:// Show rename indicator only on directories (folders), not individual filesconst renamedTo = node.kind === "dir" ? renameMap.get(node.path) : undefined;const actionBadge = node.action ? (- <span className={cn(- "shrink-0 rounded-full border px-2 py-0.5 text-(length:--text-nano) uppercase tracking-wide",+ <Badge variant="outline" className={cn(+ "text-(length:--text-nano) uppercase tracking-wide",ACTION_COLORS[node.action] ?? ACTION_COLORS.skip,)}>{checked ? node.action : "skip"}- </span>+ </Badge>) : null;if (!actionBadge && !renamedTo) return null;@@ -228,12 +229,12 @@ function ImportPreviewPane({)}</div>{action && (- <span className={cn(- "shrink-0 rounded-full border px-2 py-0.5 text-xs uppercase tracking-wide",+ <Badge variant="outline" className={cn(+ "uppercase tracking-wide",actionColor,)}>{action}- </span>+ </Badge>)}</div></div>@@ -445,8 +446,8 @@ function ConflictResolutionList({{isSkipped ? "skipped" : "skip"}</button>- <span className={cn(- "shrink-0 rounded-full border px-2 py-0.5 text-(length:--text-nano) uppercase tracking-wide",+ <Badge variant="outline" className={cn(+ "text-(length:--text-nano) uppercase tracking-wide",isSkipped? "text-muted-foreground border-border": isConfirmed@@ -454,7 +455,7 @@ function ConflictResolutionList({: "text-amber-500 border-amber-500/30",)}>{item.kind}- </span>+ </Badge><span className={cn("shrink-0 font-mono text-xs",@@ -563,12 +564,12 @@ function AdapterPickerList({return (<div key={agent.slug}><div className="flex items-center gap-3 px-4 py-2.5 text-sm">- <span className={cn(- "shrink-0 rounded-full border px-2 py-0.5 text-(length:--text-nano) uppercase tracking-wide",+ <Badge variant="outline" className={cn(+ "text-(length:--text-nano) uppercase tracking-wide","text-blue-500 border-blue-500/30",)}>agent- </span>+ </Badge><span className="shrink-0 font-mono text-xs text-muted-foreground">{agent.name}</span>diff --git a/ui/src/pages/CompanyInvites.tsx b/ui/src/pages/CompanyInvites.tsxindex 354ada009a..c502f7aa4d 100644--- a/ui/src/pages/CompanyInvites.tsx+++ b/ui/src/pages/CompanyInvites.tsx@@ -9,6 +9,7 @@ import { useCompany } from "@/context/CompanyContext";import { useToast } from "@/context/ToastContext";import { Link } from "@/lib/router";import { queryKeys } from "@/lib/queryKeys";+import { Badge } from "@/components/ui/badge";const inviteRoleOptions = [{@@ -247,9 +248,9 @@ export function CompanyInvites() {<span className="flex flex-wrap items-center gap-2"><span className="text-sm font-medium">{option.label}</span>{option.value === "operator" ? (- <span className="rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground">+ <Badge variant="outline" className="border-border text-muted-foreground">Default- </span>+ </Badge>) : null}</span><span className="block max-w-2xl text-sm text-muted-foreground">{option.description}</span>@@ -359,9 +360,9 @@ export function CompanyInvites() {{inviteHistory.map((invite) => (<tr key={invite.id} className="border-b border-border last:border-b-0"><td className="px-5 py-3 align-top">- <span className="inline-flex rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground">+ <Badge variant="outline" className="border-border text-muted-foreground">{formatInviteState(invite.state)}- </span>+ </Badge></td><td className="px-5 py-3 align-top">{formatInviteAudience(invite)}</td><td className="px-5 py-3 align-top">diff --git a/ui/src/pages/CompanySkills.tsx b/ui/src/pages/CompanySkills.tsxindex 1d023705d4..25224aca94 100644--- a/ui/src/pages/CompanySkills.tsx+++ b/ui/src/pages/CompanySkills.tsx@@ -74,6 +74,7 @@ import {import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";import { Textarea } from "@/components/ui/textarea";+import { Badge } from "@/components/ui/badge";import {AlertTriangle,ArrowUpCircle,@@ -436,10 +437,10 @@ function TrustChip({ level }: { level: CompanySkillTrustLevel }) {return (<Tooltip><TooltipTrigger asChild>- <span className={cn("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-micro)", config.className)}>+ <Badge variant="outline" className={cn("text-(length:--text-micro)", config.className)}><Icon className="h-3 w-3" aria-hidden="true" />{config.label}- </span>+ </Badge></TooltipTrigger><TooltipContent>{config.tooltip}</TooltipContent></Tooltip>@@ -467,10 +468,10 @@ function CompatChip({ compatibility }: { compatibility: CompanySkillCompatibilitreturn (<Tooltip><TooltipTrigger asChild>- <span className={cn("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-micro)", config.className)}>+ <Badge variant="outline" className={cn("text-(length:--text-micro)", config.className)}><Icon className="h-3 w-3" aria-hidden="true" />{config.label}- </span>+ </Badge></TooltipTrigger><TooltipContent>{config.tooltip}</TooltipContent></Tooltip>@@ -792,9 +793,9 @@ function SkillStat({ icon: Icon, value }: { icon: typeof Star; value: string })function SkillCategoryChip({ label }: { label: string }) {return (- <span className="inline-flex items-center rounded-full border border-border bg-muted/40 px-2 py-0.5 text-(length:--text-nano) capitalize text-muted-foreground">+ <Badge variant="outline" className="border-border bg-muted/40 text-(length:--text-nano) capitalize text-muted-foreground">{label}- </span>+ </Badge>);}@@ -804,7 +805,9 @@ function SkillCard({ card, onOpen }: { card: DiscoveryCard; onOpen: (card: Discotype="button"onClick={() => onOpen(card)}className={cn(- "group flex h-full min-h-(--sz-11_5rem) flex-col rounded-md border border-border p-4 text-left transition-colors hover:border-primary hover:bg-accent/30 hover:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",+ // Quiet interactive-card affordance (DECISION-SHEET: one recipe for+ // clickable cards): pointer cursor, border darkens, slight lift.+ "group flex h-full min-h-(--sz-11_5rem) flex-col rounded-lg border border-border bg-card p-4 text-left cursor-pointer transition-colors hover:border-foreground/20 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",card.required && "bg-muted/30",)}>@@ -864,18 +867,18 @@ function SkillCard({ card, onOpen }: { card: DiscoveryCard; onOpen: (card: Disco</div><div className="mt-2 flex flex-wrap items-center gap-1">{card.installed ? (- <span className="inline-flex items-center rounded-full border border-emerald-500/30 bg-emerald-500/10 px-2 py-0.5 text-(length:--text-nano) text-emerald-700 dark:text-emerald-300">+ <Badge variant="outline" className="border-emerald-500/30 bg-emerald-500/10 text-(length:--text-nano) text-emerald-700 dark:text-emerald-300">Installed- </span>+ </Badge>) : null}{card.categories.slice(0, 2).map((category) => (<SkillCategoryChip key={category} label={category} />))}{card.required ? (- <span className="ml-auto inline-flex items-center gap-1 rounded-full border border-border bg-muted/60 px-2 py-0.5 text-(length:--text-nano) text-muted-foreground">+ <Badge variant="outline" className="ml-auto border-border bg-muted/60 text-(length:--text-nano) text-muted-foreground"><Lock className="h-3 w-3" aria-hidden="true" />Bundled- </span>+ </Badge>) : null}</div></div>@@ -1770,28 +1773,28 @@ function CatalogDetailPane({{hashOutOfSync ? (<Tooltip><TooltipTrigger asChild>- <span className="inline-flex items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-(length:--text-micro) text-amber-800 dark:text-amber-200">+ <Badge variant="outline" className="border-amber-500/40 bg-amber-500/10 text-(length:--text-micro) text-amber-800 dark:text-amber-200"><ArrowUpCircle className="h-3 w-3" aria-hidden="true" />Update available- </span>+ </Badge></TooltipTrigger><TooltipContent>Catalog content hash has changed since this skill was installed.</TooltipContent></Tooltip>) : null}{skill.requires.length > 0 ? (- <span className="rounded-full border border-border bg-muted/40 px-2 py-0.5 text-(length:--text-micro) text-muted-foreground">+ <Badge variant="outline" className="border-border bg-muted/40 text-(length:--text-micro) text-muted-foreground">Requires: {skill.requires.join(", ")}- </span>+ </Badge>) : null}{skill.recommendedForRoles.length > 0 ? (- <span className="rounded-full border border-border bg-muted/40 px-2 py-0.5 text-(length:--text-micro) text-muted-foreground">+ <Badge variant="outline" className="border-border bg-muted/40 text-(length:--text-micro) text-muted-foreground">Roles: {skill.recommendedForRoles.join(" · ")}- </span>+ </Badge>) : null}{skill.tags.length > 0 ? (- <span className="rounded-full border border-border bg-muted/40 px-2 py-0.5 text-(length:--text-micro) text-muted-foreground">+ <Badge variant="outline" className="border-border bg-muted/40 text-(length:--text-micro) text-muted-foreground">Tags: {skill.tags.join(" · ")}- </span>+ </Badge>) : null}</div>@@ -2127,10 +2130,10 @@ function AttachAgentsPopover({<span className="flex items-center gap-1.5"><span className="truncate">{agent.name}</span>{agent.paused ? (- <span className="inline-flex shrink-0 items-center gap-1 rounded-full border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wide text-amber-500">+ <Badge variant="outline" className="[&>svg]:size-2.5 border-amber-500/30 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-wide text-amber-500"><Pause className="h-2.5 w-2.5" aria-hidden="true" />Paused- </span>+ </Badge>) : null}</span><span className="text-(length:--text-nano) uppercase tracking-wide text-muted-foreground">@@ -2480,7 +2483,7 @@ function SkillVersionDiffDialog({</DialogHeader><div className="flex flex-wrap items-center gap-3 text-xs"><label className="flex items-center gap-2">- <span className="rounded-full border border-red-500/30 bg-red-500/10 px-2 py-0.5 font-medium uppercase tracking-wider text-red-400">Old</span>+ <Badge variant="outline" className="border-red-500/30 bg-red-500/10 uppercase tracking-wider text-red-400">Old</Badge><selectvalue={leftVersionId ?? ""}onChange={(event) => onLeftVersionChange(event.target.value || null)}@@ -2493,7 +2496,7 @@ function SkillVersionDiffDialog({</select></label><label className="flex items-center gap-2">- <span className="rounded-full border border-green-500/30 bg-green-500/10 px-2 py-0.5 font-medium uppercase tracking-wider text-green-400">New</span>+ <Badge variant="outline" className="border-green-500/30 bg-green-500/10 uppercase tracking-wider text-green-400">New</Badge><selectvalue={right?.id ?? ""}onChange={(event) => onRightVersionChange(event.target.value || null)}@@ -2934,10 +2937,10 @@ export function SkillDetailPage({<div className="flex items-center gap-1.5"><span className="truncate font-medium">{agent.name}</span>{meta?.paused ? (- <span className="inline-flex shrink-0 items-center gap-1 rounded-full border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 text-(length:--text-nano) font-medium uppercase tracking-wide text-amber-500">+ <Badge variant="outline" className="[&>svg]:size-2.5 border-amber-500/30 bg-amber-500/10 px-1.5 text-(length:--text-nano) uppercase tracking-wide text-amber-500"><Pause className="h-2.5 w-2.5" aria-hidden="true" />Paused- </span>+ </Badge>) : null}</div><div className="mt-0.5 text-xs text-muted-foreground">{agent.adapterType}</div>@@ -3555,10 +3558,10 @@ function SkillPane({{readonlyMetadataValue(detail.metadata, "userModifiedAt") ? (<Tooltip><TooltipTrigger asChild>- <span className="inline-flex items-center gap-1 rounded-full border border-violet-500/40 bg-violet-500/10 px-2 py-0.5 text-(length:--text-micro) text-violet-200">+ <Badge variant="outline" className="border-violet-500/40 bg-violet-500/10 text-(length:--text-micro) text-violet-200"><Pencil className="h-3 w-3" aria-hidden="true" />Locally modified- </span>+ </Badge></TooltipTrigger><TooltipContent>You have edited this skill after installing. Updates from the catalog will overwrite your changes.</TooltipContent></Tooltip>diff --git a/ui/src/pages/Costs.tsx b/ui/src/pages/Costs.tsxindex b51a3f59ee..a50d712b7a 100644--- a/ui/src/pages/Costs.tsx+++ b/ui/src/pages/Costs.tsx@@ -80,18 +80,18 @@ function MetricTile({icon: ComponentType<{ className?: string }>;}) {return (- <div className="border border-border p-4">+ <Card className="block p-4"><div className="flex items-center justify-between gap-3"><div className="min-w-0"><div className="text-(length:--text-micro) uppercase tracking-(--tracking-eyebrow) text-muted-foreground">{label}</div><div className="mt-2 text-2xl font-semibold tabular-nums">{value}</div><div className="mt-1 text-xs leading-5 text-muted-foreground">{subtitle}</div></div>- <div className="flex h-9 w-9 shrink-0 items-center justify-center border border-border">+ <div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border"><Icon className="h-4 w-4 text-muted-foreground" /></div></div>- </div>+ </Card>);}diff --git a/ui/src/pages/Dashboard.tsx b/ui/src/pages/Dashboard.tsxindex 68a0a9cca7..577f8aac10 100644--- a/ui/src/pages/Dashboard.tsx+++ b/ui/src/pages/Dashboard.tsx@@ -24,6 +24,7 @@ import { Bot, CircleDot, DollarSign, ShieldCheck, LayoutDashboard, PauseCircle }import { ActiveAgentsPanel } from "../components/ActiveAgentsPanel";import { ChartCard, RunActivityChart, PriorityChart, IssueStatusChart, SuccessRateChart } from "../components/ActivityCharts";import { PageSkeleton } from "../components/PageSkeleton";+import { Card } from "@/components/ui/card";import type { Agent, Issue } from "@paperclipai/shared";import { PluginSlotOutlet } from "@/plugins/slots";@@ -310,6 +311,7 @@ export function Dashboard() {slotTypes={["dashboardWidget"]}context={{ companyId: selectedCompanyId }}className="grid gap-4 md:grid-cols-2"+ // design-allow(card-pattern): class-string prop consumed by the plugin outlet; a component can't be passed here (C5a Run 3)itemClassName="rounded-lg border bg-card p-4 shadow-sm"/>@@ -320,7 +322,7 @@ export function Dashboard() {<h3 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-3">Recent Activity</h3>- <div className="border border-border divide-y divide-border overflow-hidden">+ <Card className="block py-0 divide-y divide-border overflow-hidden">{recentActivity.map((event) => (<ActivityRowkey={event.id}@@ -332,7 +334,7 @@ export function Dashboard() {className={animatedActivityIds.has(event.id) ? "activity-row-enter" : undefined}/>))}- </div>+ </Card></div>)}@@ -342,11 +344,11 @@ export function Dashboard() {Recent Tasks</h3>{recentIssues.length === 0 ? (- <div className="border border-border p-4">+ <Card className="block p-4"><p className="text-sm text-muted-foreground">No tasks yet.</p>- </div>+ </Card>) : (- <div className="border border-border divide-y divide-border overflow-hidden">+ <Card className="block py-0 divide-y divide-border overflow-hidden">{recentIssues.slice(0, 10).map((issue) => (<Linkkey={issue.id}@@ -384,7 +386,7 @@ export function Dashboard() {</div></Link>))}- </div>+ </Card>)}</div></div>diff --git a/ui/src/pages/DesignGuide.tsx b/ui/src/pages/DesignGuide.tsxindex f89702ff6b..6b4e5eaec2 100644--- a/ui/src/pages/DesignGuide.tsx+++ b/ui/src/pages/DesignGuide.tsx@@ -663,9 +663,9 @@ export function DesignGuide() {["on_demand", "bg-cyan-100 text-cyan-700 dark:bg-cyan-900/50 dark:text-cyan-300"],["automation", "bg-muted text-muted-foreground"],].map(([label, cls]) => (- <span key={label} className={`rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium ${cls}`}>+ <Badge variant="ghost" key={label} className={`px-1.5 text-(length:--text-nano) ${cls}`}>{label}- </span>+ </Badge>))}</div></SubSection>@@ -1442,7 +1442,7 @@ export function DesignGuide() {{/* ============================================================ */}<Section title="Navigation Patterns"><SubSection title="Sidebar nav items">- <div className="w-60 border border-border rounded-md p-3 space-y-0.5 bg-card">+ <Card className="block w-60 p-3 space-y-0.5"><div className="flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium bg-accent text-accent-foreground"><LayoutDashboard className="h-4 w-4" />Dashboard@@ -1450,9 +1450,9 @@ export function DesignGuide() {<div className="flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground cursor-pointer"><CircleDot className="h-4 w-4" />Issues- <span className="ml-auto text-xs bg-primary text-primary-foreground rounded-full px-1.5 py-0.5">+ <Badge variant="ghost" className="ml-auto bg-primary text-primary-foreground px-1.5">12- </span>+ </Badge></div><div className="flex items-center gap-2 px-3 py-1.5 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground cursor-pointer"><Bot className="h-4 w-4" />@@ -1462,7 +1462,7 @@ export function DesignGuide() {<Hexagon className="h-4 w-4" />Projects</div>- </div>+ </Card></SubSection><SubSection title="View toggle">diff --git a/ui/src/pages/Inbox.test.tsx b/ui/src/pages/Inbox.test.tsxindex c83d0f9eec..15e2fc4218 100644--- a/ui/src/pages/Inbox.test.tsx+++ b/ui/src/pages/Inbox.test.tsx@@ -617,7 +617,9 @@ describe("InboxIssueMetaLeading", () => {);const liveBadge = container.querySelector('span[class*="px-1.5"][class*="bg-blue-500/10"]');const liveBadgeLabel = Array.from(container.querySelectorAll("span")).find(- (node) => node.textContent === "Live" && node.className.includes("text-"),+ // The pill chassis is a Badge (itself a span with textContent "Live");+ // the label is the inner span without the rounded-full chassis class.+ (node) => node.textContent === "Live" && node.className.includes("text-") && !node.className.includes("rounded-full"),);const liveDot = container.querySelector('span[class*="bg-blue-500"]');const pulseRing = container.querySelector('span[class*="animate-pulse"]');diff --git a/ui/src/pages/Inbox.tsx b/ui/src/pages/Inbox.tsxindex a66362e804..af620a8ac5 100644--- a/ui/src/pages/Inbox.tsx+++ b/ui/src/pages/Inbox.tsx@@ -249,6 +249,12 @@ export function formatJoinRequestInboxLabel(type NonIssueUnreadState = "visible" | "fading" | "hidden" | null;+// Rows outside SwipeToArchive (non-archivable tabs/sections) still need the+// hover-follows-selection band that SwipeToArchive's surface normally paints.+function InboxRowSurface({ selected, children }: { selected: boolean; children: ReactNode }) {+ return <div className={cn(selected && "rounded-lg bg-accent/50")}>{children}</div>;+}+export function FailedRunInboxRow({run,issueById,@@ -1536,6 +1542,21 @@ export function Inbox() {const [archivingNonIssueIds, setArchivingNonIssueIds] = useState<Set<string>>(new Set());const [selectedIndex, setSelectedIndex] = useState<number>(-1);const listRef = useRef<HTMLDivElement>(null);+ // Keyboard nav scrolls the list, which fires mouseenter on whatever row lands+ // under the stationary cursor — that must not steal the selection. Hover only+ // selects after the pointer has physically moved since the last key nav.+ const pointerMovedSinceKeyNavRef = useRef(true);+ useEffect(() => {+ const handlePointerMove = () => {+ pointerMovedSinceKeyNavRef.current = true;+ };+ window.addEventListener("mousemove", handlePointerMove, { passive: true });+ return () => window.removeEventListener("mousemove", handlePointerMove);+ }, []);+ const setSelectedIndexFromPointer = useCallback((idx: number) => {+ if (!pointerMovedSinceKeyNavRef.current) return;+ setSelectedIndex(idx);+ }, []);const invalidateInboxIssueQueryCaches = () => {if (!selectedCompanyId) return;@@ -1695,10 +1716,33 @@ export function Inbox() {return "hidden";};- // Keep selection valid when the list shape changes, but do not auto-select on initial load.+ // Keep selection on the same logical item when the list shape changes —+ // rows archived/refreshed above the selection would otherwise shift the+ // numeric index onto a neighboring row (and Enter would open the wrong+ // task). Falls back to clamping when the item is gone; never auto-selects+ // on initial load.+ const navEntryKey = (entry: NavEntry | undefined): string | null =>+ !entry+ ? null+ : entry.type === "top"+ ? `top:${entry.itemKey}`+ : entry.type === "child"+ ? `child:${entry.issueId}`+ : `group:${entry.groupKey}`;+ const selectedNavKeyRef = useRef<string | null>(null);useEffect(() => {- setSelectedIndex((prev) => resolveInboxSelectionIndex(prev, flatNavItems.length));- }, [flatNavItems.length]);+ setSelectedIndex((prev) => {+ if (prev < 0) return resolveInboxSelectionIndex(prev, flatNavItems.length);+ const prevKey = selectedNavKeyRef.current;+ const keyIndex = prevKey === null+ ? -1+ : flatNavItems.findIndex((entry) => navEntryKey(entry) === prevKey);+ return keyIndex >= 0 ? keyIndex : resolveInboxSelectionIndex(prev, flatNavItems.length);+ });+ }, [flatNavItems]);+ useEffect(() => {+ selectedNavKeyRef.current = selectedIndex >= 0 ? navEntryKey(flatNavItems[selectedIndex]) : null;+ }, [flatNavItems, selectedIndex]);useEffect(() => {setUndoableArchiveIssueIds([]);@@ -1779,10 +1823,9 @@ export function Inbox() {const st = kbStateRef.current;const act = kbActionsRef.current;- // Keyboard shortcuts are only active on the "mine" tab- if (!st.canArchive) return;-- const undoArchiveAction = resolveInboxUndoArchiveKeyAction({+ // Navigation works on every tab; archive/undo (and a/y below) stay+ // scoped to the "mine" tab, the only place items are archivable.+ const undoArchiveAction = !st.canArchive ? "none" : resolveInboxUndoArchiveKeyAction({hasUndoableArchive: st.undoableArchiveIssueIds.length > 0,defaultPrevented: e.defaultPrevented,key: e.key,@@ -1817,12 +1860,14 @@ export function Inbox() {case "j":case "ArrowDown": {e.preventDefault();+ pointerMovedSinceKeyNavRef.current = false;setSelectedIndex((prev) => getInboxKeyboardSelectionIndex(prev, navCount, "next"));break;}case "k":case "ArrowUp": {e.preventDefault();+ pointerMovedSinceKeyNavRef.current = false;setSelectedIndex((prev) => getInboxKeyboardSelectionIndex(prev, navCount, "previous"));break;}@@ -1837,6 +1882,7 @@ export function Inbox() {}case "a":case "y": {+ if (!st.canArchive) return;if (st.selectedIndex < 0 || st.selectedIndex >= navCount) return;e.preventDefault();const { issue, item } = resolveNavEntry(st.selectedIndex);@@ -1855,6 +1901,7 @@ export function Inbox() {break;}case "U": {+ if (!st.canArchive) return;if (st.selectedIndex < 0 || st.selectedIndex >= navCount) return;e.preventDefault();const { issue, item } = resolveNavEntry(st.selectedIndex);@@ -1867,6 +1914,7 @@ export function Inbox() {break;}case "r": {+ if (!st.canArchive) return;if (st.selectedIndex < 0 || st.selectedIndex >= navCount) return;e.preventDefault();const { issue, item } = resolveNavEntry(st.selectedIndex);@@ -2344,7 +2392,7 @@ export function Inbox() {<>{showSeparatorBefore("work_items") && <Separator />}<div>- <div ref={listRef} className="overflow-hidden rounded-xl">+ <div ref={listRef} className="overflow-hidden">{(() => {const renderInboxIssue = ({issue,@@ -2390,13 +2438,15 @@ export function Inbox() {&& blockerAttention?.state === "covered");const rowStatusIcon = (- <StatusIcon status={issue.status} blockerAttention={blockerAttention} />+ <StatusIcon status={issue.status} blockerAttention={blockerAttention} size="md" />);return (<IssueRowkey={`issue:${issue.id}`}issue={issue}issueLinkState={issueLinkState}+ treeGuides={depth}+ hideDivider={hasChildren && isExpanded}externalObjectSummary={externalObjectSummaryByIssueId.get(issue.id) ?? null}selected={selected}className={@@ -2424,7 +2474,6 @@ export function Inbox() {<span className="hidden w-4 shrink-0 sm:block" />)) : null}- {depth > 0 ? <span className="hidden w-4 shrink-0 sm:block" /> : null}<InboxIssueMetaLeadingissue={issue}isLive={isLive}@@ -2456,7 +2505,7 @@ export function Inbox() {<ChevronRight className={cn("h-3.5 w-3.5 transition-transform", isExpanded && "rotate-90")} /></button>) : (- <StatusIcon status={issue.status} blockerAttention={blockerAttention} size="lg" />+ <StatusIcon status={issue.status} blockerAttention={blockerAttention} size="md" />)}unreadState={isUnread ? "visible" : isFading ? "fading" : "hidden"}@@ -2534,7 +2583,7 @@ export function Inbox() {if (groupNavIdx >= 0) setSelectedIndex(groupNavIdx);}}onMouseEnter={() => {- if (groupNavIdx >= 0) setSelectedIndex(groupNavIdx);+ if (groupNavIdx >= 0) setSelectedIndexFromPointer(groupNavIdx);}}><IssueGroupHeader@@ -2572,7 +2621,7 @@ export function Inbox() {data-inbox-itemclassName="relative"onClick={() => setSelectedIndex(navIdx)}- onMouseEnter={() => setSelectedIndex(navIdx)}+ onMouseEnter={() => setSelectedIndexFromPointer(navIdx)}>{child}</div>@@ -2628,7 +2677,7 @@ export function Inbox() {>{row}</SwipeToArchive>- ) : row));+ ) : <InboxRowSurface selected={isSelected}>{row}</InboxRowSurface>));continue;}@@ -2666,7 +2715,7 @@ export function Inbox() {>{row}</SwipeToArchive>- ) : row));+ ) : <InboxRowSurface selected={isSelected}>{row}</InboxRowSurface>));continue;}@@ -2701,7 +2750,7 @@ export function Inbox() {>{row}</SwipeToArchive>- ) : row));+ ) : <InboxRowSurface selected={isSelected}>{row}</InboxRowSurface>));continue;}@@ -2744,7 +2793,7 @@ export function Inbox() {if (childNavIdx >= 0) setSelectedIndex(childNavIdx);}}onMouseEnter={() => {- if (childNavIdx >= 0) setSelectedIndex(childNavIdx);+ if (childNavIdx >= 0) setSelectedIndexFromPointer(childNavIdx);}}>{canArchiveIssue ? (@@ -2756,7 +2805,7 @@ export function Inbox() {>{childRow}</SwipeToArchive>- ) : childRow}+ ) : <InboxRowSurface selected={isChildSelected}>{childRow}</InboxRowSurface>}</div>);@@ -2784,7 +2833,7 @@ export function Inbox() {>{parentRow}</SwipeToArchive>- ) : parentRow));+ ) : <InboxRowSurface selected={isSelected}>{parentRow}</InboxRowSurface>));if (isExpanded) {elements.push(...renderChildIssueRows(childIssues, 1, new Set([issue.id])));diff --git a/ui/src/pages/InstanceAccess.tsx b/ui/src/pages/InstanceAccess.tsxindex 814d359b5d..0dadd26d1e 100644--- a/ui/src/pages/InstanceAccess.tsx+++ b/ui/src/pages/InstanceAccess.tsx@@ -6,6 +6,7 @@ import { ApiError } from "@/api/client";import { Button } from "@/components/ui/button";import { Checkbox } from "@/components/ui/checkbox";import { useBreadcrumbs } from "@/context/BreadcrumbContext";+import { Card } from "@/components/ui/card";import { useCompany } from "@/context/CompanyContext";import { useToast } from "@/context/ToastContext";import { queryKeys } from "@/lib/queryKeys";@@ -111,7 +112,7 @@ export function InstanceAccess() {</div><div className="grid gap-6 lg:grid-cols-(--gtc-34)">- <section className="space-y-4 rounded-xl border border-border bg-card p-4">+ <Card className="block space-y-4 p-4"><label className="block space-y-2 text-sm"><span className="font-medium">Search users</span><input@@ -148,9 +149,9 @@ export function InstanceAccess() {</button>))}</div>- </section>+ </Card>- <section className="space-y-4 rounded-xl border border-border bg-card p-5">+ <Card className="block space-y-4 p-5">{!selectedUserId ? (<div className="text-sm text-muted-foreground">Select a user to inspect instance access.</div>) : userAccessQuery.isLoading ? (@@ -243,7 +244,7 @@ export function InstanceAccess() {</div></>)}- </section>+ </Card></div></div>);diff --git a/ui/src/pages/InstanceExperimentalSettings.tsx b/ui/src/pages/InstanceExperimentalSettings.tsxindex 65149a5aed..7a0eecbdfd 100644--- a/ui/src/pages/InstanceExperimentalSettings.tsx+++ b/ui/src/pages/InstanceExperimentalSettings.tsx@@ -11,6 +11,7 @@ import { useBreadcrumbs } from "../context/BreadcrumbContext";import { queryKeys } from "../lib/queryKeys";import { ToggleSwitch } from "@/components/ui/toggle-switch";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { Input } from "@/components/ui/input";import {Dialog,@@ -71,7 +72,7 @@ function RecoveryPreviewDialog({) : null}{preview?.items.map((item) => (- <div key={item.incidentKey} className="rounded-md border border-border bg-card px-3 py-3">+ <Card key={item.incidentKey} className="block px-3 py-3"><div className="flex flex-wrap items-center gap-2"><ahref={issueHref(item.identifier, item.issueId)}@@ -94,7 +95,7 @@ function RecoveryPreviewDialog({{item.recoveryIdentifier ?? item.recoveryIssueId}</a></div>- </div>+ </Card>))}</div>@@ -317,7 +318,7 @@ export function InstanceExperimentalSettings() {</div>)}- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Enable Environments</h2>@@ -333,9 +334,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle environments experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Experimental File Viewer</h2>@@ -354,9 +355,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle experimental file viewer setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Enable External Objects</h2>@@ -372,9 +373,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle external objects experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Goals Sidebar Link</h2>@@ -389,9 +390,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle goals sidebar link experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Enable Isolated Workspaces</h2>@@ -407,10 +408,10 @@ export function InstanceExperimentalSettings() {aria-label="Toggle isolated workspaces experimental setting"/></div>- </section>+ </Card>{SHOW_CONFERENCE_ROOM_EXPERIMENTAL_SETTING ? (- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Conference Room Chat</h2>@@ -431,10 +432,10 @@ export function InstanceExperimentalSettings() {aria-label="Toggle conference room chat experimental setting"/></div>- </section>+ </Card>) : null}- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Task Plan Decomposition Panel</h2>@@ -454,9 +455,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle task plan decomposition panel experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Task Watchdogs</h2>@@ -476,9 +477,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle task watchdogs experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Cloud Sync</h2>@@ -494,9 +495,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle cloud sync experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Server Info Debug View</h2>@@ -515,9 +516,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle server info debug view experimental setting"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Auto-Restart Dev Server When Idle</h2>@@ -533,9 +534,9 @@ export function InstanceExperimentalSettings() {aria-label="Toggle guarded dev-server auto-restart"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex flex-col gap-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5">@@ -619,7 +620,7 @@ export function InstanceExperimentalSettings() {Current window: last {lookbackHours} {lookbackHours === 1 ? "hour" : "hours"}.</p></div>- </section>+ </Card><RecoveryPreviewDialogopen={previewDialogOpen}diff --git a/ui/src/pages/InstanceGeneralSettings.tsx b/ui/src/pages/InstanceGeneralSettings.tsxindex 0bcb2c93fd..c25d197069 100644--- a/ui/src/pages/InstanceGeneralSettings.tsx+++ b/ui/src/pages/InstanceGeneralSettings.tsx@@ -13,6 +13,7 @@ import { healthApi } from "@/api/health";import { instanceSettingsApi } from "@/api/instanceSettings";import { ModeBadge } from "@/components/access/ModeBadge";import { Button } from "../components/ui/button";+import { Card } from "@/components/ui/card";import { useBreadcrumbs } from "../context/BreadcrumbContext";import { queryKeys } from "../lib/queryKeys";import { ToggleSwitch } from "@/components/ui/toggle-switch";@@ -102,7 +103,7 @@ export function InstanceGeneralSettings() {</div>)}- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="space-y-3"><div className="flex items-center gap-2"><h2 className="text-sm font-semibold">Deployment and auth</h2>@@ -133,9 +134,9 @@ export function InstanceGeneralSettings() {/></div></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Censor username in logs</h2>@@ -152,9 +153,9 @@ export function InstanceGeneralSettings() {aria-label="Toggle username log censoring"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Keyboard shortcuts</h2>@@ -170,9 +171,9 @@ export function InstanceGeneralSettings() {aria-label="Toggle keyboard shortcuts"/></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="space-y-5"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Backup retention</h2>@@ -272,9 +273,9 @@ export function InstanceGeneralSettings() {</div></div></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="space-y-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">AI feedback sharing</h2>@@ -348,9 +349,9 @@ export function InstanceGeneralSettings() {chosen yet.</p></div>- </section>+ </Card>- <section className="rounded-xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex items-start justify-between gap-4"><div className="space-y-1.5"><h2 className="text-sm font-semibold">Sign out</h2>@@ -368,7 +369,7 @@ export function InstanceGeneralSettings() {{signOutMutation.isPending ? "Signing out..." : "Sign out"}</Button></div>- </section>+ </Card></div>);}diff --git a/ui/src/pages/InviteUxLab.tsx b/ui/src/pages/InviteUxLab.tsxindex 3f6e9f1470..4a2b1d6368 100644--- a/ui/src/pages/InviteUxLab.tsx+++ b/ui/src/pages/InviteUxLab.tsx@@ -563,9 +563,9 @@ function CompanyInvitesPreview() {<span className="flex flex-wrap items-center gap-2"><span className="text-sm font-medium">{option.label}</span>{option.value === "operator" ? (- <span className="rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground">+ <Badge variant="outline" className="border-border text-muted-foreground">Default- </span>+ </Badge>) : null}</span><span className="block max-w-2xl text-sm text-muted-foreground">{option.description}</span>@@ -645,9 +645,9 @@ function CompanyInvitesPreview() {{inviteHistory.map((invite) => (<tr key={invite.id} className="border-b border-border last:border-b-0"><td className="px-5 py-3 align-top">- <span className="inline-flex rounded-full border border-border px-2 py-0.5 text-xs text-muted-foreground">+ <Badge variant="outline" className="border-border text-muted-foreground">{invite.state}- </span>+ </Badge></td><td className="px-5 py-3 align-top">{invite.humanRole}</td><td className="px-5 py-3 align-top">diff --git a/ui/src/pages/IssueChatUxLab.tsx b/ui/src/pages/IssueChatUxLab.tsxindex 97109f9e1c..f61c462d7a 100644--- a/ui/src/pages/IssueChatUxLab.tsx+++ b/ui/src/pages/IssueChatUxLab.tsx@@ -90,6 +90,11 @@ function RotatingReasoningDemo({ intervalMs = 2200 }: { intervalMs?: number }) {}>({ key: 0, current: DEMO_REASONING_LINES[0], exiting: null });useEffect(() => {+ // Respect reduced motion (also makes the visual suite deterministic —+ // it captures with reducedMotion: "reduce").+ if (typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {+ return;+ }const timer = setInterval(() => {setIndex((i) => (i + 1) % DEMO_REASONING_LINES.length);}, intervalMs);diff --git a/ui/src/pages/IssueDetail.tsx b/ui/src/pages/IssueDetail.tsxindex f3ae691527..b4a078a71d 100644--- a/ui/src/pages/IssueDetail.tsx+++ b/ui/src/pages/IssueDetail.tsx@@ -172,6 +172,7 @@ import {SlidersHorizontal,XCircle,} from "lucide-react";+import { Badge } from "@/components/ui/badge";import {deriveOriginatingActor,getClosedIsolatedExecutionWorkspaceMessage,@@ -721,13 +722,13 @@ function IssueDetailLoadingState({<span className="text-sm font-mono text-muted-foreground shrink-0">{identifier}</span>) : null}{headerSeed.originKind === "routine_execution" && headerSeed.originId ? (- <span- className="inline-flex items-center gap-1 rounded-full border border-violet-500/30 bg-violet-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium text-violet-600 dark:text-violet-400 shrink-0"+ <Badge variant="outline"+ className="border-violet-500/30 bg-violet-500/10 text-(length:--text-nano) text-violet-600 dark:text-violet-400"title={`Routine execution from routine ${headerSeed.originId}`}><Repeat className="h-3 w-3" />Routine- </span>+ </Badge>) : null}{headerSeed.projectId ? (<span className="inline-flex items-center gap-1 text-xs text-muted-foreground rounded px-1 -mx-1 py-0.5 min-w-0">@@ -4103,13 +4104,13 @@ export function IssueDetail() {<span className="text-sm font-mono text-muted-foreground shrink-0">{issue.identifier ?? issue.id.slice(0, 8)}</span>{hasLiveRuns && (- <span className="inline-flex items-center gap-1.5 rounded-full bg-blue-500/10 border border-blue-500/30 px-2 py-0.5 text-(length:--text-nano) font-medium text-blue-600 dark:text-blue-400 shrink-0">+ <Badge variant="outline" className="gap-1.5 bg-blue-500/10 border-blue-500/30 text-(length:--text-nano) text-blue-600 dark:text-blue-400"><span className="relative flex h-1.5 w-1.5"><span className="animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75" /><span className="relative inline-flex rounded-full h-1.5 w-1.5 bg-blue-500" /></span>Live- </span>+ </Badge>)}{issue.originKind === "routine_execution" && issue.originId && (@@ -4128,48 +4129,48 @@ export function IssueDetail() {) : null}{issue.originKind === "issue_productivity_review" ? (- <span- className="inline-flex items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300 shrink-0"+ <Badge variant="outline"+ className="border-amber-500/40 bg-amber-500/10 text-(length:--text-nano) text-amber-700 dark:text-amber-300"title="This task is a productivity review."><Eye className="h-3 w-3" />Productivity review- </span>+ </Badge>) : null}{issue.originKind === "task_watchdog" ? (- <span- className="inline-flex items-center gap-1 rounded-full border border-sky-500/40 bg-sky-500/10 px-2 py-0.5 text-(length:--text-nano) font-medium text-sky-700 dark:text-sky-300 shrink-0"+ <Badge variant="outline"+ className="border-sky-500/40 bg-sky-500/10 text-(length:--text-nano) text-sky-700 dark:text-sky-300"title="This task is a generated watchdog task. It verifies whether stopped work in the watched task tree is legitimate."><ScanEye className="h-3 w-3" />Watchdog- </span>+ </Badge>) : null}{issue.workMode === "ask" || issue.workMode === "planning" ? (() => {const workModeMeta = workModeMetaFor(issue.workMode);const WorkModeIcon = workModeMeta.icon;return (- <span- className={cn("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium shrink-0", workModeMeta.classes.badge)}+ <Badge variant="outline"+ className={cn("text-(length:--text-nano)", workModeMeta.classes.badge)}title={`This task is in ${workModeMeta.label.toLowerCase()}.`}><WorkModeIcon className="h-3 w-3" aria-hidden />{workModeMeta.label}- </span>+ </Badge>);})() : null}{hasAssignedBacklogBlocker(issue.blockedBy) ? (- <span+ <Badge variant="outline"data-testid="issue-detail-parked-blocker"- className="inline-flex items-center gap-1 rounded-full border border-amber-500/60 bg-amber-500/15 px-2 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:text-amber-300 shrink-0"+ className="border-amber-500/60 bg-amber-500/15 text-(length:--text-nano) text-amber-700 dark:text-amber-300"title="Blocked by parked work — at least one assigned blocker is in backlog and will not wake its assignee."><Flag className="h-3 w-3" />Blocked by parked work- </span>+ </Badge>) : null}{issue.projectId ? (@@ -4197,9 +4198,9 @@ export function IssueDetail() {{(issue.labels ?? []).length > 0 && (<div className="hidden sm:flex items-center gap-1">{(issue.labels ?? []).slice(0, 4).map((label) => (- <span+ <Badge variant="outline"key={label.id}- className="inline-flex items-center rounded-full border px-2 py-0.5 text-(length:--text-nano) font-medium"+ className="text-(length:--text-nano)"style={{borderColor: label.color,color: pickTextColorForPillBg(label.color, 0.12),@@ -4207,7 +4208,7 @@ export function IssueDetail() {}}>{label.name}- </span>+ </Badge>))}{(issue.labels ?? []).length > 4 && (<span className="text-(length:--text-nano) text-muted-foreground">+{(issue.labels ?? []).length - 4}</span>diff --git a/ui/src/pages/JoinRequestQueue.tsx b/ui/src/pages/JoinRequestQueue.tsxindex 29662d9a16..ab4c1a20cc 100644--- a/ui/src/pages/JoinRequestQueue.tsx+++ b/ui/src/pages/JoinRequestQueue.tsx@@ -5,6 +5,7 @@ import { accessApi } from "@/api/access";import { ApiError } from "@/api/client";import { Button } from "@/components/ui/button";import { Badge } from "@/components/ui/badge";+import { Card } from "@/components/ui/card";import { useBreadcrumbs } from "@/context/BreadcrumbContext";import { useCompany } from "@/context/CompanyContext";import { useToast } from "@/context/ToastContext";@@ -85,7 +86,7 @@ export function JoinRequestQueue() {</p></div>- <div className="flex flex-wrap gap-3 rounded-xl border border-border bg-card p-4">+ <Card className="flex-row flex-wrap gap-3 p-4"><label className="space-y-2 text-sm"><span className="font-medium">Status</span><select@@ -114,7 +115,7 @@ export function JoinRequestQueue() {<option value="agent">Agent</option></select></label>- </div>+ </Card><div className="space-y-4">{(requestsQuery.data ?? []).length === 0 ? (@@ -123,7 +124,7 @@ export function JoinRequestQueue() {</div>) : (requestsQuery.data!.map((request) => (- <div key={request.id} className="rounded-xl border border-border bg-card p-4">+ <Card key={request.id} className="block p-4"><div className="flex flex-wrap items-start justify-between gap-4"><div className="space-y-2"><div className="flex flex-wrap items-center gap-2">@@ -185,7 +186,7 @@ export function JoinRequestQueue() {{request.requestType === "agent" && request.capabilities ? <div>{request.capabilities}</div> : null}</div></div>- </div>+ </Card>)))}</div>diff --git a/ui/src/pages/NotFound.tsx b/ui/src/pages/NotFound.tsxindex bcaf389883..d9054c87d0 100644--- a/ui/src/pages/NotFound.tsx+++ b/ui/src/pages/NotFound.tsx@@ -2,6 +2,7 @@ import { useEffect } from "react";import { Link, useLocation } from "@/lib/router";import { AlertTriangle, Compass } from "lucide-react";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { useBreadcrumbs } from "../context/BreadcrumbContext";import { useCompany } from "../context/CompanyContext";@@ -34,7 +35,7 @@ export function NotFoundPage({ scope = "global", requestedPrefix }: NotFoundPagereturn (<div className="mx-auto max-w-2xl py-10">- <div className="rounded-lg border border-border bg-card p-6">+ <Card className="block p-6"><div className="flex items-center gap-3"><div className="rounded-md border border-destructive/20 bg-destructive/10 p-2"><AlertTriangle className="h-5 w-5 text-destructive" />@@ -60,7 +61,7 @@ export function NotFoundPage({ scope = "global", requestedPrefix }: NotFoundPage<Link to="/">Go home</Link></Button></div>- </div>+ </Card></div>);}diff --git a/ui/src/pages/OrgChart.tsx b/ui/src/pages/OrgChart.tsxindex 6488136181..8c67809304 100644--- a/ui/src/pages/OrgChart.tsx+++ b/ui/src/pages/OrgChart.tsx@@ -6,6 +6,7 @@ import { useCompany } from "../context/CompanyContext";import { useBreadcrumbs } from "../context/BreadcrumbContext";import { queryKeys } from "../lib/queryKeys";import { agentUrl } from "../lib/utils";+import { Card } from "@/components/ui/card";import { Button } from "@/components/ui/button";import { EmptyState } from "../components/EmptyState";import { PageSkeleton } from "../components/PageSkeleton";@@ -562,10 +563,10 @@ export function OrgChart() {const dotColor = statusDotColor[node.status] ?? defaultDotColor;return (- <div+ <Cardkey={node.id}data-org-card- className="absolute bg-card border border-border rounded-lg shadow-sm hover:shadow-md hover:border-foreground/20 transition-(--tp-box-shadow-border-color) duration-150 cursor-pointer select-none"+ className="block absolute py-0 hover:shadow-md hover:border-foreground/20 transition-(--tp-box-shadow-border-color) duration-150 cursor-pointer select-none"style={{left: node.x,top: node.y,@@ -611,7 +612,7 @@ export function OrgChart() {)}</div></div>- </div>+ </Card>);})}</div>diff --git a/ui/src/pages/Pipelines.tsx b/ui/src/pages/Pipelines.tsxindex 4089562409..66b411bf84 100644--- a/ui/src/pages/Pipelines.tsx+++ b/ui/src/pages/Pipelines.tsx@@ -35,6 +35,7 @@ import {import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";import { CSS } from "@dnd-kit/utilities";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { Checkbox } from "@/components/ui/checkbox";import {Dialog,@@ -125,6 +126,7 @@ import { resolveIssueActiveRun, shouldTrackIssueActiveRun } from "../lib/issueAcimport { extractIssueTimelineEvents } from "../lib/issue-timeline-events";import { applyLocalQueuedIssueCommentState, isQueuedIssueComment } from "../lib/optimistic-issue-comments";import type { IssueChatComment } from "../lib/issue-chat-messages";+import { Badge } from "@/components/ui/badge";type PipelineConversationActionableInteraction =| SuggestTasksInteraction@@ -585,16 +587,16 @@ function formatPipelineActivity(value: string | Date | null) {function PipelineStatusChip({ archivedAt }: { archivedAt: Date | string | null }) {const paused = Boolean(archivedAt);return (- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-semibold",+ "font-semibold",paused? "border-muted-foreground/20 bg-muted text-muted-foreground": "border-emerald-200 bg-emerald-50 text-emerald-700 dark:border-emerald-900/60 dark:bg-emerald-950/30 dark:text-emerald-300",)}>{paused ? "Paused" : "Active"}- </span>+ </Badge>);}@@ -1234,12 +1236,12 @@ function PipelineCaseCard({};return (- <div+ <Cardref={setNodeRef}style={style}{...attributes}{...listeners}- className={`rounded-md border bg-card px-3 py-2 text-sm ${+ className={`block px-3 py-2 text-sm ${isDragging && !isOverlay ? "opacity-40" : ""} ${isOverlay ? "shadow-lg ring-1 ring-primary/20" : "hover:shadow-sm"}`}>@@ -1253,26 +1255,26 @@ function PipelineCaseCard({<p className="font-medium leading-snug text-foreground">{title}</p><div className="mt-1.5 flex flex-wrap gap-1.5">{isWorking ? (- <span className="relative inline-flex items-center rounded-full border border-emerald-400/40 bg-emerald-50 px-2 py-0.5 text-(length:--text-nano) font-medium text-emerald-700 dark:border-emerald-300/30 dark:bg-emerald-900/30 dark:text-emerald-300">+ <Badge variant="outline" className="relative border-emerald-400/40 bg-emerald-50 text-(length:--text-nano) text-emerald-700 dark:border-emerald-300/30 dark:bg-emerald-900/30 dark:text-emerald-300"><span className="absolute -left-1 -top-1 h-2 w-2 animate-pulse rounded-full bg-emerald-500"></span>Working- </span>+ </Badge>) : null}{hasNeedsAttention ? (- <span className="inline-flex items-center rounded-full border border-amber-400/40 bg-amber-50 px-2 py-0.5 text-(length:--text-nano) font-medium text-amber-700 dark:border-amber-300/30 dark:bg-amber-900/25 dark:text-amber-300">+ <Badge variant="outline" className="border-amber-400/40 bg-amber-50 text-(length:--text-nano) text-amber-700 dark:border-amber-300/30 dark:bg-amber-900/25 dark:text-amber-300">Needs attention- </span>+ </Badge>) : null}{hasChangedNotice ? (- <span className="inline-flex items-center rounded-full border border-indigo-400/40 bg-indigo-50 px-2 py-0.5 text-(length:--text-nano) font-medium text-indigo-700 dark:border-indigo-300/30 dark:bg-indigo-900/25 dark:text-indigo-300">+ <Badge variant="outline" className="border-indigo-400/40 bg-indigo-50 text-(length:--text-nano) text-indigo-700 dark:border-indigo-300/30 dark:bg-indigo-900/25 dark:text-indigo-300">This changed- </span>+ </Badge>) : null}{liveDownstreamCount > 0 ? (- <span className="inline-flex items-center gap-1 rounded-full border border-emerald-400/35 bg-emerald-50 px-2 py-0.5 text-(length:--text-nano) font-medium text-emerald-700 dark:border-emerald-300/30 dark:bg-emerald-900/25 dark:text-emerald-300">+ <Badge variant="outline" className="border-emerald-400/35 bg-emerald-50 text-(length:--text-nano) text-emerald-700 dark:border-emerald-300/30 dark:bg-emerald-900/25 dark:text-emerald-300"><span className="h-1.5 w-1.5 rounded-full bg-emerald-500" aria-hidden="true" />{formatLiveDownstream(liveDownstreamCount)}- </span>+ </Badge>) : null}</div>{childrenSummary != null ? (@@ -1281,7 +1283,7 @@ function PipelineCaseCard({</p>) : null}</Link>- </div>+ </Card>);}@@ -3855,17 +3857,17 @@ function OutputMetaDot() {function OutputDeliverableTag({ label }: { label: string }) {return (- <span className="shrink-0 rounded-full border border-green-600 px-1.5 text-(length:--text-nano) font-semibold uppercase text-green-600 dark:border-green-400 dark:text-green-400">+ <Badge variant="outline" className="border-green-600 px-1.5 text-(length:--text-nano) font-semibold uppercase text-green-600 dark:border-green-400 dark:text-green-400">{label}- </span>+ </Badge>);}function OutputUnverifiedTag() {return (- <span className="shrink-0 rounded-full border border-border px-1.5 text-(length:--text-nano) font-semibold uppercase text-muted-foreground">+ <Badge variant="outline" className="border-border px-1.5 text-(length:--text-nano) font-semibold uppercase text-muted-foreground">Unverified- </span>+ </Badge>);}@@ -4073,9 +4075,9 @@ function ItemOutputsSection({title="Item outputs"trailing={loading ? null : (- <span className="rounded-full bg-muted px-2 py-0.5 text-(length:--text-micro) font-medium normal-case tracking-normal text-muted-foreground">+ <Badge variant="ghost" className="bg-muted text-(length:--text-micro) normal-case tracking-normal text-muted-foreground">{items.length}- </span>+ </Badge>)}>@@ -4561,10 +4563,10 @@ export function buildReviewQueueRows({function ReviewQueueStatusChip({ failed }: { failed: boolean }) {if (!failed) return null;return (- <span className="inline-flex items-center gap-1 rounded-full border border-amber-200 bg-amber-50 px-2 py-0.5 text-xs font-semibold text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/30 dark:text-amber-300">+ <Badge variant="outline" className="border-amber-200 bg-amber-50 font-semibold text-amber-800 dark:border-amber-900/70 dark:bg-amber-950/30 dark:text-amber-300"><AlertTriangle className="h-3 w-3" />Needs attention- </span>+ </Badge>);}@@ -4766,9 +4768,9 @@ function ReviewQueueSection({<div className="min-w-0"><div className="flex min-w-0 items-center gap-2"><p className="truncate font-semibold text-foreground">{row.title}</p>- <span className="shrink-0 rounded-full border border-border px-2 py-0.5 text-(length:--text-micro) font-semibold text-muted-foreground">+ <Badge variant="outline" className="border-border text-(length:--text-micro) font-semibold text-muted-foreground">{row.pipelineName}- </span>+ </Badge><ReviewQueueStatusChip failed={failed} /></div><p className="truncate text-muted-foreground">{row.prompt}</p>diff --git a/ui/src/pages/PluginManager.tsx b/ui/src/pages/PluginManager.tsxindex 75e9562978..f1735d9951 100644--- a/ui/src/pages/PluginManager.tsx+++ b/ui/src/pages/PluginManager.tsx@@ -269,7 +269,8 @@ export function PluginManager() {No bundled plugins were found in this checkout.</div>) : (- <ul className="divide-y rounded-md border bg-card">+ <Card className="block py-0">+ <ul className="divide-y">{bundledPlugins.map((bundledPlugin) => {const installedPlugin = installedByPackageName.get(bundledPlugin.packageName);const installPending =@@ -347,6 +348,7 @@ export function PluginManager() {);})}</ul>+ </Card>)}</section>@@ -367,7 +369,8 @@ export function PluginManager() {</CardContent></Card>) : (- <ul className="divide-y rounded-md border bg-card">+ <Card className="block py-0">+ <ul className="divide-y">{installedPlugins.map((plugin) => (<li key={plugin.id}><div className="flex items-start gap-4 px-4 py-3">@@ -489,6 +492,7 @@ export function PluginManager() {</li>))}</ul>+ </Card>)}</section>diff --git a/ui/src/pages/ProfileSettings.tsx b/ui/src/pages/ProfileSettings.tsxindex 51417654cc..c96a06d5a1 100644--- a/ui/src/pages/ProfileSettings.tsx+++ b/ui/src/pages/ProfileSettings.tsx@@ -8,6 +8,7 @@ import { useBreadcrumbs } from "../context/BreadcrumbContext";import { useCompany } from "../context/CompanyContext";import { queryKeys } from "../lib/queryKeys";import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";+import { Card } from "@/components/ui/card";import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";@@ -157,7 +158,7 @@ export function ProfileSettings() {) : null}<section className="space-y-8">- <div className="relative overflow-hidden rounded-(--rad-28) border border-border/70 bg-card shadow-sm">+ <Card className="block relative overflow-hidden rounded-(--rad-28) border-border/70"><div className="absolute inset-x-0 top-0 h-32 bg-(image:--gradient-extract-26)" /><div className="absolute inset-0 bg-(image:--gradient-extract-7)" /><div className="relative p-6 pt-10">@@ -225,7 +226,7 @@ export function ProfileSettings() {</div></div></div>- </div>+ </Card><formclassName="grid gap-6 md:grid-cols-2"diff --git a/ui/src/pages/ProjectWorkspaceDetail.tsx b/ui/src/pages/ProjectWorkspaceDetail.tsxindex 754ad5ee7e..b67e84bd9b 100644--- a/ui/src/pages/ProjectWorkspaceDetail.tsx+++ b/ui/src/pages/ProjectWorkspaceDetail.tsx@@ -4,6 +4,7 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { isUuidLike, type ProjectWorkspace } from "@paperclipai/shared";import { ArrowLeft, Check, ExternalLink, Loader2, Sparkles } from "lucide-react";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { Separator } from "@/components/ui/separator";import { Tabs } from "@/components/ui/tabs";import { ChoosePathButton } from "../components/PathInstructionsModal";@@ -482,7 +483,7 @@ export function ProjectWorkspaceDetail() {{activeTab === "configuration" ? (<div className="grid gap-6 lg:grid-cols-(--gtc-53)"><div className="space-y-6">- <div className="rounded-2xl border border-border bg-card p-5">+ <Card className="block p-5"><p className="max-w-2xl text-sm text-muted-foreground">Configure the concrete workspace Paperclip attaches to this project. These values drive per-workspacecheckout behavior, default runtime services for child execution workspaces, and let you override setup@@ -659,11 +660,11 @@ export function ProjectWorkspaceDetail() {{!errorMessage && runtimeActionMessage ? <p className="text-sm text-muted-foreground">{runtimeActionMessage}</p> : null}{!errorMessage && !isDirty ? <p className="text-sm text-muted-foreground">No unsaved changes.</p> : null}</div>- </div>+ </Card></div><div className="space-y-6">- <div className="rounded-2xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="space-y-1"><div className="text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Workspace facts</div><h2 className="text-lg font-semibold">Current state</h2>@@ -690,9 +691,9 @@ export function ProjectWorkspaceDetail() {</DetailRow><DetailRow label="Default ref">{workspace.defaultRef ?? "None"}</DetailRow><DetailRow label="Updated">{new Date(workspace.updatedAt).toLocaleString()}</DetailRow>- </div>+ </Card>- <div className="rounded-2xl border border-border bg-card p-5">+ <Card className="block p-5"><div className="flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between"><div className="space-y-1"><div className="text-xs font-medium uppercase tracking-(--tracking-eyebrow) text-muted-foreground">Workspace commands</div>@@ -716,7 +717,7 @@ export function ProjectWorkspaceDetail() {disabledHint="Project workspaces need a working directory before local commands can run, and services also need runtime config."onAction={(request) => controlRuntimeServices.mutate(request)}/>- </div>+ </Card></div></div>) : null}diff --git a/ui/src/pages/Projects.tsx b/ui/src/pages/Projects.tsxindex 7b54c60f78..0cb9445de7 100644--- a/ui/src/pages/Projects.tsx+++ b/ui/src/pages/Projects.tsx@@ -23,6 +23,7 @@ import {import { Button } from "@/components/ui/button";import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";import { ArrowUpDown, Check, Hexagon, Plus } from "lucide-react";+import { Card } from "@/components/ui/card";type ProjectSortField = "name" | "updated" | "created" | "targetDate";type ProjectSortDir = "asc" | "desc";@@ -200,7 +201,7 @@ export function Projects() {{sectionProjects.length} project{sectionProjects.length === 1 ? "" : "s"}</span></div>- <div className="border border-border">+ <Card className="block py-0 overflow-hidden divide-y divide-border">{sectionProjects.map((project) => {const state = resourceMembershipState(membershipsQuery.data, "project", project.id);const pending = membershipMutation.isPending &&@@ -272,7 +273,7 @@ export function Projects() {/>);})}- </div>+ </Card></section>);})}diff --git a/ui/src/pages/ResponsibleUserDenialUxLab.tsx b/ui/src/pages/ResponsibleUserDenialUxLab.tsxindex aa1cbb884b..7d43c17132 100644--- a/ui/src/pages/ResponsibleUserDenialUxLab.tsx+++ b/ui/src/pages/ResponsibleUserDenialUxLab.tsx@@ -1,6 +1,7 @@import type { ReactNode } from "react";import { ResponsibleUserDenialNotice } from "@/components/ResponsibleUserDenialNotice";import { cn } from "@/lib/utils";+import { Card } from "@/components/ui/card";/*** UX lab for PAP-12462 (P7): run "on behalf of {user}" surfacing + responsible-user@@ -34,7 +35,7 @@ function BeforeAfter({ label, children }: { label: string; children: ReactNode }<div className="text-(length:--text-micro) font-semibold uppercase tracking-(--tracking-caps) text-muted-foreground">{label}</div>- <div className="rounded-xl border border-border/60 bg-card p-3">{children}</div>+ <Card className="block border-border/60 p-3">{children}</Card></div>);}diff --git a/ui/src/pages/RunTranscriptUxLab.tsx b/ui/src/pages/RunTranscriptUxLab.tsxindex 8eca63a04b..410a0227b7 100644--- a/ui/src/pages/RunTranscriptUxLab.tsx+++ b/ui/src/pages/RunTranscriptUxLab.tsx@@ -115,17 +115,17 @@ function LiveWidgetPreview({<div className="min-w-0"><Identity name={runTranscriptFixtureMeta.agentName} size="sm" /><div className="mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">- <span className="rounded-full border border-border/70 bg-background/70 px-2 py-1 font-mono">+ <Badge variant="outline" className="border-border/70 bg-background/70 py-1 font-mono">{runTranscriptFixtureMeta.sourceRunId.slice(0, 8)}- </span>+ </Badge><StatusBadge status={streaming ? "running" : "succeeded"} /><span>{formatDateTime(runTranscriptFixtureMeta.startedAt)}</span></div></div>- <span className="inline-flex items-center gap-1 rounded-full border border-border/70 bg-background/70 px-2.5 py-1 text-(length:--text-micro) text-muted-foreground">+ <Badge variant="outline" className="border-border/70 bg-background/70 px-2.5 py-1 text-(length:--text-micro) text-muted-foreground">Open run<ExternalLink className="h-3 w-3" />- </span>+ </Badge></div><div className="max-h-(--sz-460px) overflow-y-auto pr-1"><RunTranscriptView@@ -172,9 +172,9 @@ function DashboardPreview({{streaming ? "Live now" : "Finished 2m ago"}</div></div>- <span className="rounded-full border border-border/70 bg-background/70 px-2 py-1 text-(length:--text-nano) text-muted-foreground">+ <Badge variant="outline" className="[&>svg]:size-2.5 border-border/70 bg-background/70 py-1 text-(length:--text-nano) text-muted-foreground"><ExternalLink className="h-2.5 w-2.5" />- </span>+ </Badge></div><div className="mt-3 rounded-lg border border-border/60 bg-background/60 px-3 py-2 text-xs text-cyan-700 dark:text-cyan-300">{runTranscriptFixtureMeta.issueIdentifier} - {runTranscriptFixtureMeta.issueTitle}diff --git a/ui/src/pages/TeamCatalog.tsx b/ui/src/pages/TeamCatalog.tsxindex 329420604a..cd69e869b3 100644--- a/ui/src/pages/TeamCatalog.tsx+++ b/ui/src/pages/TeamCatalog.tsx@@ -30,6 +30,7 @@ import { EmptyState } from "../components/EmptyState";import { MarkdownBody } from "../components/MarkdownBody";import { cn } from "../lib/utils";import { Button } from "@/components/ui/button";+import { Card } from "@/components/ui/card";import { Input } from "@/components/ui/input";import { Badge } from "@/components/ui/badge";import { Skeleton } from "@/components/ui/skeleton";@@ -243,15 +244,15 @@ function TrustChip({ level, iconOnly = false }: { level: CatalogTeamTrustLevel;return (<Tooltip><TooltipTrigger asChild>- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-(length:--text-micro) font-medium",+ "px-1.5 text-(length:--text-micro)",meta.tone,)}><Icon className="h-3 w-3" />{!iconOnly && meta.label}- </span>+ </Badge></TooltipTrigger><TooltipContent>{meta.tip}</TooltipContent></Tooltip>@@ -270,14 +271,14 @@ const COMPAT_META: Record<function CompatChip({ compatibility }: { compatibility: CatalogTeamCompatibility }) {const meta = COMPAT_META[compatibility];return (- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1 rounded-full border px-1.5 py-0.5 text-(length:--text-micro) font-medium",+ "px-1.5 text-(length:--text-micro)",meta.tone,)}>{meta.label}- </span>+ </Badge>);}@@ -286,11 +287,11 @@ function ProvenanceBadge({ team }: { team: CatalogTeam }) {return (<Tooltip><TooltipTrigger asChild>- <span className="inline-flex items-center gap-1 rounded-full border border-border px-1.5 py-0.5 text-(length:--text-micro) text-muted-foreground">+ <Badge variant="outline" className="border-border px-1.5 text-(length:--text-micro) text-muted-foreground"><Package className="h-3 w-3" />{team.packageName}{team.packageVersion ? `@${team.packageVersion}` : ""}- </span>+ </Badge></TooltipTrigger><TooltipContent>Catalog package provenance</TooltipContent></Tooltip>@@ -516,13 +517,13 @@ function MetricTile({Icon: typeof Users2;}) {return (- <div className="rounded-md border border-border bg-card px-3 py-2.5">+ <Card className="block px-3 py-2.5"><div className="flex items-center justify-between"><span className="text-xl font-semibold tabular-nums">{value}</span><Icon className="h-4 w-4 text-muted-foreground" /></div><span className="text-xs text-muted-foreground">{label}</span>- </div>+ </Card>);}@@ -1417,9 +1418,9 @@ export function StepTargetManager({<li key={slug} className="flex items-center gap-2 border-b border-border/60 px-3 py-2 text-sm last:border-b-0"><Crown className="h-3.5 w-3.5 text-amber-500" /><span className="font-medium">{titleCase(slug)}</span>- <span className="ml-auto rounded-full bg-amber-500/15 px-2 py-0.5 text-(length:--text-micro) text-amber-600 dark:text-amber-300">+ <Badge variant="ghost" className="ml-auto bg-amber-500/15 text-(length:--text-micro) text-amber-600 dark:text-amber-300">→ ?- </span>+ </Badge></li>))}</ul>@@ -2111,6 +2112,7 @@ export function TeamCard({onClick={onSelect}aria-pressed={selected}className={cn(+ // design-allow(card-pattern): interactive <button> tile; Card renders a div and would break button semantics (C5a Run 3)"flex aspect-square w-full flex-col gap-2 rounded-lg border border-border bg-card p-4 text-left transition-colors hover:bg-accent/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",selected && "ring-2 ring-ring",)}diff --git a/ui/src/pages/Timeline.tsx b/ui/src/pages/Timeline.tsxindex 9039a734a3..024597c82e 100644--- a/ui/src/pages/Timeline.tsx+++ b/ui/src/pages/Timeline.tsx@@ -17,6 +17,7 @@ import { EmptyState } from "@/components/EmptyState";import { PageSkeleton } from "@/components/PageSkeleton";import { RequestCollapsedSidebar } from "@/components/RequestCollapsedSidebar";import { Input } from "@/components/ui/input";+import { Card } from "@/components/ui/card";import { Button } from "@/components/ui/button";import {WorkTimelineChart,@@ -409,7 +410,7 @@ export function Timeline() {</div>) : (<div className="space-y-3">- <div className="rounded-lg border border-border bg-card">+ <Card className="block py-0"><TimelineLegend /><WorkTimelineChartdata={data}@@ -421,7 +422,7 @@ export function Timeline() {setZoom(nextZoom);}}/>- </div>+ </Card><div className="flex flex-wrap items-center justify-between gap-3"><p className="text-xs text-muted-foreground">{data.spans.length} run{data.spans.length === 1 ? "" : "s"} ·{" "}diff --git a/ui/src/pages/secrets/user-secret-presentation.tsx b/ui/src/pages/secrets/user-secret-presentation.tsxindex d6076ebf53..46682b6da3 100644--- a/ui/src/pages/secrets/user-secret-presentation.tsx+++ b/ui/src/pages/secrets/user-secret-presentation.tsx@@ -1,6 +1,7 @@import type { SecretStatus, UserSecretCoverageSummary } from "@paperclipai/shared";import { UserRound } from "lucide-react";import { cn } from "../../lib/utils";+import { Badge } from "@/components/ui/badge";/*** User secrets are visually distinct from company secrets via a violet accent@@ -14,9 +15,9 @@ export const USER_SECRET_ACCENT_BG = "bg-violet-500/10";/** Small pill used to mark user-scoped rows and headers. */export function UserSecretChip({ className, label = "User secret" }: { className?: string; label?: string }) {return (- <span+ <Badge variant="outline"className={cn(- "inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-(length:--text-micro) font-medium",+ "text-(length:--text-micro)",USER_SECRET_ACCENT_BORDER,USER_SECRET_ACCENT_BG,USER_SECRET_ACCENT_TEXT,@@ -25,7 +26,7 @@ export function UserSecretChip({ className, label = "User secret" }: { className><UserRound className="h-3 w-3" />{label}- </span>+ </Badge>);}diff --git a/ui/storybook/stories/agent-detail.stories.tsx b/ui/storybook/stories/agent-detail.stories.tsxnew file mode 100644index 0000000000..83fb19feb3--- /dev/null+++ b/ui/storybook/stories/agent-detail.stories.tsx@@ -0,0 +1,201 @@+import { useEffect, useState } from "react";+import { Route, Routes, useLocation, useNavigate } from "react-router-dom";+import { useQueryClient, type QueryClient } from "@tanstack/react-query";+import type { Meta, StoryObj } from "@storybook/react-vite";+import type {+ AgentDetail as AgentDetailRecord,+ AgentRuntimeState,+ BudgetOverview,+ HeartbeatRun,+} from "@paperclipai/shared";+import { AgentDetail } from "@/pages/AgentDetail";+import { useCompany } from "@/context/CompanyContext";+import { queryKeys } from "@/lib/queryKeys";+import { storybookAgentMap, storybookAgents, storybookIssues } from "../fixtures/paperclipData";++const COMPANY_ID = "company-storybook";+const AGENT_ID = "agent-codex";+const AGENT_ROUTE_REF = "codexcoder"; // the agent fixture's urlKey++// The visual spec freezes Date, so relative fixtures stay deterministic.+const minutesAgo = (minutes: number) => new Date(Date.now() - minutes * 60_000);++const agentDetailFixture: AgentDetailRecord = {+ ...storybookAgentMap.get(AGENT_ID)!,+ chainOfCommand: [+ { id: "agent-cto", name: "CTO", role: "cto", title: "CTO" },+ { id: AGENT_ID, name: "CodexCoder", role: "engineer", title: "Senior Product Engineer" },+ ],+ access: {+ canAssignTasks: true,+ taskAssignSource: "explicit_grant",+ membership: null,+ grants: [],+ },+};++const runtimeStateFixture: AgentRuntimeState = {+ agentId: AGENT_ID,+ companyId: COMPANY_ID,+ adapterType: "codex_local",+ sessionId: "session-storybook",+ sessionDisplayId: "codex-session-7f2a",+ sessionParamsJson: null,+ stateJson: {},+ lastRunId: "run-agent-detail-2",+ lastRunStatus: "succeeded",+ totalInputTokens: 1_284_312,+ totalOutputTokens: 402_118,+ totalCachedInputTokens: 733_401,+ totalCostCents: 12_940,+ lastError: null,+ createdAt: minutesAgo(12_000),+ updatedAt: minutesAgo(3),+};++function heartbeatRun(overrides: Partial<HeartbeatRun>): HeartbeatRun {+ return {+ id: "run-agent-detail-1",+ companyId: COMPANY_ID,+ agentId: AGENT_ID,+ invocationSource: "timer",+ triggerDetail: null,+ status: "succeeded",+ responsibleUserId: null,+ startedAt: minutesAgo(90),+ finishedAt: minutesAgo(72),+ error: null,+ wakeupRequestId: null,+ exitCode: 0,+ signal: null,+ usageJson: null,+ resultJson: null,+ sessionIdBefore: null,+ sessionIdAfter: "session-storybook",+ logStore: null,+ logRef: null,+ logBytes: null,+ logSha256: null,+ logCompressed: false,+ stdoutExcerpt: null,+ stderrExcerpt: null,+ errorCode: null,+ externalRunId: null,+ processPid: null,+ processStartedAt: null,+ lastOutputAt: minutesAgo(72),+ lastOutputSeq: 0,+ lastOutputStream: null,+ lastOutputBytes: null,+ retryOfRunId: null,+ processLossRetryCount: 0,+ createdAt: minutesAgo(95),+ updatedAt: minutesAgo(72),+ livenessState: null,+ livenessReason: null,+ continuationAttempt: 0,+ lastUsefulActionAt: minutesAgo(72),+ ...overrides,+ } as HeartbeatRun;+}++const heartbeatRunsFixture: HeartbeatRun[] = [+ heartbeatRun({+ id: "run-agent-detail-3",+ invocationSource: "on_demand",+ status: "running",+ startedAt: minutesAgo(9),+ finishedAt: null,+ exitCode: null,+ livenessState: "advanced",+ lastOutputAt: minutesAgo(1),+ lastUsefulActionAt: minutesAgo(1),+ }),+ heartbeatRun({+ id: "run-agent-detail-2",+ invocationSource: "assignment",+ startedAt: minutesAgo(43),+ finishedAt: minutesAgo(31),+ }),+ heartbeatRun({ id: "run-agent-detail-1" }),+];++const budgetOverviewFixture: BudgetOverview = {+ companyId: COMPANY_ID,+ policies: [],+ activeIncidents: [],+ pausedAgentCount: 0,+ pausedProjectCount: 0,+ pendingApprovalCount: 0,+};++function seedAgentDetailData(queryClient: QueryClient) {+ queryClient.setQueryData(+ [...queryKeys.agents.detail(AGENT_ROUTE_REF), COMPANY_ID],+ agentDetailFixture,+ );+ queryClient.setQueryData(queryKeys.agents.runtimeState(AGENT_ID), runtimeStateFixture);+ queryClient.setQueryData(queryKeys.heartbeats(COMPANY_ID, AGENT_ID), heartbeatRunsFixture);+ queryClient.setQueryData(+ [...queryKeys.issues.list(COMPANY_ID), "participant-agent", AGENT_ID],+ storybookIssues.slice(0, 4),+ );+ queryClient.setQueryData(queryKeys.agents.list(COMPANY_ID), storybookAgents);+ queryClient.setQueryData(queryKeys.budgets.overview(COMPANY_ID), budgetOverviewFixture);+ queryClient.setQueryData(queryKeys.resourceMemberships.mine(COMPANY_ID), {+ projectMemberships: {},+ agentMemberships: {},+ starredProjects: [],+ starredAgents: [],+ });+}++/**+ * Mounts the real AgentDetail route page inside the preview's MemoryRouter+ * (fixed at /PAP/storybook): seed the QueryClient, then navigate to the+ * canonical agent URL so useParams resolves the fixture agent.+ */+function AgentDetailScenario() {+ const queryClient = useQueryClient();+ const navigate = useNavigate();+ const location = useLocation();+ const { selectedCompanyId, setSelectedCompanyId } = useCompany();+ // Seed synchronously before the page's queries mount (staleTime: Infinity+ // in the preview QueryClient keeps these fixtures authoritative).+ useState(() => {+ seedAgentDetailData(queryClient);+ return true;+ });++ useEffect(() => {+ if (selectedCompanyId !== COMPANY_ID) setSelectedCompanyId(COMPANY_ID);+ }, [selectedCompanyId, setSelectedCompanyId]);++ const target = `/PAP/agents/${AGENT_ROUTE_REF}`;+ const onAgentRoute = location.pathname.startsWith(target);+ useEffect(() => {+ // One-way hop onto the agent route; the page owns the URL afterwards+ // (it may append a tab segment), so never navigate back.+ if (!onAgentRoute) navigate(target, { replace: true });+ }, [onAgentRoute, navigate, target]);++ if (selectedCompanyId !== COMPANY_ID || !onAgentRoute) return null;++ return (+ <Routes>+ <Route path="/:companyPrefix/agents/:agentId/:tab?" element={<AgentDetail />} />+ <Route path="*" element={null} />+ </Routes>+ );+}++const meta: Meta = {+ title: "Pages/Agent Detail",+ parameters: { layout: "fullscreen", a11y: { test: "off" } },+};+export default meta;+type Story = StoryObj;++export const Dashboard: Story = {+ render: () => <AgentDetailScenario />,+};