Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Design notes & plans

Internal design rationale and implementation plans for the @invana/canvas monorepo. Not part of the published VitePress site (apps/docs/) — these are working design-of-record documents. Day-to-day API/concept docs live in apps/docs/; the product "why" + direction lives in ../roadmap.md.

New plans/design notes go here (docs/), not at the repo root.

RFCs — one per feature or fix, written before the code

  • rfcs/ — every feature request and bug fix gets a document first, then the code (root CLAUDE.md rule 15). rfcs/feat/ for a new capability, rfcs/fix/ for something already shipped that behaves wrong; file name YYYY-MM-DD-<slug>.md, slug naming the problem so it stays findable when the solution changes. rfcs/README.md has the section list and the two standing rules for the fix table (name the downstream consumers; separate the defect from the dressing). The long-form *-plan.md docs below predate the folder and stay put — they're the design of record an RFC links to rather than re-litigates.
    • feat/2026-11-17-marker-icons-and-zoom-labels-are-not-config.md — 🚧 T1–T4, T2b, E1, S1 implemented 2026-11-17 (V1–V9 pass; V10 partly run). A marker's icon, heading and zoom-tier label are expressible only as code or per-node records. Fix: NodeStylingTemplate.icon; named icons from a serialisable GraphLayerOptions.iconSet (SVG markup by name, offline) resolved in nodeSpec; per-type NodeTypeBinding.states[name].label templates; icon rotation bound to a record field (data.course). Whole-shape rotation and a hot-path heading update deferred to P5. Phase P2 of geo-intelligence-plan.md.
    • fix/2026-11-17-bubble-sets-draw-nothing-at-map-scale.md — 🚧 F1–F4 implemented 2026-11-17 (V1–V5 pass); F5 (setOptions — the editor was inert) proposed. BubbleSetsLayer paints nothing on a map (bubblesets-js grids in whole units; a cluster is <1 world unit there) and sizes pixel-constant members by their authored spec. Fix: compute in a normalised space (identity at defaults), measure members by drawn bounds, recompute on zoom settle when members are pixel-constant. Phase P1 of geo-intelligence-plan.md.
    • fix/2026-08-05-group-frame-occludes-edges.md — 🚧 implemented 2026-08-05 (F1·F2·F3·F5 landed; F4·F6 implemented, pending V4). A group frame is a shape, so it paints in shapeLayer, which sits above every connector; behindChildren's zIndex - 1 only orders it among sibling shapes, so the edges between a frame's own members are painted over. Scopes the landing of the plane axis from render-planes-and-emphasis-plan.md (design locked there, not here) + the blast radius across every style.group graph.
    • feat/2026-08-12-star-exports-hide-surface-drift.md — ✅ landed 2026-08-12 (mutation-tested: a canary export trips all three packages). Keep the one specs export * per barrel; make the surface reviewable instead: a check-api-surface.mjs snapshot check (the check-boundaries pattern — diff the built .d.ts export list against a checked-in api/<pkg>.surface.txt, fail lint on drift), de-dup the names reaching barrels by two routes (Point/Rect explicit and starred — explicit silently wins), and a standing rule: at most one export * per barrel, only for the specs vocabulary. Explicitly rejects expanding the star into ~150 named exports ×3 barrels (three hand-kept copies = guaranteed drift).
    • feat/2026-08-12-canvas-core-folder-sprawl.md — ✅ landed 2026-08-12. Two same-day landings left canvas-core/src with 13 top-level folders + 4 loose root files; regrouped into 6 concern folders (specs/ incl. geom.ts · state/ (CanvasStore/frame/port/view/data/events/theme) · contracts/ · abstracts/ (+ Camera + registries) · lib/ (geometry/svg/animation) · headless/). Internal-only — both tsup entries and every external import site unchanged; verified 258 tests.
    • feat/2026-08-12-canvas-core-depends-on-the-kernel.md — ✅ landed 2026-08-12 (all rows; verified: build 20/20 · types 19/19 · boundaries incl. the new core-purity row · 258 tests · live Storybook smoke — §8 records the background-tab rAF trap the smoke uncovered). Invert the bottom of the stack: canvas-core becomes truly dependency-free (the floor — vocabulary, contracts, abstracts, pure utils) and canvas-store depends on it, keeping only the state machinery (the repo's three third-party libs touch exactly 7 kernel files: immer ×5, zustand ×1, rbush ×1 — measured). Moves the spec vocabulary + shapeGeometry + SpecStore, the event bus/emitters, theme, and the dep-free data primitives (ColumnStore/LayerData/ DirtyBatcher) down into core. Three hard problems carried as design rows: H1 Layer.state can no longer be built in the constructor (the memory store is immer-backed at runtime — injection via a ctx.createStateStore factory), H2 CanvasContext/Camera need a structural ICanvasStore, H3 core redeclares immer's Patch structurally so even the type level is dep-free.
    • feat/2026-08-12-engine-package-structure.md — ✅ landed 2026-08-12 (all 33 change rows; verified: build 20/20 · types 19/19 · boundaries · 256 tests · live Storybook smoke incl. GraphVisualiser). The combined file-tree restructure of all three engine packages (canvas · canvas-store · renderer-pixijs), superseding the two per-package structure RFCs below. Side-by-side now/target trees, move tables and blast radius for: canvas 16 top-level folders → 5 with a widened core/ charter — not just the renderer contracts but the Layer/Behaviour/Layout abstracts (+ ICanvasContext, gesture types) move into core/ so extension packages and future backends (pixi now, three.js later) depend on a small frozen @invana/canvas-core, and @invana/canvas becomes the pure orchestrator; canvas-store 16 folders → 11 (zero one-file folders — geom.ts/frame.ts flatten to root, adapters/zustand.ts); renderer-pixijs 14 folders + 10 loose root files → 3 groups + 3 files (renderer/ · primitives/ · assets/), doubling as the renderer-threejs layout template. Deletes the ./specs subpath (19 importer files repoint to the root). §2.1 records a trial implementation of the canvas-core extraction + canvas restructure that passed every check end-to-end (build 20/20 · types 19/19 · boundaries · 88 tests) and was then discarded to stay in planning — so the canvas half is measured fact: CanvasContext is already an interface, Camera and the registries move whole, SpecProjector is contract-side, and canvas lands at 4 folders + index.
    • feat/2026-08-11-canvas-src-layout-hides-the-backend-seam.md — ❌ superseded by 2026-08-12-engine-package-structure.md (rule 2 reversed: abstracts move into core/abstracts/). The packages/canvas/src file + folder structure, before and after: 16 top-level folders / 76 files → 6 / 82, restructured around the future @invana/canvas-core boundary. The backend-facing half (core/ — contracts, connector geometry, badges, animation, SVG serialisers, the headless reference implementation) becomes one contiguous subtree that lifts out as a package by moving a folder; export/ becomes io/ since it holds importCanvasState too; the ./specs subpath is deleted — an 18-line re-export of a re-export, and the npm numbers (120 downloads/month on a two-month-old package, with 0.0.x ranges pinning exactly) say no one is on the other end of the compatibility promise. Full tree, per-folder move table, new-file list, and the 6 rules that produced it.
    • feat/2026-08-11-canvas-store-structure.md — ❌ superseded by 2026-08-12-engine-package-structure.md (successor also flattens the three one-file folders this one kept). The packages/canvas-store/src structure, 16 folders / 51 files → 14 / 51. A deliberately light touch — every kernel folder already names a real concern. actions/ + history/ fold into view/ (both are operations on the view store); renderer/IRenderer.ts is renamed backend.ts because the filename lies — it declares only RendererBackend, and 33 of its 34 lines are a comment explaining that IRenderer deliberately lives elsewhere. Also resolves a genuine duplicate: theme/ exists in both canvas-store and canvas with the same three types, so the kernel's becomes canonical — noting the one behavioural difference (the canvas copy emits theme:change without a source descriptor).
    • feat/2026-08-11-canvas-core-structure.md — ✅ landed (in main since v0.0.12, 5e6757b5; the folder layout below was since reshaped by canvas-core-folder-sprawl / canvas-core-depends-on-the-kernel). The new @invana/canvas-core package: 47 files / 5 folders (contracts/ · geometry/ · svg/ · animation/ · headless/), lifted wholesale from @invana/canvas's src/core/ subtree — nothing written fresh at extraction time. So a rendering backend depends on a small frozen package rather than the whole engine. Carries the file-origin map, the package.json, the four-package layering, the three prerequisites, and a checkable acceptance test: grep "@invana/canvas'" packages/renderer-pixijs/src → 0 hits.
    • fix/2026-09-10-renderer-preference-canvas-never-reaches-the-backend.md — ✅ landed 2026-09-10 (D1 deferred, D2 accepted). preference: 'canvas' is silently rewritten to 'webgl' one line before it crosses the renderer seam (Canvas.ts#L337), so pixi's canvas backend is unreachable through the engine — including via bestRenderPreference(), which the TSDoc recommends and which returns 'canvas' on a device with neither WebGPU nor WebGL. Root cause is three independent declarations of one option ('…|canvas' in the engine, '…|auto' in the kernel contract, '…|canvas' in the backend); the rewrite was a type-fit, not a decision, and 'auto' has no producer anywhere. 4 rows, 2 open decisions (adopt pixi 8.18's array-valued preference; drop 'auto').
    • fix/2026-09-10-label-measurement-allocates-a-textstyle-per-call.md — 🚧 implemented, in main since 5e6757b5 (F1·F2 implemented; V1 · V4 pending). measureLabelContent builds a TextStyle per call, once per fit-to-label node per re-project, against 1–3 distinct styles. A cost defect with no visible symptom: pixi's metrics cache is value-keyed, so the measuring is already free on repeat and only the allocation is wasted. Records why the obvious fix — one shared mutable TextStyle — is wrong (cached CanvasTextMetrics retain the style by reference, so mutation would corrupt entries backing real Text objects). D2 was decided (a) — land it — without taking the measurement.
    • feat/2026-09-27-no-floating-controls-inside-the-canvas.md — ✅ landed. Control panels: floating controls over the canvas stored as JSON in definition.controlPanels, so they save, export and undo with the canvas. Items name a command, icon, widget or slot; the engine's CommandRegistry runs commands. canvas-react's headless <ControlPanel> declares panels and canvas-ui's <ControlPanels> draws them. F12 (a Studio editor for panels) is the open follow-up.
    • feat/2026-09-27-two-ways-to-float-a-toolbar.md — ✅ landed. Toolbars are content; ControlPanel is how controls float. Eleven toolbars lose position / bare and render only their controls. Anything over the canvas goes through <ControlPanel>.
    • feat/2026-09-28-graph-toolbar-actions-cannot-be-saved.md — ✅ landed. Graph toolbar actions become commands: undo / redo, clipboard, select mode, edge type, grid and layout picking. Adds the choice item kind, override-stacking registrations and invalidate(), plus one canvas-ui preset per toolbar. X2 (toolbars as thin wrappers over presets) waits on header slots that accept specs.
    • feat/2026-09-28-control-panels-cannot-pan-or-model.md — ✅ landed. Presets per mode: camera.pan / zoomTo / reset and behaviour.toggle commands; tool.* commands from <GraphToolProvider>; theme.toggle from <CanvasThemeSync>; the PAN, ZOOM_LEVEL, INPUT, NAVIGATION, CANVAS, EXPLORER, MODELLER and THEME presets, and a pan-pad widget. Stories: canvas-react/ControlPanel/{Canvas,GraphCanvas}/*.
    • feat/2026-09-28-control-panels-cannot-be-edited-in-the-studio.md — ✅ landed (E9 deferred — story only if asked). A Studio editor for control panels (F12): an aggregate editor in canvas-ui/editor-panels/control-panels/, with panel fields and an item list whose pickers read the live command / icon / widget registries. Applies through canvas.update({ controlPanels }); also the last section of CanvasSettingsEditorPanel.
    • feat/2026-09-28-toolbars-and-control-panels-draw-controls-twice.md — ✅ landed. Toolbars become presets + props (X2): one exported <ControlItems> renderer; the gaps closed (layout.toggle, history.redraw, icon classes, section keys; factory layouts ended up as private commands the toolbar registers while mounted). Finding: header slots already take ReactNodes, so the recorded blocker didn't block. Toolbar headers render byte-identical to before.
    • feat/2026-09-28-the-modeller-tool-lives-outside-the-canvas.md — ✅ landed (S1 deferred — story only if asked). The modeller tool moves to interaction.viewMode (+ viewModeArgs); behaviours gain a modes option and gate themselves; tool.* commands move to graph and the React bridge goes.
    • feat/2026-09-28-canvas-definition-edits-cannot-be-undone.md — ✅ landed 2026-09-28. A view history for Studio edits: records only edit:*-named canvas.updates to definition (a baseline write makes undo restore real pre-edit values), merges live-edit bursts, reconciles live instances on undo / redo, and one Undo button arbitrates between the view and graph stacks.
    • feat/2026-09-28-control-panel-command-args-are-raw-json.md — ✅ landed 2026-09-28. Commands describe their args (CanvasCommand.args, plain data in core) so the control-panel editor draws fields — reference kinds pick live layers / behaviours / layouts; undeclared keys keep a JSON fallback.
    • feat/2026-09-28-app-header-controls-do-not-save-with-the-canvas.md — ✅ landed 2026-09-28. placement: 'header-*' on ControlPanelSpec so GraphCanvasApp header controls save with the canvas; adds a layer.visible toggle command.
    • feat/2026-09-28-hooks-and-commands-duplicate-the-same-logic.md — ✅ landed 2026-09-28 (G1 deferred to the next breaking release). Hooks and commands call one set of functions in @invana/graph (select mode, clipboard, two-stack undo); GraphControlsToolbar's private layout commands go; the section hooks are deprecated; the logic → hooks → commands rule is in canvas-react/CLAUDE.md.
    • feat/2026-09-29-command-controls-go-stale-or-fail-silently.md — 🚧 implemented on feat/commands-followups-2. Command controls stay live and say when they can't work: owner-side commands.invalidate() bridges replace write-site calls; an unregistered command reads "(unavailable)"
      • a dev warning; dev-build arg validation; scene:behaviour:unregister; useHistory is two-stack; useLock / useEdgeType share engine functions with their commands; 11 behaviours keep getOptions() current.
    • feat/2026-09-29-commands-stop-at-saved-control-panels.md — 🚧 accepted; phases A–E implemented on feat/commands-phases-a-b-c (unmerged; F, G deferred). The remaining command work, in seven phases: A defects (O3 behaviour events, O4 re-attach, V5) → B widget / choice option fields + footer panels → C GraphCanvas owns history + clipboard → D typed commands (generic map) → E shortcuts, command menus, palette → F stories (only when asked) → G breaking removals.
    • feat/2026-09-28-an-analysis-cannot-be-recorded-or-replayed.md — 🚧 accepted 2026-09-28 (F1–F17; F18–F23 deferred; lands as three PRs, see D-15). Playbooks: a JSON script, and history as the record. canvas.playbook is a list of JSON steps (addStep only appends; next / previous / goTo play them through the ordinary canvas methods). canvas.history becomes one operation log (the two stacks merge, no limit) with a free-text actor on every entry. GraphStore.applyDelta is the one recorded data door; derived behaviour writes go unrecorded. Plus FocusBehaviour, store-driven selection and inspect, relayout on hide/show, and feed-friendly layout. No filter in the canvas.

Release

  • rfcs/feat/2026-10-08-a-release-can-ship-local-package-links.md — ✅ a release ships npm versions only. pnpm check-release-deps fails on any file: / link: / git / URL dependency in the overrides, manifests or lockfile. release.sh runs it before bumping and the release workflow's resolve job runs it before anything publishes. Not in pnpm lint, so developing against a local design kit still lints.
  • release-0.0.12-checklist.md — 🚧 is v0.0.12 shippable? The tree is mechanically green (build 20/20 · types 19/19 · lint 0 errors · 369 tests · boundaries · API surface · Node ESM smoke on the built dist/), so every open item is a release item, not a code one. Five blockers: three package names publish for the first time (canvas-core, renderer-pixijs, canvas-telemetry-otel are 404 on npm, and @invana/canvas@0.0.12 hard-depends on two of them — pnpm -r publish is not atomic, so a token that cannot create names lands an unusable version); the branch is not main; 13 breaking commits since v0.0.11 with no breaking-change group in cliff.toml; apps/docs still documents a @invana/canvas/primitives subpath that no longer exists and tells users to install pixi.js; and README/CLAUDE.md still call renderer-pixijs an optional lazily-resolved peer when it is a static hard dependency. Plus eleven should-fix rows (the dead preference: 'canvas' option, untested packages, the open security S1/S2; canvas-telemetry-otel's missing docs and the publish-metadata gap are now fixed), a pre-tag verification table, and the ordered release sequence.

Architecture

  • architecture-proposal.md — target Layer / Behaviour / Layout / Renderer architecture for the rewrite. Long-form rationale; partially implemented. Referenced by §-number from source TSDoc across packages/canvas.
  • canvas-engine-types.md — the @invana/canvas engine type reference (as-built): the full public type surface grouped by subsystem — primitives (geometry · shapes · fills · stroke · labels · connectors/anchors/routers/pathStyles/markers · decorations · effects), engine (Canvas/config · Camera · Context · Events incl. the full CanvasGlobalEvents + renderer event maps · Renderer · Theme), and abstractions (Layer/Behaviour/Layout bases + built-ins · Store/DirtyBatcher/ColumnStore · registries). The renderer layer the graph types compile down to; companion to the state inventory. Notes the source≠docs naming caveats (PrimitivesRenderer, BaseShapeSpec, …).

Implemented (kept as design-of-record)

Data model

  • data-types-instances.md — input vs stored instances (NodeData/NodeOption split, G6-aligned).
  • data-types-implementation-plan.md — phasing for the data-model migration.
  • node-record-types-rfc.md — two record types, not five (📋 proposed; half already true). Inventories what GraphNode / NodeOption / NodeData / NodeInput / GraphDataOptions each claimed to do and which had users — NodeData's own TSDoc called itself "the record GraphStore holds" while the store demonstrably holds GraphNode, and it had zero runtime users; 112 story files had imported it anyway because it was exported and structurally compatible. Names the distinction the old design conflated: two resolver moments — layer-template resolvers (NodeOption.style, fire every render against the stored node, ✅ built, this is how ColorByBehaviour works) versus per-record input resolvers (fire once at insert against raw data, ❌ never implemented). Target is one resolver type + one stored type, which deleting the dead three already achieved. Remaining work is the leak: GraphNode.style is unknown where NodeData.style was NodeStyle, so the type is strictly weaker on its most-read field and three stories now carry casts — and the stated reason (a store→layer cycle) doesn't hold, since type-only imports are erased. Recommends extracting NodeStyle to its own module. 5 work items, the largest being a doc sweep: packages/graph/CLAUDE.md still documents the deleted split as current.
  • required-type-on-records-rfc.md — type becomes required on GraphNode / GraphEdge (🚧 core landed, migration pending). One type, type: string, every author writes it — the separate-input-type alternative was built, measured and reverted: it migrates for nearly free but means two types to keep straight for one field. Correcting the draft's own scare number: the headline "24,683 records" is the record count, not the edit count — h1b2019, flare, life-tree and lattice have zero literal node lines (all loop-generated), so they're ~2 edits each. Real shape: a dozen dataset generators at one line each, plus 2,546 literal fixture sites across 232 storybook files (median 7/file). UNKNOWN_TYPE ships as a named export and the store still normalises with || not ?? on both insert and update paths — now as a runtime net for importData, parsed JSON and Partial patches, all of which bypass the compiler. §9 is the migration plan: revert → datasets get real types (flare/h1b2019/life-tree already carry isLeaf/depth, so a one-line ternary gives them a genuine partition where they had none) → ts-morph codemod driven by TS2741 diagnostics rather than regex → reader cleanup. Also: what 'unknown'-as-a-value changes (§4), the dead-type-cluster deletion (§6, done), and all six serialization paths traced (§7) — old snapshots need no migration, new ones omit type when it equals the sentinel.
  • node-edge-options-plan.md — superseded (data-model layer) by data-types-instances.md; render-shape decisions still hold.
  • graph-datasets-folder-exports-plan.md — one folder, one module for @invana/graph-datasets: finish b3c0cb3 by making data: GraphData + settings: CanvasConfig the only exports of each of the 24 dataset folders, one package subpath per dataset (@invana/graph-datasets/les-miserables), legacy per-dataset aliases + their as unknown as GraphData laundering casts deleted, non-graph payloads (hierarchies · topojson · sankey source · meta · traces) split into their own files. Uncovers two shipping datasets whose data.edges is undefined. 24-row manifest + 63-file consumer migration.
  • node-styling-unification-plan.md — one tiny semantic node-styling API (primaryColor / label / showLabel / size / icon / shape) that styles both simple shapes and composite/template nodes, hiding the flat NodeStyle. Composite = a shape kind extending CompositeShape (registered like any shape; explicit w/h, no scalar size); templates take primaryColor; content-LOD (semantic zoom) deferred into the template. Phased impl + deferred declarative-template form.

State & options

  • store-owns-state-plan.md — make GraphStore the single owner of interaction state.
  • store-owns-state-pseudocode.md — companion pseudocode for the above.
  • unified-canvas-options-plan.md — one declarative, id-addressed GraphCanvas options object.
  • canvas-state-plan.md — the consolidated review doc for @invana/canvas-store: concepts + data model (CanvasStore { view, data }), architecture + code/file structure, performance (the "state → targeted render" wiring), telemetry, collaboration, and the migration from the existing engine + its impact/blast radius. Sequences the four state docs below at the package level.
  • canvas-store-data-event-flow.md — the data hierarchy + flow companion: the full CanvasStore { view, data, events } tree, the data write→trigger→flush→render path (incl. the FlushMode trigger), the bus event families + state:change/data:flush bridges, and the dataLayerId pointer + ctx.self facade. Tags ✅ built vs 🔧 proposed.
  • canvas-store-d13-data-ownership.md — the D13 decision doc (Phase 3 gate): reconciling graph's mature GraphStore with the kernel's LayerData — recommends interface, not inheritance (kernel DataSource interface + registration; GraphStore implements it; no merge), with the event-model crux (granular vs delta) resolved via an additive onChange projection on GraphStore. Sub-steps 3.1a–3.3.
  • canvas-store-migration-plan.md — the execution plan: the phased, checklist-driven path from today's as-built kernel (Phase 0 done) to a fully-wired canvas-store driving the engine — kernel fast lane (Phase 1) → engine-under-the-store M0 (Phase 2) → data ownership D7 (Phase 3) → React reads, interaction/camera fold, drop-bridge, telemetry, collab, scale. Per-phase gates + revertibility; maps each cross-cutting decision to the phase that resolves it. The actionable companion to canvas-state-plan.md §10.
  • canvas-store-state-inventory.md — the state census + type map: every piece of state across canvas settings / layers / behaviours / layouts / styling / templates / theme / records, each with its type definition, physics class (definition / interaction / runtime / data-cold / data-hot / derived / handle), source-of-truth today, and target home in canvas-store. Includes the proposed kernel shape, per-instance config catalogs, the rendering-data-model type appendix, a source→target mapping table, and the 9 cross-cutting decisions.
  • reactive-state-store-plan.md — single reactive store (zustand behind a transferable ReactiveStore port) for config + interaction state; no UI copies; telemetry decorator; CRDT-ready.
  • collaborative-state-plan.md — near-realtime, multi-user, offline collaboration on top of that store (CRDT doc + presence, PG/Redis, OTel).

Architecture (3-package direction)

  • event-taxonomy.md — canonical event catalogue + the <domain>:<subject>:<action> bus naming scheme (telemetry / realtime / query), and the state-ownership migration map that moves all state + events out of the engine into canvas-store.
  • canvas-3-package-architecture.md — draft: target split into canvas-store (state + events) / canvas (orchestrator) / canvas-pixijs (renderer), with one end-to-end example (state + events + telemetry + history + rendering + layout updates) and the phased path (IRenderer abstraction gated to Phase 3).
  • current-architecture.md — as-built: the packages, the vocabulary (six things are called "layer"), the concept/ownership diagram, today's data flow, and the full census of where pixi is bound — 53 files inside @invana/canvas plus 7 rule-breaking leaks outside it. Read first.
  • renderer-split-design.md — target + refactor: canvas orchestrates, renderers subscribe to the store and draw. Specs become durable state, custom paint collapses into a path spec kind, and the renderer contract shrinks to subscribe + a small lifecycle surface. Includes the three.js second-backend design (orthographic, engine-owned camera/picking, SDF text) and the P0–P7 refactor path.

Operations / domain API

  • graph-canvas-operations.md — the GraphCanvas operations layer: graph verbs (focus / focusNeighbours / isolate / select-subtree / collapse / pin / remove) modelled as the query → primitive action → composite op stack, with a decomposition catalog. Composites batch kernel primitives + GraphStore queries; none live in the kernel (domain-free). Notes the view-vs-data batching split + undo semantics.

React / UI / apps

  • ui-consolidation-plan.md — the headless-vs-pixels re-split of @invana/canvas-react + @invana/canvas-ui: canvas-react becomes the headless binding layer (roots, contexts, null-rendering wrappers, store hooks — never imports @invana/ui), canvas-ui becomes the React UI kit (components, toolbars, menus, editors, views, GraphCanvasApp) built on canvas-react's hooks so it couples to canvas-store and is live by default. Dependency flips to canvas-ui → canvas-react; the 23 @invana/ui files + all pixels move out of canvas-react; editors keep a controlled inner + connected wrapper (packages the per-consumer SettingsPanel bridge once). Move manifest + 8-phase migration (P0 instructions → P7 connected wrappers).

  • canvas-settings-editor-panel-plan.md — clean rewrite of the settings editor panel (CanvasSettingsEditorPanel): a pure projection of canvas-state — reads defaults from store.view.definition (+ registry introspection for kinds only), writes edits via canvas.update(...). Untangles today's 4-jobs-in-one-file into a single store seam (useCanvasSettings, null-safe so the *Inner gate collapses) + presentational pieces (SettingsInstanceRow / InstanceSettingsForm / buildSettingsSections) + schema registry. Rename table + behaviour-preserving migration steps.

  • canvas-react-plan.md — React entry-point (declarative <Canvas>).

  • graph-canvas-apps-plan.md — one shell (GraphCanvasApp), standard *Apps as JSON defaults, one item shape for toolbars, rails and menus.

  • designer-studio-plan.md — Designer studio page (sibling of Explorer, on GraphCanvasApp); umbrella doc sequencing the state refactor → editor kit → page → telemetry → collaboration.

  • toolbars-plan.md — reusable toolbar building blocks + assembled toolbars.

  • commands-followups.md — open work from the command / control-panel refactor (📋 26 items): duplicate hook ⇄ command paths to unify, unfinished toolbar conversion, command weak spots (no types, invalidate() discipline, unregistered commands), deferred RFC rows. Proposes the rule: logic in engine functions, hooks for code, commands only for saved controls.

  • storybook-namespace-migration-plan.md — slim canvas-react/ down to 3 stories (<Canvas>, <GraphCanvas>, reseed — the only ones demoing canvas-react's own exports): relocate the other 22 so each sits under the package that owns the code it demos — GraphCanvasApp (10) + hover/template/layers/layout-comparison UI (6, +streaming-demo.tsx helper) → canvas-ui/, cross-package demo apps (4) → usecases/, ExportImage→canvas/ & ExportState→canvas-store/. Glob-discovered (no config change); only title: strings rewrite. Full 25-story table + open sub-decision on the export stories' canvas-ui chrome.

  • usecases-storybook-taxonomy-plan.md — split stories/usecases/ into apps/ + domains/ (executed 2026-07-31): the product surfaces (a story about the tool, dataset as prop) vs usecases/domains/<domain>/ = the verticals with several styling / layout configs of one dataset as sibling files (code-kg/{DotsForce,CompositeCards,HealthBadges}, cora/{CitationNetwork,SubjectBundle}). Lowercases the Usecases/ title prefix — reversing as-built note (1) of storybook-namespace-migration-plan.md. Full 17-story manifest. As built (2026-08-01, notes 5–7): the apps/ bucket is gone — the three surfaces (CanvasDesigner · GraphModeller · GraphVisualiser) sit in the root of usecases/, domains/ is the only folder; open blocker on the ellipse-frame coverage the deleted SimpleAndCompositeNodes uniquely held.

  • casestudies-rfc.md — usecases/ split into tools/ + by-casestudies/: the five case studies, their data, and the analyst's story (🚧 the namespace split and the dataset audit have landed; the five stories aren't written). Re-charters the verticals bucket around a higher bar — a named analyst, a question, a decision they must defend — and picks the five to pitch: financial crime · attack paths · target discovery · supply risk · AI traces, each with a step-by-step demo script (observe → focus → investigate) under the thesis that an explanation is a subgraph. Key process decision (D1a): grow by-casestudies/, don't bulk-migrate into it — a folder that says "case study" while holding a dataset demo violates its own charter, so the five are authored one at a time and a demo is absorbed only once rewritten. Also the dataset register (what each runs on, real vs created) and the 🔒 locked licence policy — CC0 · public domain · MIT · Apache-2.0 · BSD · ISC · self-generated; no copyleft, no NC, no per-use data attribution — retroactive to everything already shipping. Headline finding: the dangerous failure mode is the integration trap — PrimeKG is "MIT" on the code while its data pulls in DrugBank (NC), Hetionet is "CC0" on the integration only, Alibaba clusterdata has no licence at all. The §5.4 audit of all 15 shipping datasets found four unusable (game-of-thrones had no upstream licence, wikipedia-dataviz/cora CC BY-SA, life-tree unlicensed) — all replaced by seeded generators, ~9.4 MB → ~20 KB. Survivors put four of five case studies on real data: Wikidata (CC0), Open Targets (CC0), air-routes (Apache-2.0).

  • new-behaviours-rfc.md — the engine work the case studies require (📋 proposed; §7 decisions locked): five industries, written independently, converge on one gap — the engine is strong at observe, decent at focus, and has almost nothing for investigate. Lists 6 new behaviours (B1 focal-emphasis driver · B2 traversal-highlight · B3 neighbourhood-expand · B4 timeline · B5 edge-centrality · B6 graph-diff), 7 updates to existing ones, and 4 prerequisites that gate them — P1 the ops layer (design ✅ locked, GraphCanvas.ts implements none of it), P2 path()/reachableFrom(), P3 evidence export, P4 centrality algorithms (NodeCentralityBehaviour is degree-only but every story is about a bridge, not a hub). Down from 8 behaviours: two merges (path+reachability → one mode-driven behaviour; colour-by-value → U5, ColorByLabelBehaviour → ColorByBehaviour with mode: 'categorical' | 'range', serialisable field paths, five scales, auto domains, valueColors, and a bins/gradient legend contract — §4.1, now the largest single item). Both merges were unblocked by the same finding: editor fields may be a function of the live form values, so mode-driven disjoint field sets are a solved, in-use pattern — which reversed two of the draft's own recommendations. Each item with separate design vs implementation status, plus what already exists and must not be re-planned (dimmed/highlighted states, per-element visibility, AdjacencyIndex, data:changed) and the rule-12 editor tax (6 new editors + 2 rewritten + kind discriminators). Minimum viable unlock: P1 + P2 + B1 + B2.

  • color-by-behaviour-rfc.md — ColorByLabelBehaviour → ColorByBehaviour (📋 proposed; the U5 item of new-behaviours-rfc.md in full). One behaviour, two modes — 'categorical' (which kind is this?) and 'range' (how much of this is there?) — because both write the same template fields through the same resolver mechanism, so splitting them would need single-writer discipline to solve a problem the split created. Written options-first (§2 is the RFC): the four constraints the interface must satisfy, the borrowed weightKey/weightBy naming convention (serialisable string primary, function escape hatch that supersedes it), why it stays flat rather than a discriminated union (setOptions takes Partial<TOptions>; Partial<A|B> distributes badly), the ResolvedOptions + resolveOptions(prev, patch) pattern with its load-bearing ?? vs 'x' in patch split, and a mode × scale validity matrix that doubles as the editor's fields-function spec. Headline modelling catch, found by designing options before code: the domain must be per-kind (nodeDomain/edgeDomain) — node risk [0,1] and edge latency [0,250] share no scale — generalised to unit-bearing options are per-kind, unit-free options are shared. Also: root-relative dot paths (a deliberate divergence from weightKey's data-relative key), five scales (continuous + quantile/threshold binning), hand-rolled sRGB lerp with a sequential single-hue default ramp that sidesteps the grey-midpoint problem, auto-domain rescan on data:changed (refresh the domain, never re-run the install path), a per-channel getLegend() contract + GraphLegendLayer.colorByBehaviourId, back-compat aliases, and a six-step implementation sequence where steps 1–3 are useful alone. Keeps dab4ad0's identity-guarded restore untouched.

  • node-style-live-binding-plan.md — store-bound node-style editing: a useNodeStyleEditor(nodeId) hook + <GraphNodeStyleEditor> drop-in (canvas-react) that seed a headless canvas-ui editor from resolveNodeStyle, stay reactive via useGraphEvent('node:update'), and write back live via updateNode (raw-style spread, history-coalesced) — so editors reflect the canvas and auto-sync without hand-wired onSubmit/updateNode. Also fixes the "Size shows 0" symptom (unset size override) by dropping raw size from the Simple basics tier. Live-vs-Apply, the wholesale-style footgun, and why useStore can't read nodes.

Performance & scale

  • large-graph-performance-plan.md — rendering perf on large, crowded graphs (the ~5k-node / ~28.6k-edge "hairball"): the symptom, the telemetry-measured root cause (no viewport culling + one Graphics per edge → ~110k display objects re-rendered every frame; the layers phase dominates pan/drag/layout; loose edge bboxes make hover hit-test expensive), the zoom-regime framing (culling wins zoomed-in; batching + LOD win zoomed-out; neither is universal), the render options (A culling · B edge batching · C zoom-LOD · D cache path samples · E gate edge hit-test by zoom · F frame-coalesced flush · G hover fast-path), and — for hovering the right edge in a crowd — the edge-pick correctness analysis (nearest-wins is technically right but flickers / is ambiguous / invisible when edges are near-coincident) with its own options (H segment-level hit index · I stable nearest + hysteresis · J node-incidence bias · K node-hover-first · L ambiguity picker) and the "reliable-when-separable, graceful-when-not" stance. Recommended phasing: cheap standalone wins + edge-pick stability first → segment index → culling → batching/LOD. Companion to the feat/canvas-telemetry-otel observability work.
  • render-pipeline-plan.md — how render work is expressed, merged, ordered and paid for. Today there is no pipeline: a store event calls the renderer imperatively and immediately (GraphLayer's flush handler is a hand-rolled miniature of the right idea — four dirty sets drained in a prose-documented order). Proposes a render-intent queue: producers mark(id, class) instead of calling the renderer; intents coalesce on (id, class) via an explicit merge matrix; a frame planner orders them by cost class (move ~0.05 ms → geometry high — a 100× spread today invisible to callers) under an interaction-aware budget, so cheap work always runs at 60 fps and only expensive classes slip. Adds the dependency-ordering contract (remove → install → move → frames → geometry → route → restyle → decorations), a bulk lane (machine-rate work skips per-item events — the kernel's own two-lane doctrine, extended from positions to install/update), epochs for one-compare invalidation, and backpressure with a degradation ladder. §8 answers the worker question: layout / ingest / derived geometry / index build / vertex-buffer construction move off-thread; rendering itself doesn't (OffscreenCanvas relocates the freeze and costs input latency — but the IRenderer extraction makes a worker renderer just another implementation, so the option stays open). Phased R0–R5 + W1–W3, with risks (R2 is a behaviour-preserving refactor of code that works) and the over-abstraction check.
  • large-graph-load-pipeline-plan.md — initial-load perf (the disjoint half of the perf plan), written as a consumer of the render pipeline: loading ~5k nodes / ~20k edges freezes the tab for seconds before any layout, because GraphLayer installs every element inline in one unbroken macrotask (addShape → Graphics + rbush + label Text; addConnector → Container + 3 Graphics + a full route). Culling and frame-coalesced flush can't help — the cost is constructing the instances. Key framing: budgeting alone gives non-blocking, not snappy (same 2–4 s, now as popcorn), so it takes three levers — yield (install as a deferrable intent class, nodes before edges, epoch per load, sync threshold), cut (install-time LOD: skip sub-pixel label Text, keepFraction edges, badges, unrouted connectors — the largest single win, and the on-ramp to virtualization), and order (camera-fit from store bounds → node bodies → edges → labels: progressive fidelity, not progressive elements; a live canvas + progress chip, never a spinner). Plus edge-install staged against layout cool-down. Records the partial-render hazards (getBounds/fitOnLoad read the renderer, cull invalidation, exportImage, headless), the honest ceiling (25k display objects cost what they cost → virtualization / edge batching next), and phases L0–L6.

Geo intelligence

  • geo-intelligence-plan.md — 📋 mark, query, track and brief on a map, all as JSON (data + config). Phases P1–P8: BubbleSets at map scale · marker icons / rotation / zoom labels as template config · GeoFeaturesLayer (GeoJSON areas, lines, circles with provenance) · draw / measure / area-query tools · live tracking (fixes, interpolation, trails, signal state, follow) · time (kernel clock, slider, replay, geofences, route deviation, ETA) · analyst extras · maritime and last-mile case studies. Indexes the per-phase RFCs and the open decisions.
  • analyst-requirements.md — the tracked analyst requirements (A1…A30): each one a question a named analyst asks while deciding, with its phase and status. The what and why; the plan above is the how.

Engine features

  • autofit-bounds-rfc.md — 📋 fitOnLoad frames the wrong box. The camera lands zoomed into the gap between two nodes (4400 % on the GraphVisualiser, 2750 % on FullFeatured, a blank d3-hierarchy/Tree), which reads as "the nodes aren't rendering" — four such reports in one session, every one a camera bug over a correctly-drawn scene. Established: GraphLayer.getBounds() measured a 7 × 7 rect (one node of radius: 3.5 — i.e. 252 nodes still stacked at the origin) while the graph was visibly spread out, and fitting that into a 1200 px viewport is the 4400 %; an animated force sim self-corrects because _armAutoFit re-fits on every layout:run:tick, while a one-shot layout (animate: false, d3-hierarchy, sankey, ELK) gets exactly one shot and keeps the stale box. Not yet established — and the reason this is an RFC rather than a patch: the write path looks synchronous (setPositionsBulk → store.flush() inside getBounds → node:update → moveShape mutating spec.x/y in place, the very fields the bounds read), and the two failures disagree (Les Mis self-corrects seconds later = one-frame race; the hierarchy case still read 7 × 7 two seconds on = positions never reached the specs). Plan: one instrumented run whose three outcomes each name their own fix site (_armAutoFit wiring · fitView · the store→layer bridge), then a ≤20-line change on the principle that a measurement must not depend on frame ordering — explicitly not re-timing fitView, which the Fit button, fitOnLoad and the layout wrappers all share. Outcome C would mean getShapeWorldBounds can disagree with the store for bulk writes, which affects hit-test bounds / minimap / ELK sizing too, and re-scopes this.
  • text-labels-plan.md — text labels for nodes & edges.
  • badges-edges-plan.md — badges on edges + node parity (draft).
  • group-aware-layouts-plan.md — make parentId groups lay out correctly in every layout, not just ELK. Today only ELK does containment (opt-in), d3-force approximates it (centroid pull), geometric/sankey ignore it, and D3HierarchyLayout crashes (its tree comes from edges, so a frame node is a second root). Three root causes: every hierarchy-aware layout conflates parentId with "group" (a group is style.group/isGroupNode — so plain trees get boxed), collapse-hiding is derived via collapsedAncestor so shouldPlaceNode's hidden test misses collapsed members everywhere, and each layout owns private copies of the rules. Fix: shared helpers in @invana/graph (placeable predicate · effectiveEndpoint edge remap+dedupe to a fixpoint · GroupOptions insets), then ELK native compound (fix + collapse the flat/compound branches into one + default includeGroups: true) · the d3-hierarchy crash fix · a RecursiveGroupLayout (lay each group out in isolation → box → super-node at the parent level → translate) that gives grid/circular/tree/radial containment for free. Records the two meanings of "group support" (native vs recursive) and recursion's blind-subgraph quality caveat.
  • per-element-visibility-plan.md — first-class per-element hide/show for nodes & edges (single + batched bulk), a hidden flag stored as a flags-column bit (sibling of pinned) with the effective-visibility rule (edge hidden if an endpoint is) owned by GraphStore. Culls from render/hit-test/bounds/camera/layout/labels/minimap (not alpha 0), fixing invisible-but-clickable; node:visibility/edge:visibility events (derived-only incident-edge cascade), serialization round-trip, and Layer.setVisible + scene:layer:visibilitychange for whole-layer visibility.