Production tooltips: styled tooltips everywhere, shortcuts surfaced, dev-speak culled

Owner-approved full pass (tooltip wave, 2026-09-25). Mechanism: icon/pill
controls ride the styled Radix tooltip via a new Hint composition
(components/ui/hint.tsx) — the shared primitive adopted as-is, no
restyling; the shortcut appends as an em-dash suffix off the LIVE registry
(a rebind in Settings → Keyboard changes the suffix): "Dictate — ⌘D".
Surface-owned keys (Esc closes, Enter submits) ride a raw binding prop.
Native title= stays only for truncation-reveals (dock spans, the rename
field) and menu-interior abbreviations (MenuShell untouched). One
em-dash pattern; per-state truth on the send square (busy = "Stop the
reply — Esc", idle = "Send — ↵"), Enter on the plan verdict's accept,
"Stop dictation (Esc)" kept verbatim per the owner's flag.

Copy: the dev-speak cull — no pipeline/prober/tier/wave vocabulary
anywhere a user reads. New pins in tests/tooltip-mechanism.test.tsx
(hintText composition, asChild no-wrapper-DOM, the auto-update hint
constant); dock truncation titles pinned native; graph-chrome + settings
pins updated to the new copy.

Live-verified on :3001 — 12.6ms hover appearance (no native 1s lag);
glyphs render on every suffixed surface (⌘D, ⌘K, ⌘⇧F, ⌘,, ⌘B, F2, ↵,
Esc); per-page probes confirm Settings entry, Home logo, session search,
Start session, Close sidebar, model + thinking pills, stats summary,
rename title, plan chip, coverage ring, send square, cost button, node
search (⌘F), graph gear, settings close (Close — Esc), keyboard section
"Fixed — part of this screen", auto-update hint, light-mode "Coming
soon", the three slot rosters, graph-tools hint. Esc still closes the
settings dialog.
This commit is contained in:
amosblomqvist
2026-09-25 01:52:20 +03:00
parent 81be55f35c
commit b19e7e7eae
23 changed files with 393 additions and 127 deletions
+17 -9
View File
@@ -15,6 +15,7 @@ import { curveBasis, line } from "d3-shape";
import { fitGraphView, fitZoomFor, zoomedGraphView, type Viewport } from "@/components/pan-zoom";
import type { PlanBlockData, PlanNodeStatus, PlanTree } from "@/src/core";
import { derivedNodeStatus, derivePlanStatuses } from "@/src/core";
import { Hint } from "@/components/ui/hint";
/**
* PLAN BLOCKS — the plan lives in the chat (wave 4): persisted
@@ -542,11 +543,12 @@ export function PlanBlock({ data, onOpen }: { data: PlanBlockData; onOpen: () =>
const statusMap = useMemo(() => new Map(data.nodes.map((n) => [n.id, n.status] as const)), [data]);
const statusOf = (id: string): PlanNodeStatus => statusMap.get(id) ?? "upcoming";
return (
<button
<Hint label="Open the full plan" side="bottom">
<button
type="button"
data-testid="plan-block-full"
aria-label="Open the full plan"
onClick={onOpen}
title="Open the full plan"
className="block w-full text-left"
>
{/* pad keeps centered strokes + the glow halo inside the frame; the
@@ -562,6 +564,7 @@ export function PlanBlock({ data, onOpen }: { data: PlanBlockData; onOpen: () =>
monochrome
/>
</button>
</Hint>
);
}
@@ -745,7 +748,8 @@ export function PlanPopup({ messages, onClose }: { messages: readonly PopupMessa
<div className="mb-2 flex items-center gap-2">
<span className="text-sm font-medium">The plan</span>
<span className="text-xs text-muted-foreground">live — statuses derive from your check outcomes</span>
<button
<Hint label="Close" binding="escape" side="left">
<button
type="button"
onClick={onClose}
aria-label="Close"
@@ -754,6 +758,7 @@ export function PlanPopup({ messages, onClose }: { messages: readonly PopupMessa
>
<XIcon className="size-4" />
</button>
</Hint>
</div>
<div
ref={viewportRef}
@@ -797,18 +802,19 @@ export function PlanPopup({ messages, onClose }: { messages: readonly PopupMessa
<div className="pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-between p-2">
<span className="text-xs text-muted-foreground/60">Drag to pan · scroll to zoom</span>
<div className="flex gap-1">
<button
<Hint label="Zoom out" side="bottom">
<button
type="button"
title="Zoom out"
aria-label="Zoom out"
onClick={() => stepZoom(1 / 1.25)}
className="pointer-events-auto flex size-7 items-center justify-center rounded-md border border-border/70 bg-card/80 text-muted-foreground backdrop-blur transition-colors hover:bg-accent hover:text-foreground"
>
<MinusIcon className="size-3.5" />
</button>
<button
</Hint>
<Hint label="Fit plan to screen" side="bottom">
<button
type="button"
title="Fit plan to screen"
aria-label="Fit plan to screen"
onClick={fitView}
data-testid="plan-popup-fit"
@@ -816,15 +822,17 @@ export function PlanPopup({ messages, onClose }: { messages: readonly PopupMessa
>
<MaximizeIcon className="size-3.5" />
</button>
<button
</Hint>
<Hint label="Zoom in" side="bottom">
<button
type="button"
title="Zoom in"
aria-label="Zoom in"
onClick={() => stepZoom(1.25)}
className="pointer-events-auto flex size-7 items-center justify-center rounded-md border border-border/70 bg-card/80 text-muted-foreground backdrop-blur transition-colors hover:bg-accent hover:text-foreground"
>
<PlusIcon className="size-3.5" />
</button>
</Hint>
</div>
</div>
</>