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
+7 -1
View File
@@ -73,7 +73,11 @@ describe("DeleteNodeDialog (thin SSR)", () => {
it("the body at loading: the frame + the pre-flight read pending (effects never fire in SSR — the wrapper's own state)", () => {
const html = bodyAt("loading");
assert.match(html, /data-testid="delete-node-dialog"/);
assert.match(html, /Delete.*Kepler.*three laws.*\?/); // the title names the node
// (owner, polish round) the serif title is just "Delete node?" in
// destructive red; the NAME rides below in JetBrains Mono code.
assert.match(html, /Delete node\?/);
assert.match(html, /text-destructive/); // the red title
assert.match(html, /data-testid="node-name-code"[^>]*>Kepler&#x27;s three laws</); // the name in mono
assert.match(html, /data-testid="node-impact-loading"/);
});
@@ -94,6 +98,8 @@ describe("DeleteNodeDialog (thin SSR)", () => {
assert.match(html, /chat_ghost/);
assert.match(html, /cannot be undone/);
assert.match(html, /data-testid="node-delete-confirm"/);
// the Delete button carries the destructive red (owner, polish round)
assert.match(html, /border-destructive\/50[^>]*text-destructive/);
});
it("the body at failure: the 409 renders the activity-dock line with a Try-again", () => {
+8
View File
@@ -40,6 +40,14 @@ describe("RenameRow — the inline rename surface", () => {
assert.ok(html.includes(`value="${chat.title}"`));
// the meta line rides along (row never changes height mid-edit)
assert.ok(html.includes("session-rename-row"));
// (owner, polish round) NOTHING MOVES: no status spacer, no input
// border/padding — the draft text sits at the idle row's title x,
// and the input is the ONLY shift-proof editing cue (underline).
assert.ok(!html.includes("w-3.5 shrink-0"), "no always-on spacer (idle rows have none)");
const input = html.split('data-testid="session-rename-input"')[1]?.split("/>")[0] ?? "";
assert.ok(input.includes("px-0"), "input carries no left padding");
assert.ok(input.includes("border-b"), "the underline is the editing cue");
assert.ok(!input.includes("bg-background"), "no filled field box — text stays put");
});
});