22 Commits

Author SHA1 Message Date
Álvaro Tejero Cantero
a86d1161a4 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-17 22:31:37 +02:00
Alejandro Alonso
3cf6e20ba0 Sync Component library changes into the Ladybug graph 2026-08-17 22:31:37 +02:00
Alejandro Alonso
65d8402953 🐛 Fix memory leak 2026-08-17 22:31:37 +02:00
Alejandro Alonso
7ba6cc7700 Add Component nodes and IsInstanceOf edges 2026-08-17 22:31:37 +02:00
Alejandro Alonso
005d4a83d9 📎 Fix linter issues 2026-08-17 22:31:37 +02:00
Álvaro Tejero Cantero
07fefd101f 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-17 22:31:37 +02:00
Álvaro Tejero Cantero
eeb7e2481e 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-17 22:31:37 +02:00
Álvaro Tejero Cantero
4c4b1e5f59 🐛 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-17 22:31:37 +02:00
Álvaro Tejero Cantero
9b86a4bb01 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-17 22:31:37 +02:00
Alejandro Alonso
5aa6d50344 ♻️ Derive graph node schema from Malli registry 2026-08-17 22:31:37 +02:00
Alejandro Alonso
4d7bb51984 🐛 Fix batch delete sync and keep graph console feed alive 2026-08-17 22:31:37 +02:00
Alejandro Alonso
85fc8ae664 Handle mov-objects in debug graph sync 2026-08-17 22:31:37 +02:00
Alejandro Alonso
4d088ef40d Incrementally sync debug graph from Penpot file changes 2026-08-17 22:31:37 +02:00
Alejandro Alonso
1b1e3004ea Add debug graph console for in-memory Cypher queries 2026-08-17 22:31:37 +02:00
Alejandro Alonso
f6d933921d 🐛 Fix graph COPY ingest for multiline text names 2026-08-17 22:31:37 +02:00
Alejandro Alonso
0313883889 Load graph ingest via Ladybug COPY bulk import 2026-08-17 22:31:37 +02:00
Alejandro Alonso
b623ab0e17 Project nested shapes recursively into the graph 2026-08-17 22:31:37 +02:00
Alejandro Alonso
50c648e940 Validate graph ingest projections with Malli 2026-08-17 22:31:37 +02:00
Alejandro Alonso
dd21181967 ♻️ Share Ladybug connection across ingest and stats 2026-08-17 22:31:37 +02:00
Alejandro Alonso
e19711333b Use embedded Ladybug Java API instead of CLI 2026-08-17 22:31:37 +02:00
Alejandro Alonso
cfd25138bb Add Penpot-to-Ladybug graph ingest vertical slice 2026-08-17 22:31:37 +02:00
Alejandro Alonso
9a9d6c35f7 🎉 Basic lbug connection for ingestion 2026-08-17 22:31:37 +02:00