deletion screen minimal + 'node' as THE UI word (owner ruling)

Owner 2026-09-30: the confirm dialog's pre-flight impact read had to
go — what full death takes is obvious, the per-open fetch flickered,
and richer facts would only confuse as deletion semantics evolve
(rewiring is on the table). The screen is now: Delete node? / Delete
N nodes?, the names in the mono block, one permanence line, Cancel /
Delete. No loading state, no gone state (a 404 mid-run lands in the
honest failure line), no sessions join — the joins prop died too.

The dead path is deleted end to end: GET /api/graph/nodes/[id],
graphNodeImpact (server), nodeDeletionImpact (core) and their tests.

WORDING: node/node(s) is THE UI word for graph objects, standardized
across every surface's copy (owner, same ruling): the dialog titles,
the chain table's counts/search/summary/delete aria-labels, the
practice dialog's cluster counts, selection line, and empty-cluster
hint. Internal identifiers (selection.propositions) unchanged.

Rewritten dialog pins (tests/delete-node-dialog.test.tsx): minimal
contract — no facts/loading/fetch copy, singular/plural titles, the
cap, 409 dock phrasing, busy states, no 'proposition' left in the
dialog.
This commit is contained in:
amosblomqvist
2026-09-30 01:19:03 +03:00
parent 40dc1b7f85
commit e7f4923159
13 changed files with 179 additions and 401 deletions
+1 -16
View File
@@ -1,19 +1,4 @@
import { deleteGraphNode, graphNodeImpact } from "@/src/server";
/**
* GET /api/graph/nodes/[id] — the deletion confirm dialog's pre-flight
* read (node interlude, owner-locked full-death semantics): what deleting
* this node would take with it. Edges touching it, its quiz/observation
* history, and the sessions that reference it — the facts the user weighs
* before pointing a destructive operation at the graph. 404 when the node
* does not exist.
*/
export async function GET(_req: Request, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const impact = graphNodeImpact(id);
if (impact === null) return Response.json({ error: "No such node" }, { status: 404 });
return Response.json(impact);
}
import { deleteGraphNode } from "@/src/server";
/**
* DELETE /api/graph/nodes/[id] — single-node deletion, FULL DEATH (owner