> ## Documentation Index
> Fetch the complete documentation index at: https://desme.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Graph Canvas

> An interactive node graph that visualizes your program's execution as a network of function calls, data types, and tests.

The graph canvas is the central view in dbgflow. It shows each traced function, instrumented type, and test as a node, connected by edges that reflect the actual call relationships and test links recorded during execution.

## Node types

Each node represents a different kind of instrumented entity. A colored badge in the top-left corner of the node identifies its type at a glance.

| Badge | Node type | Source |
| - | - | - |
| `fn` | Function node | Functions annotated with `#[trace]` |
| `db` | Data node | Types annotated with `#[ui_debug]` |
| `t` | Test node | Tests annotated with `#[dbg_test]` |

* **Function nodes** display the function's call signature and update their status as execution events play back.
* **Data nodes** display the type name and reflect value snapshot activity.
* **Test nodes** display the test name and link to the last traced function they invoked.

## Status indicators

Every node has a color-coded status dot that reflects its execution state at the current playback position.

| Color | Status | Meaning |
| - | - | - |
| Gray | Idle | Not yet reached, or after execution |
| Orange | Running | Currently executing |
| Green | Success | Completed without errors |
| Red | Failure | Returned an error or caused a test failure |

> [!NOTE]
>
> Status colors update in real time as you move through the timeline. Scrubbing backward resets nodes to their earlier states.

## Edges

Edges connect nodes to represent relationships in your program:

* **Call edges** connect a caller function node to the function it invokes.
* **Test-to-function links** connect a test node to the last traced function that ran inside it.

Edges are laid out automatically. You can reposition nodes manually if the default layout doesn't suit your workflow — see [canvas modes](#canvas-modes) below.

## Canvas modes

> [tab] Pan mode
>
> In **Pan mode**, clicking and dragging on the canvas background moves the viewport. Use this to navigate large graphs without accidentally displacing nodes.
>
> Pan mode is the default when you open a session.

> [tab] Nodes mode
>
> In **Nodes mode**, clicking and dragging on a node repositions it on the canvas. Use this to rearrange the layout to match your mental model of the execution flow.
>
> > [!TIP]
> >
> > Switch to Nodes mode when you want to manually organize a complex graph. Your repositioned layout persists for the duration of the session.

You switch between modes using the **Canvas Mode Toggle** in the [playback controls bar](https://desme.mintlify.site/ui/playback-controls.md).

## Mouse interactions

| Interaction | Action |
| - | - |
| Scroll | Zoom in or out |
| Click a node | Select the node and open the [node details panel](https://desme.mintlify.site/ui/node-details.md) |
| Click the canvas background | Deselect the current node and close the details panel |
| Drag (Pan mode) | Move the viewport |
| Drag a node (Nodes mode) | Reposition the node |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.