Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

Add "Understanding dataflow" user guide (#5737)

Trevor Manz7ebb3a96107c
diff --git a/docs/_static/docs-debugging-minimap.mp4 b/docs/_static/docs-debugging-minimap.mp4
new file mode 100644
index 0000000000..5967eed74c
Binary files /dev/null and b/docs/_static/docs-debugging-minimap.mp4 differ
diff --git a/docs/_static/docs-debugging-minimap.webm b/docs/_static/docs-debugging-minimap.webm
new file mode 100644
index 0000000000..973492f2f1
Binary files /dev/null and b/docs/_static/docs-debugging-minimap.webm differ
diff --git a/docs/_static/docs-dependency-explorer.jpg b/docs/_static/docs-dependency-explorer.jpg
new file mode 100644
index 0000000000..e79fd96f98
Binary files /dev/null and b/docs/_static/docs-dependency-explorer.jpg differ
diff --git a/docs/_static/docs-dependency-explorer.webp b/docs/_static/docs-dependency-explorer.webp
new file mode 100644
index 0000000000..6ec7a055c4
Binary files /dev/null and b/docs/_static/docs-dependency-explorer.webp differ
diff --git a/docs/_static/docs-dependency-graph.png b/docs/_static/docs-dependency-graph.png
index 160c48bc5a..cefd532bea 100644
Binary files a/docs/_static/docs-dependency-graph.png and b/docs/_static/docs-dependency-graph.png differ
diff --git a/docs/_static/docs-minimap.mp4 b/docs/_static/docs-minimap.mp4
new file mode 100644
index 0000000000..a5e6ac02e7
Binary files /dev/null and b/docs/_static/docs-minimap.mp4 differ
diff --git a/docs/_static/docs-minimap.webm b/docs/_static/docs-minimap.webm
new file mode 100644
index 0000000000..9f091e3281
Binary files /dev/null and b/docs/_static/docs-minimap.webm differ
diff --git a/docs/_static/docs-reactive-reference-highlighting.jpg b/docs/_static/docs-reactive-reference-highlighting.jpg
new file mode 100644
index 0000000000..ff48d08671
Binary files /dev/null and b/docs/_static/docs-reactive-reference-highlighting.jpg differ
diff --git a/docs/_static/docs-reactive-reference-highlighting.webp b/docs/_static/docs-reactive-reference-highlighting.webp
new file mode 100644
index 0000000000..f41f7d3eab
Binary files /dev/null and b/docs/_static/docs-reactive-reference-highlighting.webp differ
diff --git a/docs/_static/docs-variables-panel.jpg b/docs/_static/docs-variables-panel.jpg
new file mode 100644
index 0000000000..c752143867
Binary files /dev/null and b/docs/_static/docs-variables-panel.jpg differ
diff --git a/docs/_static/docs-variables-panel.webp b/docs/_static/docs-variables-panel.webp
new file mode 100644
index 0000000000..0b6ef273e9
Binary files /dev/null and b/docs/_static/docs-variables-panel.webp differ
diff --git a/docs/getting_started/key_concepts.md b/docs/getting_started/key_concepts.md
index d7f25dfa9a..fc1f2b4163 100644
--- a/docs/getting_started/key_concepts.md
+++ b/docs/getting_started/key_concepts.md
@@ -97,7 +97,7 @@ For more on reactive execution, open the dataflow tutorial
marimo tutorial dataflow
```
-or read the [reactivity guide](../guides/reactivity.md).
+or read the [reactivity guide](../guides/reactivity.md). To visualize and understand how data flows through your notebook, check out our [dataflow tools](../guides/editor_features/dataflow.md).
### Visualizing outputs
diff --git a/docs/guides/editor_features/dataflow.md b/docs/guides/editor_features/dataflow.md
new file mode 100644
index 0000000000..df762ebd88
--- /dev/null
+++ b/docs/guides/editor_features/dataflow.md
@@ -0,0 +1,293 @@
+# Understanding dataflow
+
+Unlike traditional notebooks, marimo understands the relationships between
+cells and uses this information to keep your code and outputs consistent. These
+relationships are represented as a **dataflow graph**, which encodes how
+variables flow from one cell to another.
+
+The dataflow graph, which is inferred statically from variable definitions and
+references, is used to automatically run (or mark stale) cells in the correct
+sequence; it's also why cells can be arranged "out of order" on the page, or
+across columns.
+
+marimo provides several tools to help you visualize and understand the
+relationships it identifies between cells.
+
+## Variables explorer
+
+The **variables explorer panel** collects marimo's understanding of the
+variables in your notebook into a single searchable list.
+
+<div align="center">
+<picture>
+ <source srcset="/_static/docs-variables-panel.webp" type="image/webp">
+ <img src="/_static/docs-variables-panel.jpg" alt="Variables panel showing variable relationships" style="max-width: 700px; width: 100%;" />
+</picture>
+</div>
+
+To open the panel, click the **variables icon** in the **left sidebar panel**.
+The variable explorer shows each variable's name, type, value, where it's
+defined, and where it's used.
+
+## Dependency explorer
+
+The **dependency explorer panel** provides a _bird's-eye view_ of your
+notebook's dataflow, showing all cells as an interactive graph. It helps you
+understand high-level patterns, overall connectedness, and the broader
+structure of your notebook.
+
+<div align="center">
+<picture>
+ <source srcset="/_static/docs-dependency-explorer.webp" type="image/webp">
+ <img src="/_static/docs-dependency-explorer.jpg" alt="Dependency explorer showing a graph view of cell connections" style="max-width: 700px; width: 100%;" />
+</picture>
+</div>
+
+To open the dependency explorer, click the **graph icon** in the **left sidebar
+panel**. You can choose between vertical or horizontal layouts.
+
+## Minimap
+
+The **minimap** provides a _focused slice_ of your notebook's dataflow, helping
+you understand the reactive context of a given cell and navigate related cells.
+You can toggle the minimap a _hotkey_ (`Cmd/Ctrl-Shift-i`), or select the **map
+icon** from the **footer toolbar**.
+
+Click a cell in the minimap to jump to it:
+
+<div align="center">
+<video autoplay muted loop playsinline style="max-width: 700px; width: 100%;">
+ <source src="/_static/docs-minimap.webm" type="video/webm">
+ <source src="/_static/docs-minimap.mp4" type="video/mp4">
+</video>
+</div>
+
+Connections are read **left to right**:
+
+- Connections to the **left** are _direct inputs_ — cells the current cell reads from
+- Connections to the **right** are _direct outputs_ — cells that read from the current cell
+- Cells positioned left or right but not directly connected are _transitive
+dependencies_ — cells that influence or are influenced by the current cell, but
+only through one or more intermediate cells
+
+The minimap can take some getting used to, but it's an effective representation
+for understanding how data flows around the current cell. It's meant to show
+_just enough_ local context to help you debug, trace relationships, and
+navigate complex notebooks. For a high level overview, use the [dependency
+explorer](#dependency-explorer).
+
+### Cell symbols
+
+The minimap uses visual indicators to show the status and connectivity of each cell:
+
+<table tabindex="0">
+ <thead>
+ <tr>
+ <th>Symbol</th>
+ <th>Meaning</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <svg viewBox="-8 -8 16 16" width="16">
+ <circle r="3"></circle>
+ <path d="M 0 0 H -6" stroke-width="2" stroke="black">
+ </path>
+ </svg>
+ </td>
+ <td>Cell uses variables from other cells</td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-8 -8 16 16" width="16">
+ <circle r="3"></circle>
+ <path d="M 0 0 H 6" stroke-width="2" stroke="black">
+ </path>
+ </svg>
+ </td>
+ <td>Cell defines variables used by other cells</td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-8 -8 16 16" width="16">
+ <circle r="3"></circle>
+ <path d="M 0 0 H -6" stroke-width="2" stroke="black">
+ </path>
+ <path d="M 0 0 H 6" stroke-width="2" stroke="black">
+ </path>
+ </svg>
+ </td>
+ <td>
+ Cell uses variables <i>and</i> defines variables used by others
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-8 -8 16 16" width="16">
+ <circle r="3"></circle>
+ </svg>
+ </td>
+ <td>
+ Cell defines variables but isn't connected to anything (safe to delete)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-8 -8 16 16" width="16">
+ <circle r="1.5" fill="#c4c4c4"></circle>
+ </svg>
+ </td>
+ <td>
+ Cell doesn't define or use variables from other cells (often markdown)
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-8 -8 16 16" width="16">
+ <circle r="3" fill="#ff6565"></circle>
+ </svg>
+ </td>
+ <td>Cell has an error</td>
+ </tr>
+ </tbody>
+</table>
+
+
+### Reading cell connections
+
+When you select a cell, the minimap draws lines showing how data flows between
+cells. Since marimo cells can define multiple variables, downstream connections
+show all cells that reference any variable from your selected cell.
+
+<table tabindex="0">
+ <thead>
+ <tr>
+ <th>Path</th>
+ <th>Interpretation</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <svg viewBox="-18 -8 36 32" width="36" style="color: #0780e9">
+ <circle r="3" fill="currentColor"></circle>
+ <path d="M 0 0 H 7 V 21 H 14" fill="none" stroke-width="2" stroke="currentColor"></path>
+ <circle r="3" cx="14" cy="21" fill="currentColor" ></circle>
+ </svg>
+ </td>
+ <td>
+ First cell defines variables used by the second cell. Second cell will
+ re-run when the first runs
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-18 -8 36 32" width="36" style="color: #0780e9">
+ <circle r="3" fill="currentColor"></circle>
+ <path d="M 0 0 H -7 V 21 H -14" fill="none" stroke-width="2" stroke="currentColor"></path>
+ <circle r="3" cx="-14" cy="21" fill="currentColor"></circle>
+ </svg>
+ </td>
+ <td>
+ First cell uses variables from the second cell. First cell will re-run
+ when the second runs
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-18 -8 36 56" width="36" style="color: #0780e9">
+ <circle r="3" fill="currentColor"></circle>
+ <path d="M 0 0 H 7 V 21 H 14" fill="none" stroke-width="2" stroke="currentColor"></path>
+ <circle r="3" cx="14" cy="21" fill="currentColor"></circle>
+ <circle r="3" cy="42" fill="#c4c4c4"></circle>
+ </svg>
+ </td>
+ <td>
+ Gray cell has no connection to the blue cells above
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-18 -8 36 56" width="36" style="color: #0780e9; overflow: visible">
+ <circle r="3" fill="currentColor"></circle>
+ <path d="M 0 0 H 7 V 21 H 20" fill="none" stroke-width="2" stroke="currentColor"></path>
+ <circle r="3" cx="14" cy="21" fill="currentColor"></circle>
+ <path d="M 14 42 H 8" fill="none" stroke-width="2" stroke="#c4c4c4"></path>
+ <circle r="3" cx="14" cy="42" fill="#c4c4c4"></circle>
+ </svg>
+ </td>
+ <td>
+ Gray cell indirectly uses variables from the first cell. Whiskers
+ indicate transitive dependencies
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-18 -8 36 56" width="36" style="color: #0780e9; overflow: visible">
+ <circle r="3" cx="-14" fill="currentColor"></circle>
+ <path d="M -20 0 H -7 V 21 H 0" fill="none" stroke-width="2" stroke="currentColor"></path>
+ <circle r="3" cy="21" fill="currentColor"></circle>
+ <path d="M -14 42 H -8" fill="none" stroke-width="2" stroke="#c4c4c4"></path>
+ <circle r="3" cx="-14" cy="42" fill="#c4c4c4"></circle>
+ </svg>
+ </td>
+ <td>
+ Gray cell's variables are indirectly used by the second cell. Whiskers
+ indicate transitive dependencies
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <svg viewBox="-18 -8 36 32" width="36" style="color: #ff6565">
+ <circle r="3" fill="currentColor"></circle>
+ <path d="M 0 0 H 7 V 21 H -7 V 0 Z" fill="none" stroke-width="2" stroke="currentColor"></path>
+ <circle r="3" cy="21" fill="currentColor"></circle>
+ </svg>
+ </td>
+ <td>
+ Cells have circular dependencies - each uses variables from the other
+ (error)
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+
+### Implementation notes
+
+The minimap was heavily inspired by [Observable's
+minimap](https://observablehq.com/documentation/debugging/minimap), a
+[thoughtfully
+designed](https://observablehq.com/@observablehq/introducing-visual-dataflow)
+dataflow visualization for their reactive JavaScript notebooks.
+
+We adapted Observable's visual design to marimo's execution model. A key
+difference: Observable cells are named (declaring one variable), while marimo
+cells can define multiple variables. This leads to asymmetric dataflow tracing.
+When tracing upstream, we can identify exactly which variables from a cell
+depends on. When tracing downstream, all variables in a dependent cell are
+considered affected. Our minimap also accounts for marimo's support for
+multi-column layouts.
+
+
+## Reactive reference highlighting
+
+marimo's **reactive reference highlighting** provides an _in-editor_ indicator
+when variables defined by other cells are used in the current cell. These
+"reactive references" are emphasized with an underline and lightly bolded text:
+
+<div align="center" style="margin-top: 20px">
+<picture>
+ <source srcset="/_static/docs-reactive-reference-highlighting.webp" type="image/webp">
+ <img src="/_static/docs-reactive-reference-highlighting.jpg" alt="Reactive reference highlighting showing variable usage across cells" style="max-width: 500px; width: 100%;" />
+</picture>
+</div>
+
+Hover over any underlined variable and `Cmd/Ctrl-Click` to jump to its
+definition.
+
+This feature is currently **opt-in** and must be enabled via *Settings* > *User
+Settings* > *Display* > *Reference highlighting* or toggled via the command
+palette (`Cmd/Ctrl-K` > *Reference highlighting*).
+
diff --git a/docs/guides/editor_features/hotkeys.md b/docs/guides/editor_features/hotkeys.md
index d6a5d525b3..d8976095a7 100644
--- a/docs/guides/editor_features/hotkeys.md
+++ b/docs/guides/editor_features/hotkeys.md
@@ -4,58 +4,59 @@ If you'd like to override the default hotkeys, you can do so in the hotkeys menu
You can find a list of available hotkeys below:
-| Hotkey |
-| --------------------------- |
-| `cell.aiCompletion` |
-| `cell.cellActions` |
-| `cell.complete` |
-| `cell.createAbove` |
-| `cell.createBelow` |
-| `cell.delete` |
-| `cell.findAndReplace` |
-| `cell.focusDown` |
-| `cell.focusUp` |
-| `cell.fold` |
-| `cell.foldAll` |
-| `cell.format` |
-| `cell.goToDefinition` |
-| `cell.hideCode` |
-| `cell.moveUp` |
-| `cell.moveDown` |
-| `cell.moveLeft` |
-| `cell.moveRight` |
-| `cell.redo` |
-| `cell.run` |
-| `cell.runAndNewAbove` |
-| `cell.runAndNewBelow` |
-| `cell.selectNextOccurrence` |
-| `cell.sendToBottom` |
-| `cell.sendToTop` |
-| `cell.splitCell` |
-| `cell.undo` |
-| `cell.unfold` |
-| `cell.unfoldAll` |
-| `cell.viewAsMarkdown` |
-| `completion.moveDown` |
-| `completion.moveUp` |
-| `global.commandPalette` |
-| `global.focusBottom` |
-| `global.focusTop` |
-| `global.foldCode` |
-| `global.formatAll` |
-| `global.hideCode` |
-| `global.interrupt` |
-| `global.runStale` |
-| `global.save` |
-| `global.showHelp` |
-| `global.toggleLanguage` |
-| `global.toggleTerminal` |
-| `global.toggleSidebar` |
-| `global.unfoldCode` |
-| `markdown.blockquote` |
-| `markdown.bold` |
-| `markdown.code` |
-| `markdown.italic` |
-| `markdown.link` |
-| `markdown.orderedList` |
-| `markdown.unorderedList` |
+| Hotkey |
+| --------------------------------------------- |
+| `cell.aiCompletion` |
+| `cell.cellActions` |
+| `cell.complete` |
+| `cell.createAbove` |
+| `cell.createBelow` |
+| `cell.delete` |
+| `cell.findAndReplace` |
+| `cell.focusDown` |
+| `cell.focusUp` |
+| `cell.fold` |
+| `cell.foldAll` |
+| `cell.format` |
+| `cell.goToDefinition` |
+| `cell.hideCode` |
+| `cell.moveUp` |
+| `cell.moveDown` |
+| `cell.moveLeft` |
+| `cell.moveRight` |
+| `cell.redo` |
+| `cell.run` |
+| `cell.runAndNewAbove` |
+| `cell.runAndNewBelow` |
+| `cell.selectNextOccurrence` |
+| `cell.sendToBottom` |
+| `cell.sendToTop` |
+| `cell.splitCell` |
+| `cell.undo` |
+| `cell.unfold` |
+| `cell.unfoldAll` |
+| `cell.viewAsMarkdown` |
+| `completion.moveDown` |
+| `completion.moveUp` |
+| `global.commandPalette` |
+| `global.focusBottom` |
+| `global.focusTop` |
+| `global.foldCode` |
+| `global.formatAll` |
+| `global.hideCode` |
+| `global.interrupt` |
+| `global.runStale` |
+| `global.save` |
+| `global.showHelp` |
+| `global.toggleLanguage` |
+| [`global.toggleMinimap`](dataflow.md#minimap) |
+| `global.toggleTerminal` |
+| `global.toggleSidebar` |
+| `global.unfoldCode` |
+| `markdown.blockquote` |
+| `markdown.bold` |
+| `markdown.code` |
+| `markdown.italic` |
+| `markdown.link` |
+| `markdown.orderedList` |
+| `markdown.unorderedList` |
diff --git a/docs/guides/editor_features/index.md b/docs/guides/editor_features/index.md
index 0a99a33717..6a04d83e15 100644
--- a/docs/guides/editor_features/index.md
+++ b/docs/guides/editor_features/index.md
@@ -5,17 +5,18 @@ notebooks. We've taken a batteries-included approach to designing the editor:
it comes _packed_ with features to make you productive when working
with code and data.
-| Guide | Description |
-|-------|-------------|
-| [Overview](overview.md) | An overview of editor features and configuration |
-| [Package Management](package_management.md) | Using package managers in marimo |
-| [AI Completion](ai_completion.md) | Code with the help of a language model |
-| [Language Server](language_server.md) | Code intelligence via LSP |
-| [Hotkeys](hotkeys.md) | Our hotkeys |
+| Guide | Description |
+| ------------------------------------------- | ------------------------------------------------ |
+| [Overview](overview.md) | An overview of editor features and configuration |
+| [Understanding dataflow](dataflow.md) | Visualize and navigate cell dependencies |
+| [Package Management](package_management.md) | Using package managers in marimo |
+| [AI Completion](ai_completion.md) | Code with the help of a language model |
+| [Language Server](language_server.md) | Code intelligence via LSP |
+| [Hotkeys](hotkeys.md) | Our hotkeys |
Highlights include:
-- a variables panel that lets you explore variable values and see where they are defined
+- [dataflow tools](dataflow.md) including a variables panel, dependency graph, and minimap for understanding notebook structure
- a data explorer that lets you inspect dataframes and tables at a glance
- smart module autoreloading that tells you which cells need to be rerun
- code completion
diff --git a/docs/guides/editor_features/overview.md b/docs/guides/editor_features/overview.md
index 087fb8131a..e21d2ff780 100644
--- a/docs/guides/editor_features/overview.md
+++ b/docs/guides/editor_features/overview.md
@@ -32,6 +32,7 @@ A non-exhaustive list of settings:
- [GitHub Copilot](ai_completion.md)
- [LLM coding assistant](ai_completion.md)
- [Module autoreloading](../configuration/runtime_configuration.md#on-module-change)
+- [Reactive reference highlighting](dataflow.md#reactive-reference-highlighting)
## Command mode
@@ -117,7 +118,7 @@ marimo ships with the IDE panels that provide an overview of your notebook
- **file explorer**: view the file tree, open other notebooks
- **variables**: explore variable values, see where they are defined and used, with go-to-definition
- **data explorer**: see dataframe and table schemas at a glance
-- **dependency graph**: view dependencies between cells, drill-down on nodes and edges
+- **dataflow tools**: visualize and navigate notebook structure and cell dependencies (see [Understanding dataflow](dataflow.md))
- **package manager**: add and remove packages, and view your current environment
- **table of contents**: corresponding to your markdown
- **documentation** - move your text cursor over a symbol to see its documentation
diff --git a/docs/guides/reactivity.md b/docs/guides/reactivity.md
index df9f14e270..12da1aba89 100644
--- a/docs/guides/reactivity.md
+++ b/docs/guides/reactivity.md
@@ -40,6 +40,14 @@ It then forms a directed acyclic graph (DAG) on cells, with an edge from
one cell to another if the latter references any of the definitions of the
former. When a cell is run, its descendants are marked for execution.
+!!! tip "Visualizing the DAG"
+ marimo provides several tools to help you visualize and navigate this dependency graph,
+ including a [dependency explorer](editor_features/dataflow.md#dependency-explorer),
+ [minimap](editor_features/dataflow.md#minimap),
+ and [reactive reference highlighting](editor_features/dataflow.md#reactive-reference-highlighting).
+
+ See the [understanding dataflow](editor_features/dataflow.md) guide for details.
+
!!! important "Runtime Rule"
When a cell is run, marimo automatically runs all other cells that
**reference** any of the global variables it **defines**.
diff --git a/docs/guides/troubleshooting.md b/docs/guides/troubleshooting.md
index 160c9a2b31..58cb8177a0 100644
--- a/docs/guides/troubleshooting.md
+++ b/docs/guides/troubleshooting.md
@@ -1,6 +1,13 @@
# Troubleshooting
-This guide covers common issues and unexpected behaviors you might encounter when using marimo notebooks, along with ways to debug and resolve them. If your issue isn't covered here, try checking our [FAQ](../faq.md).
+marimo understands the relationships between cells based on the variables they
+define and reference. When things don't work as expected, marimo provides
+[several tools](editor_features/dataflow.md) to help you understand both marimo's
+interpretation of your notebook and debug issues.
+
+This guide covers common issues and unexpected behaviors you might encounter,
+along with ways to debug and resolve them. If your issue isn't covered here,
+try checking our [FAQ](../faq.md).
## Why aren't my cells running?
@@ -16,31 +23,49 @@ Instead of mutating objects across cells, try creating new objects or performing
### Verify cell connections
-Use the Dependency Panel or Variable Panel to check if your cells are actually connected as you expect.
+Use marimo's [dataflow tools](editor_features/dataflow.md) to check if your cells are actually
+connected as you expect.
-1. Open the Dependency Panel (graph icon) or Variable Panel (variable icon) in the left sidebar.
-2. Look for arrows connecting your cells or check which cells are listed as using each variable.
-3. If connections are missing, review your variable usage to ensure cells are properly referencing each other.
+Toggle the [minimap](editor_features/dataflow.md#minimap) to see the current cell's
+connections. You should see connections to cells you expect as inputs on the
+left and outgoing connections to other cells on the right. Here, the cell
+defining `f` depends on the two cells above and connects to the one below with
+`print(f)`.
<div align="center">
-<figure>
-<img src="/_static/docs-dependency-graph.png"/>
-<figcaption>
-Dependency graph showing cell connections.
-</figcaption>
-</figure>
+ <video autoplay muted loop playsinline style="max-width: 450px; width: 100%;">
+ <source src="/_static/docs-debugging-minimap.webm" type="video/webm">
+ <source src="/_static/docs-debugging-minimap.mp4" type="video/mp4">
+ </video>
</div>
+
+Alternatively, you can open the [dependency
+explorer](editor_features/dataflow.md#dependency-explorer) or [variables
+explorer](editor_features/dataflow.md#variables-explorer) in the left sidebar.
+
+<div align="center">
+ <figure>
+ <img width="650" src="/_static/docs-dependency-graph.png"/>
+ <figcaption>
+ Dependency graph showing cell connections.
+ </figcaption>
+ </figure>
+</div>
+
+If connections are missing, review your variable usage to ensure cells are
+properly referencing each other.
+
## Why is my cell running unexpectedly?
If a cell is running more often than you anticipate:
### Check cell dependencies
-Use the Dependency Panel or Variable Panel to see what's triggering your cell:
+Use marimo's [dataflow tools](editor_features/dataflow.md) to see what's triggering your cell:
-1. Open the Dependency Panel or Variable Panel.
-2. Locate your cell and examine its incoming connections.
+1. Toggle the [minimap](editor_features/dataflow.md#minimap) (see [above](#verify-cell-connections)) - cells on the left are inputs that trigger your cell when they run.
+2. Check the [variables explorer](editor_features/dataflow.md#variables-explorer) to see which variables your cell uses and where they're defined.
3. You might find unexpected dependencies that are causing the cell to run.
### Understand global vs local variables vs functions args
diff --git a/mkdocs.yml b/mkdocs.yml
index 60657576c9..393b0e31cb 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -110,6 +110,7 @@ nav:
- Editor features:
- Editor features: guides/editor_features/index.md
- Editor overview: guides/editor_features/overview.md
+ - Understanding dataflow: guides/editor_features/dataflow.md
- AI completion: guides/editor_features/ai_completion.md
- Language Server: guides/editor_features/language_server.md
- Package management: guides/editor_features/package_management.md