{# R7 · GRAPH center view (live) — INTERACTIVE node-edge graph. The Cortex knowledge / code graph rendered as an actual interactive NODE-EDGE graph (cytoscape.js, vendored at /static/cytoscape.min.js — no CDN), not just lists. Entities are nodes (coloured by kind via the node-kind palette), relationships are edges. Pan/zoom; click a node to focus + highlight its neighbours and populate the inspector; double-click re-centres the search on that node. The graph is BOUNDED server-side (main._graph_elements): the search hits + their 1-hop neighbours, capped at _GRAPH_NODE_CAP (~140) nodes — the Kaidera OS graph is ~5,868 nodes / 44k edges, so we never ship the whole thing to the browser. A "showing N of M" note makes the bound explicit. Data: nodes/edges from /cortex-graph-search (entities + one-hop relationships), headline counts from /graph/stats. The search box drives it — a term re-centres the graph on the matching entities + neighbours. Default (no term) seeds a project-flavoured catch-all so the canvas isn't empty. The entity + relationship LISTS are kept (collapsible side panel, "Lists" toggle) — the visual graph is primary but the verbatim rows stay reachable. The graph data may be thin/stale (the graph_rebuild cron has been flaky), so a clear "graph data may be stale" note always shows. Context (built in main._graph_view): `selected`, `selected_key` : project record + key (header) `gr_term` : current entity-search term ("" = seed) `gr_own_nodes/_edges` : this project's code-graph repo stats `gr_total_nodes/_edges` : cross-repo totals (context) `gr_repo_count` : code-graph repo count `gr_elements_json` : cytoscape elements (nodes+edges) JSON `gr_graph_nodes/_edges` : RENDERED node/edge counts (bounded) `gr_graph_total_nodes` : M for the "showing N of M" note `gr_node_cap`, `gr_graph_capped` : the cap + whether it clipped `gr_entities` + `gr_entity_count` : side-panel entity list `gr_relationships` + `gr_rel_count`: side-panel relationship list `gr_kind_counts` : {code, mem, work} tallies (legend) `gr_admin_reachable` : was /admin/cortex/entities reachable? `gr_entity_source` : "admin-l4" | "graph-search" #} {% if selected %}
graph_rebuild cron has been failing, so node/edge counts and entities can lag the live state.
No graph for “{{ gr_term or 'this seed' }}”.
No entities or relationships came back from cortex-graph-search. Try a different term, a file path, an entity name, or a handoff id.
/admin/cortex/entities) is token-gated and not reachable from this read-only console, so the graph-search entities stand in.{% endif %}
Select a project to explore its knowledge graph.