{% extends "dashboard/base.html" %} {% from "partials/_macros.html" import empty_state, info_toggle %} {% block page %} {% call info_toggle(key='graph', title="What is the code graph?") %}

The code graph is the local AST-derived map of files, modules, classes, functions, imports, containment, and calls. This page is read-only and uses the same workspace visibility filters as the graph MCP tools.

The SVG is rendered server-side in Python. Pan and zoom run locally in a small inline script; no CDN or external graph library is loaded.

{% endcall %}

{{ icon('database') }} Workspace

Only workspaces visible to the current operator are listed.

{% if workspaces %}
{% else %} {{ empty_state( 'No visible workspaces', body='Register or start a session in a workspace before rendering a code graph.', icon_name='database' ) }} {% endif %}

{{ icon('network') }} Visualization

Scroll to zoom. Drag to pan. Hover a node for path and line number.

{% if graph_svg %}
{{ graph_svg|safe }}
{% else %} {{ empty_state( 'No code graph rendered', body='Build the code graph for the selected workspace with the graph_build MCP tool first.', icon_name='network' ) }} {% endif %}
{% endblock %}