# Graph: Groups & Presets

The Graph is your whole workspace as a living map. Every note, plan, and canvas is a node, and every [wikilink](/docs/workspace/wikilinks-and-backlinks/) is an edge. It's the web of connections behind your backlinks, drawn so you can see the shape of your work and find your way around it.

As a workspace grows, that map gets busy. **Groups** colour the patterns you care about, and **presets** save a whole graph setup so you can return to a view in one click.

## Why explore the graph

- spot clusters and gaps you'd never notice in a file tree
- see what connects to a project, and what's drifting unconnected
- follow relationships instead of remembering folder paths

## What to try

1. Open **Graph**.
2. **Start a preset.** Groups live inside a preset, so save one first with **+ Add Preset**. It snapshots the current view.
3. **Make a group from a search.** Type a query in the search bar (say `tag:work`), click **New group from current search…**, and name it. It's created with a default color, which you can change afterward from its swatch. Every node the query matches takes that color.
4. **Add a few groups, then reorder them.** When a node matches more than one, the group higher in the list wins, so move them up or down to set the precedence.
5. **Switch presets** to flip the whole graph to a different lens in one click.

## Reference

Groups help you **color and highlight** patterns in your graph. Presets help you **save and switch** your graph setup instantly.

## Where to find this {#where-to-find-this}

Open **Graph** and look in the side panel for **Preset** and **Groups**.

## Groups vs Presets {#groups-vs-presets}

- A **Group** is a reusable **color rule**.
- A **Preset** is a saved **graph setup**, including which groups are enabled and their order.

## What's a Group? {#groups}

A **Group** is a reusable color rule:

- It has a **query** (chips like `tag:work`, `type:note`, `-tag:deprecated`)
- And a **color**
- Any node matching the query gets its **node color changed**

Groups are **rules, not saved lists**: they update automatically as your data changes.

Groups are **global**: you define them once and reuse them across presets.

A group's query uses the exact same chip grammar as graph search, including the rule that **OR only works inside a single chip**. See [Search: Quick rules](/docs/graph/search/#operators) and [OR lives inside one chip](/docs/graph/search/#or-scope) for the full explanation, so a group query like `tag:work | type:note` does not surprise you (it ANDs, it does not OR).

### Making and managing a group {#manage-groups}

- **Create it from a search.** Type a query in the graph's search bar, then **New group from current search…**. Name it, and it joins the active preset with a default color, which you can change afterward.
- **Recolor or rename** any time by clicking its swatch or its name.
- **Turn it on or off** with its checkbox. Off keeps the rule but stops it coloring, so you can flip a lens without losing it.
- **Remove vs delete.** **Remove** takes the group out of *this* preset only, leaving it available to others. **Delete** removes it everywhere.
- **Check your query.** While you edit a group you see a live **"Matches: {count}"** count (e.g. "Matches: 12"), so you can tell at a glance whether the rule catches what you meant.

:::note Groups vs "Colorize by type"
**Colorize by type** is a separate switch that paints every node its built-in type color (note, plan, canvas, and so on). **Groups** are your own rules, and they take priority: where a group matches, its color wins; everywhere else the type color (or plain white) shows through. Use type colors for a quick default, groups for the patterns *you* care about.
:::

## What's a Preset? {#presets}

A **Preset** is a saved setup for the graph:

- **Graph settings** (the settings shown in the side panel), including:
  - Query and filtering: `searchText`, advanced filters, pinned and highlighted tags
  - Graph topology: `edgeMode`, `depth`, `focusMode`, tags enabled and topology
  - Display: view mode (links, +embeds, folders, tags), colorize by type, show arrows, node style (solid or outline + icon), label mode, node sizing, recency shading
  - Performance caps: max nodes, edge and label LOD thresholds and limits
  - Layout and sim: layout locked plus layout tuning values, sim run mode
- **Enabled groups** for this preset
- **Group order** for this preset (used for color precedence)

### Using presets {#using-presets}

- **Create one** with **+ Add Preset**: it snapshots the current graph settings together with your enabled groups and their order.
- **Apply one** by clicking it; the whole graph jumps to that setup. Click it again to **turn it off**.
- **Rename or delete** from the same row.
- **Groups need a preset.** Until one is active, the Groups panel reads *"Select (or save) a preset to enable groups."* That is by design: groups color the graph *through* a preset.
- Enabling, disabling, and reordering groups sticks to the active preset. To change the *view* settings a preset stores, adjust them and save a new preset.

### What those preset settings mean {#preset-glossary}

The field names above are the saved settings the side panel controls. In plain terms:

- **`edgeMode`**: which kinds of connections get drawn as edges. It steps from links only, to links plus embeds, to also including folder edges, to tag edges. Fewer edge kinds means a cleaner, faster map.
- **`depth`**: how many hops out from the focus to include (1, 2, or 3). Lower depth keeps you in the immediate neighbourhood, higher depth pulls in more distant nodes.
- **`focusMode`**: show the whole map, or zoom in to just the neighbourhood around the active item. Use it to cut a busy graph down to what is near what you are looking at.
- **Recency shading**: shade nodes by how recently they were touched, so fresh work stands out and stale work fades. (Paired with the recency time range: none, week, month, or year.)
- **LOD** (level of detail): hide edges and labels when you are zoomed out, then bring them back as you zoom in. It is a performance control, not a filter, so it never changes which items *match*, only how much the map draws at once.

These are display and performance controls, separate from the group queries above, which decide *colour*.

## Color precedence (first match wins) {#precedence}

When a node matches multiple enabled groups, the **first group in the list wins** (topmost / highest priority).

Example:

- A node matches **Work** (pink) and **Important** (red)
- If **Important** is above **Work**, the node uses the **Important (red)** color

You control that order: each group has up and down arrows, and the group nearest the top has the highest priority. Order is saved **per preset**, so the same group can rank differently in different presets.

## See what Mira has learned {#ai-knowledge}

The graph also surfaces what Mira has picked up about your work:

- **Badges on nodes.** A note you have turned into a **skill** wears a small amber sparkle; a **memory topic** (something Mira remembers about you, kept under `Mira/Memory`) wears a rose brain mark. You can spot Mira's knowledge at a glance without opening anything.
- **The "What Mira has learned" filter.** Toggle it to shrink the whole map down to Mira's skills and memory topics plus the notes they connect to, so you can see the shape of what the assistant knows and where it came from. If nothing has been learned yet, the map is honestly empty.
- **Hover to preview.** Rest the pointer on any node for a moment and a card previews its contents, so you can skim what a node holds without leaving the graph.

## Tips {#tips}

Group queries follow the same chip rules as graph search (AND across chips, OR only inside a single chip with `|`, NOT with `-` or `NOT `). The full explanation, including the common `tag:work | type:note` mistake, lives on the [Search](/docs/graph/search/#operators) page, so this page does not repeat it.

## Troubleshooting {#troubleshooting}

- **Why is my group empty?** The rule doesn't match anything in the current graph setup (filters, scope, and caps can exclude items).
- **Why did the color change?** Another group higher in the list matched first (reorder groups to change priority).
- **Why did my `|` query behave like AND?** OR only joins values inside one chip. A query that crosses facets (like `tag:work | type:note`) is read as separate AND chips. See [OR lives inside one chip](/docs/graph/search/#or-scope).
