From d5324e9e02fa7dd05330a05f12511d94b0774cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Fri, 21 Aug 2026 02:27:32 +0200 Subject: [PATCH] :recycle: Swap the graph console from Cypher sessions to the overlay app.graph.debug sessions now hold a datascript overlay in an atom: readers never lock, the msgbus sync loop is the only writer, and the Ladybug engine no longer appears on the session path. The console query box speaks Datalog; the default query lists component instances by page, with filter_* columns carrying entity ids for the graph-view result filter exactly as before. The node inspector asks [:find ?a ?v :where [ ?a ?v]] and renders datom pairs. Node ids in the graph-view export are datascript eids, which keeps two shapes sharing one uuid in different containers distinct; the Cypher export merged them. export-session-database! is retired with the session tier: an overlay has no database file. The reproducible .lbug artifact stays on source=file through app.graph.ingest, which keeps the batch-export tier and the beadpot parity route alive. AI-assisted-by: claude-fable-5 --- .../app/templates/graph-console.tmpl | 107 ++-- backend/src/app/graph/debug.clj | 459 ++++++++---------- backend/src/app/http/debug.clj | 57 +-- 3 files changed, 276 insertions(+), 347 deletions(-) diff --git a/backend/resources/app/templates/graph-console.tmpl b/backend/resources/app/templates/graph-console.tmpl index eb2f1d0389..2b1268e96e 100644 --- a/backend/resources/app/templates/graph-console.tmpl +++ b/backend/resources/app/templates/graph-console.tmpl @@ -23,8 +23,8 @@ Graph Console
Load graph from Penpot - Click file or paste UUID to load Penpot file into an in-memory - Ladybug database. Loading a new file replaces the previous one. + Click file or paste UUID to load a Penpot file into an in-memory + datascript overlay. Loading a new file replaces the previous one.
Loading…
@@ -34,7 +34,7 @@ Graph Console value="{% if session %}{{session.file-id}}{% endif %}" /> {% if session %} + title="Rebuilds the session for the file in the box from scratch — the recovery fallback when live sync drifted or skipped changes. Paste a different UUID to switch files." /> {% else %} @@ -55,10 +55,10 @@ Graph Console File: {{session.name}} -
- - Revisions: ingested at {{session.revn}} · graph now +
+ + Revisions: loaded at {{session.revn}} · graph now {% if session.graph-revn %}{{session.graph-revn}}{% else %}{{session.revn}}{% endif %}
Graph size: …
@@ -88,8 +88,8 @@ Graph Console
- Query graph, read-only (LadybugDB Cypher) + Query graph, read-only (datascript Datalog)