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:
@@ -62,9 +62,9 @@ import { ModelMenuList, ThinkingMenuList } from "./model-menu";
|
||||
/** One slot's display identity — the tier's roster as the row hint rides
|
||||
* with the resolved default (owner: the hint ALWAYS names the default). */
|
||||
const SLOT_META: Record<ModelSlotName, { label: string; roster: string }> = {
|
||||
strong: { label: "Strong", roster: "Prober + Teacher" },
|
||||
cheap: { label: "Cheap", roster: "Researcher, demo builder, extractor, auditor" },
|
||||
vision: { label: "Vision", roster: "Visual maker + PDF reader" },
|
||||
strong: { label: "Strong", roster: "The main model for your sessions" },
|
||||
cheap: { label: "Cheap", roster: "The assistants that research, build demos, and grade your work" },
|
||||
vision: { label: "Vision", roster: "The assistants that draw and read PDFs" },
|
||||
};
|
||||
|
||||
/** The search engines this wave ships (src/core/search.ts) + their labels. */
|
||||
@@ -403,7 +403,7 @@ export function AgentSection({
|
||||
<div key={info.path} data-testid={`prompt-segment-${info.path}`}>
|
||||
<SettingsRow
|
||||
label={info.path}
|
||||
hint={fileExists ? undefined : "no override file yet — write one below"}
|
||||
hint={fileExists ? undefined : "No changes yet — add yours below"}
|
||||
testid={`prompt-row-${info.path}`}
|
||||
dimmed={!fileExists}
|
||||
>
|
||||
@@ -434,7 +434,7 @@ export function AgentSection({
|
||||
<textarea
|
||||
readOnly
|
||||
value={info.sourceText}
|
||||
aria-label={`source ${info.path}`}
|
||||
aria-label="The original instructions"
|
||||
className="h-24 w-full resize-y rounded-sm border border-border bg-muted p-2 font-ui text-xs text-muted-foreground"
|
||||
/>
|
||||
</div>
|
||||
@@ -443,8 +443,8 @@ export function AgentSection({
|
||||
<textarea
|
||||
value={segmentDraft[info.path] ?? info.overrideText ?? ""}
|
||||
onChange={(e) => setSegmentDraft({ ...segmentDraft, [info.path]: e.target.value })}
|
||||
aria-label={`override ${info.path}`}
|
||||
placeholder="Write the override text…"
|
||||
aria-label="Your version of the instructions"
|
||||
placeholder="Add your own instructions…"
|
||||
className="h-24 w-full resize-y rounded-sm border border-border bg-background p-2 font-ui text-xs text-foreground outline-none"
|
||||
/>
|
||||
</div>
|
||||
@@ -454,7 +454,7 @@ export function AgentSection({
|
||||
onClick={() => void saveSegment(info.path, segmentDraft[info.path] ?? "")}
|
||||
className="text-xs text-foreground underline-offset-2 hover:underline"
|
||||
>
|
||||
Save override
|
||||
Save
|
||||
</button>
|
||||
{fileExists && (
|
||||
<button
|
||||
@@ -462,7 +462,7 @@ export function AgentSection({
|
||||
onClick={() => void deleteSegment(info.path)}
|
||||
className="text-xs text-muted-foreground/70 underline-offset-2 hover:text-red-500 hover:underline"
|
||||
>
|
||||
Delete override
|
||||
Delete
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
@@ -597,7 +597,7 @@ export function AgentSection({
|
||||
return (
|
||||
<SettingsRow
|
||||
label="Graph tools"
|
||||
hint={graphOn ? "Connects prior sessions' knowledge into new ones — the prober reads the knowledge map" : "Graph is disabled"}
|
||||
hint={graphOn ? "Lets the tutor consult your knowledge map between sessions" : "Graph is disabled"}
|
||||
testid="graph-tools-row"
|
||||
dimmed={!graphOn}
|
||||
>
|
||||
|
||||
@@ -34,7 +34,7 @@ export function AppearanceSection({
|
||||
|
||||
return (
|
||||
<>
|
||||
<SettingsRow label="Mode" hint="Light ships with the design wave" testid="row-mode" dimmed>
|
||||
<SettingsRow label="Mode" hint="Coming soon" testid="row-mode" dimmed>
|
||||
<ThinSelect value="dark" ariaLabel="mode" onChange={() => {}} testid="select-mode" disabled>
|
||||
<option value="dark">Dark</option>
|
||||
</ThinSelect>
|
||||
|
||||
@@ -109,7 +109,7 @@ export function KeyboardSection() {
|
||||
<SettingsRow
|
||||
key={def.id}
|
||||
label={def.label}
|
||||
hint={def.displayOnly ? "Owned by a surface — not rebindable" : undefined}
|
||||
hint={def.displayOnly ? "Fixed — part of this screen" : undefined}
|
||||
testid={`kbd-row-${def.id}`}
|
||||
>
|
||||
<span className="flex items-center gap-2">
|
||||
|
||||
@@ -44,6 +44,7 @@ import type { ModelsSettings } from "@/src/core";
|
||||
import { MENU_CLOSE_EVENT, MENU_OPEN_EVENT } from "@/components/menu-shell";
|
||||
import { notifySettingsSaved } from "@/components/settings-signal";
|
||||
import { KeysSection } from "./keys-section.tsx";
|
||||
import { Hint } from "@/components/ui/hint";
|
||||
import { AppearanceSection, GraphSection } from "./appearance-section.tsx";
|
||||
import { KeyboardSection } from "./keyboard-section.tsx";
|
||||
|
||||
@@ -70,6 +71,10 @@ const DialogContext = createContext<{ open: (section?: string, row?: string) =>
|
||||
/** AppShell-level mount: the sidebar row and the mod+, chord call this.
|
||||
* `open(section)` lands the dialog on a specific section (the first-run
|
||||
* setup flow deep-links to Keys when no provider key exists yet). */
|
||||
/** The auto-update row's hint (tooltip wave): honest user language — no
|
||||
* stream vocabulary. Exported for the copy pin (tooltip-mechanism test). */
|
||||
export const AUTO_UPDATE_HINT = "Automatic updates arrive in an upcoming release";
|
||||
|
||||
export function SettingsDialogProvider({
|
||||
children,
|
||||
}: {
|
||||
@@ -258,7 +263,13 @@ export function SettingsDialogBody({
|
||||
{/* Header — the app's quiet CMU title language. */}
|
||||
<header className="flex h-15 shrink-0 items-center gap-3 border-b border-border px-5">
|
||||
<h2 className="font-title text-2xl tracking-tight">Settings</h2>
|
||||
<button
|
||||
<Hint
|
||||
// Esc closes the dialog (its own listener) — surface it.
|
||||
label="Close"
|
||||
binding="escape"
|
||||
side="left"
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Close settings"
|
||||
data-testid="settings-close"
|
||||
@@ -275,6 +286,7 @@ export function SettingsDialogBody({
|
||||
<path d="M4 4l8 8M12 4l-8 8" />
|
||||
</svg>
|
||||
</button>
|
||||
</Hint>
|
||||
</header>
|
||||
|
||||
<div className="flex min-h-0 flex-1">
|
||||
@@ -340,7 +352,7 @@ export function SettingsDialogBody({
|
||||
>
|
||||
<SettingsRow
|
||||
label="Auto-update"
|
||||
hint="The update mechanism ships in a later wave"
|
||||
hint={AUTO_UPDATE_HINT}
|
||||
testid="row-auto-update"
|
||||
>
|
||||
<Toggle
|
||||
|
||||
Reference in New Issue
Block a user