12 Commits

Author SHA1 Message Date
Álvaro Tejero Cantero
f79b9c767b
Report actual graph memory from the buffer manager
graph-data gains bm-bytes (CALL bm_info() -> [mem_limit mem_usage], nil-safe, under the session lock); the session panel shows it as MiB behind the node/edge counts — real resident memory replacing the removed estimate.

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
2026-08-07 17:20:27 +02:00
Alejandro Alonso
176b602314
🐛 Fix memory leak 2026-08-07 17:20:27 +02:00
Alejandro Alonso
abcadb5cf8
Add Component nodes and IsInstanceOf edges 2026-08-07 17:20:27 +02:00
Alejandro Alonso
f234f383f5
📎 Fix linter issues 2026-08-07 17:20:27 +02:00
Álvaro Tejero Cantero
f2adc944f3
Make the default query self-explanatory; link the Cypher docs
The default query is now multi-line with // comments that explain the filter_* column convention in place (Kuzu accepts comments and blank lines mid-statement; verified against an in-memory database through the console query path). The query fieldset is retitled 'LadybugDB Cypher' with the Cypher word linking to https://docs.ladybugdb.com/cypher/.

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
2026-08-07 17:20:27 +02:00
Álvaro Tejero Cantero
10035135eb
Add graph toolbar, animate toggle, filter columns, repaint skip
Graph view gains an on-canvas G6 toolbar (auto-fit, expand, restore - the fullscreen icons drive the existing in-page expand), an 'animate' checkbox that disables animation unconditionally when off (persisted, adaptive <=100-node rule applies only when on), and a ResizeObserver on the canvas so the panel follows window/flex resizes without touching the user's viewport. Preset tree positions are now only injected for the built-in tree layout, removing the tree-then-layout flash on animated re-renders under G6 layouts. Refetches skip the repaint when the display projection (nodes, edges, truncated) is byte-identical, so attribute-only change bursts no longer repaint.

Console: default query returns s/t name+label over all edges plus filter_src_id/filter_tgt_id columns; filter_* columns are hidden from the results table (client and server render) but still feed the 'Show result in graph view' id harvest, keeping the table legible while the graph filter stays available. The query text persists in localStorage across page reloads (restored only over the default, never over a server-rendered query). Legend shows colored Unicode glyphs matching node shapes instead of squares with textual annotations. Load/Unload buttons share one row (HTML5 form attribute), and the loaded file name links to the Penpot workspace via the legacy /#/workspace/<project-id>/<file-id> route resolved client-side from the files-tree payload.

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
2026-08-07 17:20:27 +02:00
Álvaro Tejero Cantero
66376406c9
🐛 Fix list-column CSV ingest and serialize graph session access
COPY failed on any file with container shapes: list-typed DDL columns (shapes UUID[], points STRING[], strokes JSON[], ...) were JSON-encoded in staging CSVs, which Ladybug's list parser rejects. Write Kuzu list literals instead, typed per column. Also: value->clj no longer crashes on LIST/STRUCT values (binding lacks value_get_value support; fall back to string), and the debug session Connection is now guarded by a per-session lock — it was shared unsynchronized between the msgbus sync loop and HTTP query/export handlers, and one lost DETACH DELETE was observed under concurrent refetch load.

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
2026-08-07 17:20:27 +02:00
Álvaro Tejero Cantero
b4b01b0475
Add G6 graph view to debug graph console
POC per work/g6/plan.md. New /dbg/actions/graph-data exports the in-memory Ladybug session as plain JSON (per-table node queries + multi-table IsChildOf match, row cap 100k with truncation flag). Console page renders it with AntV G6 v5 (jsDelivr CDN, antv-dagre BT layout, color+glyph per node table, validated palette) and refetches debounced on live :file-change messages.

Signed-off-by: Álvaro Tejero Cantero <alvorithm@teje.ro>
2026-08-07 17:20:27 +02:00
Alejandro Alonso
35a6da1d55
♻️ Derive graph node schema from Malli registry 2026-08-07 17:20:27 +02:00
Alejandro Alonso
cb96683a6d
Handle mov-objects in debug graph sync 2026-08-07 17:20:27 +02:00
Alejandro Alonso
98cb7382a4
Incrementally sync debug graph from Penpot file changes 2026-08-07 17:20:27 +02:00
Alejandro Alonso
4a103ea906
Add debug graph console for in-memory Cypher queries 2026-08-07 17:20:27 +02:00