Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
feat(vscode): native theme grounds, consistent names and accessible controls (#3301)
Raghav Chamadiya6a93ee742f7a
diff --git a/packages/vscode/README.md b/packages/vscode/README.mdindex 58fce0c9a..efd4ec097 100644--- a/packages/vscode/README.md+++ b/packages/vscode/README.md@@ -83,10 +83,10 @@ Nothing polls, nothing scans in the background, and nothing interrupts you. Data|---|---|| Repowise: Set Up This Repository | Build the index for this workspace || Repowise: Analyze Change Risk | Score your change and see what it touches, what is missing, and who should review |-| Repowise: Show Health Dashboard | Open the health overview |-| Repowise: Show Architecture Map | Open the architecture view |-| Repowise: Show Knowledge Graph | Open the dependency graph |-| Repowise: Show Decision Timeline | Browse mined architectural decisions |+| Repowise: Open Code Health | Open the health overview |+| Repowise: Open Architecture | Open the architecture view |+| Repowise: Open Knowledge Graph | Open the dependency graph |+| Repowise: Open Decisions | Browse mined architectural decisions || Repowise: Open Docs for This File | Open the generated docs for the active file || Repowise: Update Index | Sync the index with your latest commits || Repowise: Configure MCP for this Workspace | Write `.vscode/mcp.json` for MCP clients |diff --git a/packages/vscode/media/walkthrough/first-insight.md b/packages/vscode/media/walkthrough/first-insight.mdindex 52143b16d..4678b8124 100644--- a/packages/vscode/media/walkthrough/first-insight.md+++ b/packages/vscode/media/walkthrough/first-insight.md@@ -3,5 +3,5 @@Once the index is connected, open a file to see its health findings inline, oropen the **Home** view in the Repowise sidebar for the repository overview.-Run **Repowise: Show Health Dashboard** to see the health map, the hotspots that+Run **Repowise: Open Code Health** to see the health map, the hotspots thatdrive most of the risk, and the files worth refactoring first.diff --git a/packages/vscode/package.json b/packages/vscode/package.jsonindex 7ff1c5f5a..2f8a339b0 100644--- a/packages/vscode/package.json+++ b/packages/vscode/package.json@@ -225,25 +225,25 @@},{"command": "repowise.showHealthDashboard",- "title": "Show Health Dashboard",+ "title": "Open Code Health","category": "Repowise","icon": "$(dashboard)"},{"command": "repowise.showArchitecture",- "title": "Show Architecture Map",+ "title": "Open Architecture","category": "Repowise","icon": "$(layers)"},{"command": "repowise.showKnowledgeGraph",- "title": "Show Knowledge Graph",+ "title": "Open Knowledge Graph","category": "Repowise","icon": "$(type-hierarchy)"},{"command": "repowise.showDecisionTimeline",- "title": "Show Decision Timeline",+ "title": "Open Decisions","category": "Repowise","icon": "$(milestone)"},@@ -515,7 +515,7 @@{"id": "firstInsight","title": "See your first insight",- "description": "Open the health dashboard for a first look at your repository.\n[Show Health Dashboard](command:repowise.showHealthDashboard)",+ "description": "Open Code Health for a first look at your repository.\n[Open Code Health](command:repowise.showHealthDashboard)","media": {"markdown": "media/walkthrough/first-insight.md"},diff --git a/packages/vscode/src/core/webviews.ts b/packages/vscode/src/core/webviews.tsindex 0cf8482e5..e07b2b0c2 100644--- a/packages/vscode/src/core/webviews.ts+++ b/packages/vscode/src/core/webviews.ts@@ -31,10 +31,10 @@ interface ViewMeta {}const VIEW_META: Record<PanelViewId, ViewMeta> = {- health: { title: "Repowise Health", retainContextWhenHidden: false },+ health: { title: "Repowise Code Health", retainContextWhenHidden: false },architecture: { title: "Repowise Architecture", retainContextWhenHidden: false },graph: { title: "Repowise Knowledge Graph", retainContextWhenHidden: false },- refactoring: { title: "Repowise Refactoring Plan", retainContextWhenHidden: false },+ refactoring: { title: "Repowise Refactoring", retainContextWhenHidden: false },decisions: { title: "Repowise Decisions", retainContextWhenHidden: false },docs: { title: "Repowise Docs", retainContextWhenHidden: false },risk: { title: "Repowise Change Risk", retainContextWhenHidden: false },diff --git a/packages/vscode/src/extension.ts b/packages/vscode/src/extension.tsindex 0c306d5f3..c24b1a416 100644--- a/packages/vscode/src/extension.ts+++ b/packages/vscode/src/extension.ts@@ -134,7 +134,7 @@ async function checkSetup(ctx: RepowiseContext): Promise<void> {.map((c) => c.name).join(", ") || "see log";const choice = await vscode.window.showWarningMessage(- `Repowise setup has ${failed.length} issue(s): ${summary}.`,+ `Repowise setup has ${failed.length} ${failed.length === 1 ? "issue" : "issues"}: ${summary}.`,"Show Log",);if (choice === "Show Log") ctx.log.show();diff --git a/packages/vscode/src/features/changeIntel.ts b/packages/vscode/src/features/changeIntel.tsindex f1175b494..2b3448c3c 100644--- a/packages/vscode/src/features/changeIntel.ts+++ b/packages/vscode/src/features/changeIntel.ts@@ -131,7 +131,7 @@ export function registerChangeIntel(ctx: RepowiseContext): vscode.Disposable {const fileItems: Item[] = current.map((p) => ({label: `$(file) ${baseName(p.partner)}`,description: `co-changed ${p.score}×`,- detail: `${p.partner} — usually changes with ${p.withChanged}`,+ detail: `${p.partner} · usually changes with ${p.withChanged}`,action: "open",partner: p.partner,}));diff --git a/packages/vscode/src/features/statusBar.ts b/packages/vscode/src/features/statusBar.tsindex 7a3f4d3a2..35b5436dc 100644--- a/packages/vscode/src/features/statusBar.ts+++ b/packages/vscode/src/features/statusBar.ts@@ -38,14 +38,14 @@ export function registerStatusBar(ctx: RepowiseContext): vscode.Disposable {// A stale lockfile reports the same way as no server: it is not// running, and the click affordance starts it.case "server-down":- item.text = "$(circle-slash) Repowise";+ item.text = "$(circle-slash) Repowise: offline";item.tooltip = "Local server not running. Click to start.";item.command = Commands.startServer;item.backgroundColor = undefined;break;case "connecting":- item.text = "$(sync~spin) Repowise";+ item.text = "$(sync~spin) Repowise: starting";item.tooltip = "Starting local server";item.command = undefined;item.backgroundColor = undefined;@@ -70,7 +70,7 @@ export function registerStatusBar(ctx: RepowiseContext): vscode.Disposable {}case "version-low":- item.text = "$(warning) Repowise";+ item.text = "$(warning) Repowise: update needed";item.tooltip ="Server version below the minimum this extension supports. Update the repowise package.";item.command = Commands.checkSetup;diff --git a/packages/vscode/src/features/trees/health.ts b/packages/vscode/src/features/trees/health.tsindex d7864f383..ceecd3166 100644--- a/packages/vscode/src/features/trees/health.ts+++ b/packages/vscode/src/features/trees/health.ts@@ -55,9 +55,9 @@ export class HealthTreeProvider extends RepowiseTreeProvider {private fileNode(row: HealthFileMetric): RepoTreeNode {const tooltip = new vscode.MarkdownString();tooltip.appendMarkdown(`\`${row.file_path}\`\n\n`);- tooltip.appendMarkdown(`- Code health: ${score(row.defect_score ?? row.score)}\n`);- tooltip.appendMarkdown(`- Maintainability: ${score(row.maintainability_score)}\n`);- tooltip.appendMarkdown(`- Performance: ${score(row.performance_score)}\n`);+ tooltip.appendMarkdown(`- Code health: ${score(row.defect_score ?? row.score)} / 10\n`);+ tooltip.appendMarkdown(`- Maintainability: ${score(row.maintainability_score)} / 10\n`);+ tooltip.appendMarkdown(`- Performance: ${score(row.performance_score)} / 10\n`);return {key: `file:${row.file_path}`,label: baseName(row.file_path),diff --git a/packages/vscode/src/features/trees/refactoring.ts b/packages/vscode/src/features/trees/refactoring.tsindex 0afec3160..057d8cdc1 100644--- a/packages/vscode/src/features/trees/refactoring.ts+++ b/packages/vscode/src/features/trees/refactoring.ts@@ -74,7 +74,7 @@ class RefactoringTreeProvider extends RepowiseTreeProvider {collapsibleState: vscode.TreeItemCollapsibleState.None,command: {command: InternalCommands.openRefactoringPlan,- title: "Open Refactoring Plan",+ title: "Open Refactoring",arguments: [plan],},};diff --git a/packages/vscode/webview/src/runtime/chrome.tsx b/packages/vscode/webview/src/runtime/chrome.tsxindex b68f9eb14..3fba9edbc 100644--- a/packages/vscode/webview/src/runtime/chrome.tsx+++ b/packages/vscode/webview/src/runtime/chrome.tsx@@ -28,9 +28,9 @@ interface NavItem {/** The dashboards a panel can switch between, in the sidebar Home order. */const NAV: NavItem[] = [- { view: "health", title: "Health", icon: Activity },+ { view: "health", title: "Code Health", icon: Activity },{ view: "architecture", title: "Architecture", icon: Layers },- { view: "graph", title: "Graph", icon: Share2 },+ { view: "graph", title: "Knowledge Graph", icon: Share2 },{ view: "refactoring", title: "Refactoring", icon: Wrench },{ view: "decisions", title: "Decisions", icon: Scale },{ view: "docs", title: "Docs", icon: BookOpen },@@ -39,11 +39,12 @@ const NAV: NavItem[] = [export function PanelChrome({ view, host }: { view: PanelViewId; host: WebviewHost }) {return (- <header className="sticky top-0 z-30 flex h-11 shrink-0 items-center gap-1 border-b border-[var(--color-border-default)] bg-[var(--color-bg-root)] px-2">+ <header className="sticky top-0 z-30 flex h-9 shrink-0 items-center gap-1 border-b border-[var(--color-border-default)] bg-[var(--color-bg-root)] px-2"><buttontype="button"onClick={() => host.focusHome()}title="Back to Repowise home"+ aria-label="Back to Repowise home"className="flex shrink-0 items-center gap-1.5 rounded-md px-1.5 py-1 text-[var(--color-text-secondary)] transition-colors hover:bg-[var(--color-bg-surface)] hover:text-[var(--color-text-primary)]"><Home className="h-4 w-4" />@@ -64,6 +65,7 @@ export function PanelChrome({ view, host }: { view: PanelViewId; host: WebviewHotype="button"onClick={() => (view === "settings" ? undefined : host.openView("settings"))}title="Repowise settings"+ aria-label="Repowise settings"aria-current={view === "settings" ? "page" : undefined}className={"ml-auto shrink-0 rounded-md p-1.5 transition-colors " +@@ -93,6 +95,7 @@ function Tab({type="button"onClick={onClick}aria-current={active ? "page" : undefined}+ aria-label={item.title}title={item.title}className={"flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium transition-colors " +diff --git a/packages/vscode/webview/src/runtime/mount.tsx b/packages/vscode/webview/src/runtime/mount.tsxindex 53917c7c6..e9c6bba20 100644--- a/packages/vscode/webview/src/runtime/mount.tsx+++ b/packages/vscode/webview/src/runtime/mount.tsx@@ -30,6 +30,7 @@ export function mountView<V extends WebviewViewId>(view: V,App: React.ComponentType<ViewProps<V>>,): void {+ document.documentElement.dataset.view = view;initTheme();const host = createHost();// Registered before render so the persisted preference is applied by the@@ -77,8 +78,8 @@ function Bootstrap<V extends WebviewViewId>({ view, host, App }: BootstrapProps<if (!init || !repo) {return (- <div className="flex h-screen items-center justify-center text-[var(--color-text-tertiary)]">- Loading…+ <div role="status" className="flex h-screen items-center justify-center text-[var(--color-text-tertiary)]">+ Loading Repowise…</div>);}@@ -120,7 +121,7 @@ class ErrorBoundary extends Component<{ children: ReactNode }, ErrorBoundaryStatrender(): ReactNode {if (this.state.error) {return (- <div className="m-6 rounded-lg border border-[var(--color-error)] p-4 text-[15px]">+ <div role="alert" className="m-6 rounded-lg border border-[var(--color-error)] p-4 text-[15px]"><p className="font-medium text-[var(--color-error)]">This view hit an error.</p><p className="mt-2 text-[var(--color-text-secondary)]">{this.state.error.message}</p></div>diff --git a/packages/vscode/webview/src/runtime/theme.ts b/packages/vscode/webview/src/runtime/theme.tsindex 47d60a42c..d2534e1fd 100644--- a/packages/vscode/webview/src/runtime/theme.ts+++ b/packages/vscode/webview/src/runtime/theme.ts@@ -7,7 +7,8 @@* (the next-themes shim, canvas renderers).** The two high-contrast kinds additionally stamp an `hc` class, which- * `theme-bridge.css` uses to widen borders and lift tertiary text. Contrast is+ * `theme-bridge.css` uses to widen borders and lift tertiary text. The+ * `native` class (preference "auto") switches neutrals to --vscode-* values. Contrast is* read from the editor even when the light/dark preference is pinned: a user on* a high-contrast theme needs the contrast whichever ramp they chose.*/@@ -43,6 +44,8 @@ function apply(kind: ThemeKind): void {const root = document.documentElement;root.classList.toggle("dark", kind === "dark");root.classList.toggle("hc", computeHighContrast());+ // Native editor neutrals apply only while following the editor theme.+ root.classList.toggle("native", preference === "auto");if (kind === current) return;current = kind;for (const cb of subscribers) cb(kind);@@ -86,6 +89,8 @@ export function getThemeKind(): ThemeKind {*/export function setThemeOverride(kind: ThemeKind): void {apply(kind);+ // The override is a Repowise-palette scheme; native neutrals would clash with it.+ document.documentElement.classList.remove("native");}export function subscribeTheme(cb: (kind: ThemeKind) => void): () => void {diff --git a/packages/vscode/webview/src/styles/theme-bridge.css b/packages/vscode/webview/src/styles/theme-bridge.cssindex 8cc11d1fc..ed7d2dc1b 100644--- a/packages/vscode/webview/src/styles/theme-bridge.css+++ b/packages/vscode/webview/src/styles/theme-bridge.css@@ -4,7 +4,8 @@* the editor's theme; the panels deliberately keep that brand palette instead* of remapping every token onto --vscode-* (a full remap flattens the data* visualizations into editor grays). Only the pieces that must match the- * editor chrome are bridged here: typography and the page background seam.+ * editor chrome are bridged here: typography, neutral grounds, text, borders+ * and the focus ring. Semantic (health/risk) and data colours stay Repowise.*/:root {@@ -22,6 +23,32 @@--kg-card-texture: none;}+/*+ * Native neutrals. The runtime stamps `native` on the root only while the Home+ * switcher is on "auto"; pinning light or dark drops it, so a pinned choice+ * shows the Repowise palette and auto follows the editor theme (light, dark+ * and high contrast alike, since the --vscode-* values already resolve per+ * theme). The sidebar Home view sits on the sidebar ground, panels on the+ * editor ground.+ */+.native {+ --color-bg-root: var(--vscode-editor-background);+ --color-bg-surface: var(--vscode-editorWidget-background, var(--vscode-editor-background));+ --color-bg-elevated: var(--vscode-editorWidget-background, var(--vscode-editor-background));+ --color-bg-inset: var(--vscode-input-background, var(--vscode-editor-background));+ --color-bg-inset-on-overlay: var(--vscode-input-background, var(--vscode-editor-background));+ --color-bg-wash-hover: var(--vscode-list-hoverBackground);+ --color-border-default: var(--vscode-panel-border, var(--vscode-widget-border, currentColor));+ --color-text-primary: var(--vscode-foreground);+ --color-text-secondary: var(--vscode-descriptionForeground, var(--vscode-foreground));+ /* Same source as secondary; faded so the three tiers stay distinct. */+ --color-text-tertiary: color-mix(in srgb, var(--vscode-descriptionForeground, var(--vscode-foreground)) 70%, transparent);+}++.native[data-view="home"] {+ --color-bg-root: var(--vscode-sideBar-background, var(--vscode-editor-background));+}+/** High contrast, both kinds. The theme runtime stamps `hc` on the root under* `vscode-high-contrast` and `vscode-high-contrast-light`, which previously@@ -47,13 +74,20 @@--color-text-tertiary: var(--color-text-secondary);}-/* HC themes outline the focused element rather than tinting it, and an- unfocusable-looking control is the accessibility end of this. */-.hc :focus-visible {+/* One focus ring everywhere, in the editor's own focus colour. */+:focus-visible {outline: 1px solid var(--vscode-focusBorder, currentColor);outline-offset: 2px;}+/* HC themes mark the selected item with an outline, not a tint. */+.hc [aria-current="page"],+.hc [aria-selected="true"],+.hc [aria-pressed="true"] {+ outline: 1px solid var(--vscode-contrastActiveBorder, currentColor);+ outline-offset: -1px;+}+html,body {margin: 0;@@ -70,3 +104,8 @@ body {#root {height: 100%;}++/* The sidebar is ~300px wide; its body copy matches native tree rows. */+[data-view="home"] body {+ font-size: 12px;+}diff --git a/packages/vscode/webview/src/views/decisions/App.tsx b/packages/vscode/webview/src/views/decisions/App.tsxindex c02e1ac21..584867ecd 100644--- a/packages/vscode/webview/src/views/decisions/App.tsx+++ b/packages/vscode/webview/src/views/decisions/App.tsx@@ -44,7 +44,7 @@ function recencyKey(d: DecisionRecordResponse): number {* not reflow when the decisions land. */function DecisionsSkeleton() {return (- <div className="flex h-full flex-col" aria-hidden>+ <div className="flex h-full flex-col" role="status" aria-label="Loading decisions"><header className="border-b border-[var(--color-border-default)] px-6 py-4"><div className="h-6 w-32 animate-pulse rounded bg-[var(--color-bg-inset)]" /><div className="mt-3 flex gap-2">diff --git a/packages/vscode/webview/src/views/graph/App.tsx b/packages/vscode/webview/src/views/graph/App.tsxindex 3345c1676..a4a73d66c 100644--- a/packages/vscode/webview/src/views/graph/App.tsx+++ b/packages/vscode/webview/src/views/graph/App.tsx@@ -57,7 +57,7 @@ export function App({ host, params, repo, refreshToken }: ViewProps<"graph">) {<div className="relative min-h-0 flex-1">{data.error ? (<div className="flex h-full items-center justify-center p-6">- <div className="max-w-md rounded-lg border border-[var(--color-error)] bg-[var(--color-bg-elevated)] p-4 text-[15px]">+ <div role="alert" className="max-w-md rounded-lg border border-[var(--color-error)] bg-[var(--color-bg-elevated)] p-4 text-[15px]"><p className="font-medium text-[var(--color-error)]">Could not load the knowledge graph.</p>diff --git a/packages/vscode/webview/src/views/health/App.tsx b/packages/vscode/webview/src/views/health/App.tsxindex f5124f0ba..d2038f96d 100644--- a/packages/vscode/webview/src/views/health/App.tsx+++ b/packages/vscode/webview/src/views/health/App.tsx@@ -152,7 +152,7 @@ function Dashboard({than no key: every node is the "no data" swatch when the churnrequest failed, so say that instead. */}{churnFailed ? (- <span className="text-[11px] text-[var(--color-text-tertiary)]">+ <span className="text-xs text-[var(--color-text-tertiary)]">Could not load churn for this lens. The other lenses areunaffected.</span>diff --git a/packages/vscode/webview/src/views/home/App.test.tsx b/packages/vscode/webview/src/views/home/App.test.tsxindex 1d620aa7c..d9b3192b2 100644--- a/packages/vscode/webview/src/views/home/App.test.tsx+++ b/packages/vscode/webview/src/views/home/App.test.tsx@@ -75,10 +75,10 @@ describe("Home sidebar", () => {const { host, openView } = makeHost();renderApp(host);- fireEvent.click(await screen.findByText("Health Dashboard"));+ fireEvent.click(await screen.findByText("Code Health"));expect(openView).toHaveBeenCalledWith("health");- fireEvent.click(screen.getByText("Branch Risk"));+ fireEvent.click(screen.getByText("Change Risk"));expect(openView).toHaveBeenCalledWith("risk");});@@ -118,11 +118,11 @@ describe("Home sidebar", () => {renderApp(host);await screen.findByText("7.4");- fireEvent.click(screen.getByTitle("Dark"));+ fireEvent.click(screen.getByTitle("Dark theme"));expect(setTheme).toHaveBeenCalledWith("dark");expect(document.documentElement.classList.contains("dark")).toBe(true);- fireEvent.click(screen.getByTitle("Light"));+ fireEvent.click(screen.getByTitle("Light theme"));expect(setTheme).toHaveBeenCalledWith("light");expect(document.documentElement.classList.contains("dark")).toBe(false);});diff --git a/packages/vscode/webview/src/views/home/App.tsx b/packages/vscode/webview/src/views/home/App.tsxindex fe55b803c..7f0832d80 100644--- a/packages/vscode/webview/src/views/home/App.tsx+++ b/packages/vscode/webview/src/views/home/App.tsx@@ -82,7 +82,7 @@ interface CardSpec {const CARDS: CardSpec[] = [{view: "health",- title: "Health Dashboard",+ title: "Code Health",icon: Activity,subtitle: (s) =>s?.health@@ -91,7 +91,7 @@ const CARDS: CardSpec[] = [},{view: "architecture",- title: "Architecture Map",+ title: "Architecture",icon: Layers,subtitle: () => "Modules and layers on one canvas",},@@ -103,7 +103,7 @@ const CARDS: CardSpec[] = [},{view: "refactoring",- title: "Refactoring Plans",+ title: "Refactoring",icon: Wrench,subtitle: (s) =>s?.counts.refactoringPlans != null@@ -112,7 +112,7 @@ const CARDS: CardSpec[] = [},{view: "decisions",- title: "Decision Timeline",+ title: "Decisions",icon: Scale,subtitle: (s) =>s?.counts.decisions != null@@ -127,7 +127,7 @@ const CARDS: CardSpec[] = [},{view: "risk",- title: "Branch Risk",+ title: "Change Risk",icon: GitBranch,subtitle: (_s, defaultBranch) => `Score this branch against ${defaultBranch ?? "main"}`,},@@ -190,38 +190,28 @@ export function App({ host, repo, refreshToken }: ViewProps<"home">) {/><navaria-label="Dashboards"- className="space-y-1.5 border-t border-[var(--color-border-default)] pt-3"+ className="border-t border-[var(--color-border-default)] pt-3"><p className="px-1 pb-1 font-mono text-[10px] uppercase tracking-[0.12em] text-[var(--color-text-tertiary)]">Explore</p>{CARDS.map((card) => (- <LauncherCard+ <LauncherRowkey={card.view}- spec={card}+ icon={card.icon}+ title={card.title}subtitle={card.subtitle(summary, repo.defaultBranch)}onOpen={() => host.openView(card.view)}/>))}+ <LauncherRow+ icon={Settings2}+ title="Settings"+ subtitle="Toggle editor signals, server, and more"+ muted+ onOpen={() => host.openView("settings")}+ /></nav>- <button- type="button"- onClick={() => host.openView("settings")}- className="group flex w-full items-center gap-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2.5 text-left transition-colors hover:border-[var(--color-border-hover)] hover:bg-[var(--color-bg-elevated)]"- >- <span className="grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-[var(--color-bg-inset)] text-[var(--color-text-secondary)]">- <Settings2 className="h-4 w-4" />- </span>- <span className="min-w-0 flex-1">- <span className="block text-[13px] font-medium text-[var(--color-text-primary)]">- Settings- </span>- <span className="block text-[11px] leading-snug text-[var(--color-text-tertiary)]">- Toggle editor signals, server, and more- </span>- </span>- <ChevronRight className="h-3.5 w-3.5 shrink-0 text-[var(--color-text-tertiary)] opacity-0 transition-opacity group-hover:opacity-100" />- </button><Footer host={host} /></div>);@@ -244,8 +234,8 @@ function Footer({ host }: { host: WebviewHost }) {const options: { value: ThemePreference; icon: ComponentType<{ className?: string }>; label: string }[] = [{ value: "auto", icon: Monitor, label: "Follow editor theme" },- { value: "light", icon: Sun, label: "Light" },- { value: "dark", icon: Moon, label: "Dark" },+ { value: "light", icon: Sun, label: "Light theme" },+ { value: "dark", icon: Moon, label: "Dark theme" },];return (@@ -256,7 +246,7 @@ function Footer({ host }: { host: WebviewHost }) {alt=""className="h-4 w-4"/>- <span className="text-[11px] font-semibold tracking-wide text-[var(--color-text-tertiary)]">+ <span className="text-xs font-semibold tracking-wide text-[var(--color-text-tertiary)]">Repowise</span></span>@@ -272,6 +262,7 @@ function Footer({ host }: { host: WebviewHost }) {onClick={() => choose(value)}aria-pressed={pref === value}title={label}+ aria-label={label}className={pref === value? "rounded-md bg-[var(--color-accent-primary)] p-1 text-[var(--color-text-on-accent)]"@@ -308,11 +299,11 @@ function Hero({return (<section aria-label="Repository health" className="px-1 pt-1"><div className="flex items-center justify-between gap-2">- <p className="truncate text-[13px] font-semibold text-[var(--color-text-primary)]">+ <p className="truncate text-xs font-semibold text-[var(--color-text-primary)]">{repoName}</p>{branch ? (- <span className="flex min-w-0 shrink items-center gap-1 text-[11px] text-[var(--color-text-tertiary)]">+ <span className="flex min-w-0 shrink items-center gap-1 text-xs text-[var(--color-text-tertiary)]"><GitBranch className="h-3 w-3 shrink-0" /><span className="truncate font-mono">{branch}</span></span>@@ -320,7 +311,7 @@ function Hero({</div>{loading ? (- <div className="mt-3 space-y-2" aria-hidden>+ <div className="mt-3 space-y-2" role="status" aria-label="Loading health score"><div className="h-9 w-24 animate-pulse rounded-md bg-[var(--color-bg-inset)]" /><div className="h-3 w-40 animate-pulse rounded bg-[var(--color-bg-inset)]" /></div>@@ -334,7 +325,7 @@ function Hero({</span><span className="pb-0.5 text-xs text-[var(--color-text-tertiary)]">/ 10</span></div>- <p className="mt-1.5 flex flex-wrap items-center gap-x-1.5 text-[11px] text-[var(--color-text-secondary)]">+ <p className="mt-1.5 flex flex-wrap items-center gap-x-1.5 text-xs text-[var(--color-text-secondary)]"><span>Average health</span>{hasHotspot ? (<>@@ -458,11 +449,11 @@ function Freshness({type="button"onClick={onUpdate}disabled={updating}- title="Run an incremental index update"+ title="Update the index with recent changes"className={stale && !updating- ? "flex shrink-0 items-center gap-1.5 rounded-lg bg-[var(--color-accent-primary)] px-2.5 py-1.5 text-[11px] font-medium text-[var(--color-text-on-accent)] transition-opacity hover:opacity-90"- : "flex shrink-0 items-center gap-1.5 rounded-lg border border-[var(--color-border-default)] px-2.5 py-1.5 text-[11px] font-medium text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-border-hover)] hover:text-[var(--color-text-primary)] disabled:cursor-default disabled:opacity-60"+ ? "flex shrink-0 items-center gap-1.5 rounded-lg bg-[var(--color-accent-primary)] px-2.5 py-1.5 text-xs font-medium text-[var(--color-text-on-accent)] transition-opacity hover:opacity-90"+ : "flex shrink-0 items-center gap-1.5 rounded-lg border border-[var(--color-border-default)] px-2.5 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] transition-colors hover:border-[var(--color-border-hover)] hover:text-[var(--color-text-primary)] disabled:cursor-default disabled:opacity-60"}><RefreshCw className={updating ? "h-3 w-3 animate-spin" : "h-3 w-3"} />@@ -472,34 +463,38 @@ function Freshness({);}-function LauncherCard({- spec,+function LauncherRow({+ icon: Icon,+ title,subtitle,+ muted,onOpen,}: {- spec: CardSpec;+ icon: ComponentType<{ className?: string }>;+ title: string;subtitle: string;+ muted?: boolean;onOpen: () => void;}) {- const Icon = spec.icon;return (<buttontype="button"onClick={onOpen}- className="group flex w-full items-center gap-3 rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-3 py-2.5 text-left transition-colors hover:border-[var(--color-border-hover)] hover:bg-[var(--color-bg-elevated)]"+ className="group flex w-full items-center gap-3 rounded-md border-b border-[var(--color-border-default)] px-2 py-2 text-left transition-colors last:border-b-0 hover:bg-[var(--color-bg-wash-hover)]">- <span className="grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-[var(--color-accent-muted)] text-[var(--color-accent-primary)]">- <Icon className="h-4 w-4" />- </span>+ <Icon+ className={+ "h-4 w-4 shrink-0 " ++ (muted ? "text-[var(--color-text-secondary)]" : "text-[var(--color-accent-primary)]")+ }+ /><span className="min-w-0 flex-1">- <span className="block text-[13px] font-medium text-[var(--color-text-primary)]">- {spec.title}- </span>- <span className="block text-[11px] leading-snug text-[var(--color-text-tertiary)]">+ <span className="block text-xs font-medium text-[var(--color-text-primary)]">{title}</span>+ <span className="block text-xs leading-snug text-[var(--color-text-tertiary)]">{subtitle}</span></span>- <ChevronRight className="h-3.5 w-3.5 shrink-0 text-[var(--color-text-tertiary)] opacity-0 transition-opacity group-hover:opacity-100" />+ <ChevronRight className="h-3.5 w-3.5 shrink-0 text-[var(--color-text-tertiary)] opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100" /></button>);}diff --git a/packages/vscode/webview/src/views/refactoring/App.tsx b/packages/vscode/webview/src/views/refactoring/App.tsxindex ef9fb2888..953d61713 100644--- a/packages/vscode/webview/src/views/refactoring/App.tsx+++ b/packages/vscode/webview/src/views/refactoring/App.tsx@@ -134,7 +134,7 @@ function OpportunityDetailView({{CONFIDENCE_LABEL[detail.confidence]} confidence</p>{anyRelocated ? (- <p className="mt-3 rounded-md border border-[var(--color-caution)]/40 bg-[var(--color-caution)]/10 px-3 py-2 text-[12.5px] text-[var(--color-text-secondary)]">+ <p className="mt-3 rounded-md border border-[var(--color-caution)]/40 bg-[var(--color-caution)]/10 px-3 py-2 text-xs text-[var(--color-text-secondary)]">{detail.ordering_note ??"A step below is moved by an earlier one, so its file and lines say where the symbol was. Find it again before applying it."}</p>@@ -147,15 +147,15 @@ function OpportunityDetailView({onClick={() => onOpenStep(step.plan_id)}className="w-full rounded-lg border border-[var(--color-border-default)] px-3.5 py-3 text-left hover:border-[var(--color-border-hover)]">- <span className="text-[12.5px] text-[var(--color-text-secondary)]">+ <span className="text-xs text-[var(--color-text-secondary)]">{String(i + 1).padStart(2, "0")} · {typeMeta(step.refactoring_type).label} ·{" "}{step.applicability.classification === "mechanical" ? "Mechanical" : "Judgment"}{step.relocated_by ? " · moved by an earlier step" : ""}</span>- <span className="mt-1 block break-all font-mono text-[13px] font-medium text-[var(--color-text-primary)]">+ <span className="mt-1 block break-all font-mono text-xs font-medium text-[var(--color-text-primary)]">{step.target_symbol || typeMeta(step.refactoring_type).label}</span>- <span className="mt-0.5 block break-all font-mono text-[11px] text-[var(--color-text-tertiary)]">+ <span className="mt-0.5 block break-all font-mono text-xs text-[var(--color-text-tertiary)]">{step.file_path}{step.line_start ? `:${step.line_start}` : ""}</span>@@ -577,7 +577,7 @@ function CenteredNote({ children }: { children: ReactNode }) {function ErrorNote({ title, children }: { title: string; children: ReactNode }) {return (- <div className="m-6 rounded-lg border border-[var(--color-error)] p-4 text-[15px]">+ <div role="alert" className="m-6 rounded-lg border border-[var(--color-error)] p-4 text-[15px]"><p className="font-medium text-[var(--color-error)]">{title}</p><p className="mt-2 text-[var(--color-text-secondary)]">{children}</p></div>diff --git a/packages/vscode/webview/src/views/risk/App.tsx b/packages/vscode/webview/src/views/risk/App.tsxindex 93c02325d..7662a7f22 100644--- a/packages/vscode/webview/src/views/risk/App.tsx+++ b/packages/vscode/webview/src/views/risk/App.tsx@@ -213,7 +213,7 @@ export function App({ host, repo, refreshToken }: ViewProps<"risk">) {* holds its shape while the working tree is scored. */function RiskSkeleton({ base }: { base: string }) {return (- <div className="flex flex-col gap-6 sm:gap-8" aria-hidden>+ <div className="flex flex-col gap-6 sm:gap-8" role="status" aria-label="Loading change risk"><div className="flex flex-col gap-4 sm:flex-row sm:gap-8"><div className="flex shrink-0 flex-col gap-2.5"><div className="h-3 w-20 animate-pulse rounded bg-[var(--color-bg-inset)]" />@@ -329,7 +329,7 @@ function FixHistoryNote({if (!history.available) {return (<p className="mt-2.5">- Fix history unavailable — the git history walk failed.+ Fix history is unavailable for this range.</p>);}