Polish round: node-delete chrome + rename alignment

Owner polish dispatch (2026-09-23):

- Right-click no longer pins a node or opens the detail card: the
  canvas pointerdown/up handlers now gate on the primary button, so
  the context menu arrives alone.
- Node context menu: label is just "Delete" and the shell hugs its
  content (w-44 -> w-fit); the menu body keeps focus for arrow
  cycling but never shows the browser's default focus ring
  (outline-none on the MenuShell body - applies to every menu).
- Delete confirm: "Delete node?" title in CMU Serif, red
  (text-destructive); the node name sits below in JetBrains Mono
  inline-code; the Delete button carries the destructive treatment
  (border + tint, fill deepens on hover). Rest of the dialog stays
  neutral.
- Sidebar rename row: text and metadata stay at the idle row's x -
  the status spacer and the input's border/padding are gone; the
  underline is the only editing cue.
This commit is contained in:
amosblomqvist
2026-09-23 18:53:51 +03:00
parent 63b2756465
commit 976be50a81
7 changed files with 56 additions and 10 deletions
+17 -2
View File
@@ -79,7 +79,19 @@ export function DeleteNodeBody({
onClick={(e) => e.stopPropagation()}
className="w-[32rem] max-w-[calc(100vw-2rem)] rounded-xl border bg-card p-5 shadow-xl"
>
<h2 className="font-title text-2xl tracking-tight">Delete “{node.name}”?</h2>
<h2 className="font-title text-2xl tracking-tight text-destructive">Delete node?</h2>
{/* The node name below the title in JetBrains Mono inline-code
(owner, polish round): topic names are short technical
handles — mono suits them; the serif title keeps the
family voice ("Delete node?", like "Delete "session"?"). */}
<div className="mt-1.5">
<code
data-testid="node-name-code"
className="rounded bg-muted px-1.5 py-0.5 font-mono text-xs text-foreground"
>
{node.name}
</code>
</div>
{impact === "loading" && (
<p className="mt-2 text-sm text-muted-foreground" data-testid="node-impact-loading">
Reading what this would remove…
@@ -158,7 +170,10 @@ export function DeleteNodeBody({
data-testid="node-delete-confirm"
onClick={onRun}
disabled={busy}
className="rounded-sm border border-border/60 px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-accent disabled:opacity-40"
// Destructive red (owner, polish round) — the
// app's established destructive pair (chat's
// refusal banner): border + text, fill on hover.
className="rounded-sm border border-destructive/50 bg-destructive/10 px-3 py-1.5 text-xs text-destructive transition-colors hover:bg-destructive/20 disabled:opacity-40"
>
{busy ? "Deleting…" : "Delete"}
</button>