practice: the chain table — every reasoning chain in one selectable overlay (owner-approved plan, 2026-09-29)

- core formatChainLine: names + arrow one-liner, singleton marker, pure
- graph-view Chains button (chrome row, empty-graph hidden) opens the
  overlay: fuzzy search (names/aliases/statements), collapsible chain →
  member → statement rows, birth-session + created columns, no
  understanding-levels column
- pinned Selected section derives the agents' actual input live
  (chainsForSelection over the selection; premise without its
  conclusion shows as the singleton it becomes)
- Generate opens the creation dialog in CUSTOM mode: selection summary
  + dated default title, posts {nodeIds, params, note}; cluster mode
  untouched on /practice
- live-verified on the owner's dev server: 219 chains, derived preview,
  search-never-filters-Selected, dialog handoff (selection pass-through
  bug caught + fixed en route), Esc/backdrop dismiss, zero writes
- practice UI files re-normalized to tabs (my earlier prettier runs had
  drifted them to the 2-space default; whitespace-only)

17 render/unit pins added; gates: tsc 0, 1174/1174, lint 0, build 0
This commit is contained in:
amosblomqvist
2026-09-29 22:41:52 +03:00
parent 06032769d2
commit 155d065fd1
12 changed files with 1845 additions and 961 deletions
+6 -3
View File
@@ -31,6 +31,7 @@ const PROPS = {
onImportFiles: () => {},
settings: {} as GraphRenderSettings,
changeSettings: () => {},
onOpenChains: () => {},
};
describe("GraphChromeRow — the empty-graph ruling (owner, 2026-09-25)", () => {
@@ -42,16 +43,18 @@ describe("GraphChromeRow — the empty-graph ruling (owner, 2026-09-25)", () =>
// the settings gear is the lucide-settings svg (tooltip wave: its old
// native title is gone — the styled tooltip carries the label now)
assert.ok(!html.includes("lucide-settings"), "settings is a lie on an empty graph");
assert.ok(!html.includes('data-testid="open-chain-table"'), "chains is a lie on an empty graph");
assert.ok(!html.includes("graph-chrome-fade-in"), "nothing gated = nothing fading in");
});
it("POPULATED graph: all three render, the gated pair carries the fade", () => {
it("POPULATED graph: all four render, the gated trio carries the fade", () => {
const html = renderToStaticMarkup(createElement(GraphChromeRow, { ...PROPS, isEmpty: false }));
assert.ok(html.includes('data-testid="import-notes"'));
assert.ok(html.includes("Search nodes…"));
assert.ok(html.includes("lucide-settings"), "the settings gear renders");
// the appear-once fade rides exactly the two gated controls, never Import Notes
assert.equal(html.split("graph-chrome-fade-in").length - 1, 2, "two fade carriers: search + settings");
assert.ok(html.includes('data-testid="open-chain-table"'), "the chains entry renders");
// the appear-once fade rides exactly the three gated controls, never Import Notes
assert.equal(html.split("graph-chrome-fade-in").length - 1, 3, "three fade carriers: search + chains + settings");
});
it("the no-match note renders only when the wrapper says so (its truth stays upstream)", () => {