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
+6
View File
@@ -868,6 +868,11 @@ export class GraphCanvasRenderer {
};
private onPointerDown = (e: PointerEvent) => {
// Primary button only (owner, polish round): a right-press must not
// pin the node — right-click belongs to the context menu alone, and
// the right-pointerup must never read as a click (the detail card
// used to open under the menu).
if (e.button !== 0) return;
const pos = this.eventPos(e);
const node = this.pickAt(pos.x, pos.y);
if (node && this.sim) {
@@ -898,6 +903,7 @@ export class GraphCanvasRenderer {
};
private onPointerUp = (e: PointerEvent) => {
if (e.button !== 0) return; // right-click is context-menu territory
// Node press ending: click (no slop) → select; drag → release-and-relax.
if (this.dragId) {
const id = this.dragId;