Entity Mind Map
An interactive graph of your book's entities showing how characters, locations, and other elements relate to each other.
What it does
The mind map page renders all entities from your book as an interactive Cytoscape.js graph. Nodes represent entities, sized by how often they appear in the manuscript. Edges come from two sources: explicit relationships you created (solid lines, labelled with the relationship type) and co-occurrence (dashed lines between entities that frequently appear in the same element, with opacity scaled by co-occurrence weight). Navigate to it from the dashboard or directly at /books/{slug}/mindmap, or press Cmd+Shift+X.
How to use it
Explore the graph — pan by dragging the canvas, zoom with scroll wheel or pinch. Nodes are colored by entity type (matching the highlight colors from the dashboard).
Inspect an entity — click any node to open a panel showing the entity's name, type, status, and mention count. The panel appears as a modal overlay; click outside it to dismiss.
Focus on connections — double-click a node to zoom into its immediate neighbourhood, showing only the nodes it connects to.
Context menus
Right-click anywhere on the canvas to access contextual actions.
On a node:
- Edit — opens the entity detail panel
- Add Relationship — starts a drag-to-connect handle; drag to another node to create a relationship
- Archive — deletes the entity and removes it from the graph
- View Page — navigates to the entity's full page
On an edge:
- Delete Relationship — removes the explicit relationship and its edge from the graph
On the background:
- Create Entity — opens a name and type popover; submitting creates the entity and adds it as a new node
- Reset Layout — in auto mode, reruns the layout algorithm; in persistent mode, switches to auto (your saved positions are preserved and you can switch back)
- Fit to Screen — zooms the viewport to fit all visible nodes
Creating entities from the graph
Right-click the canvas background and choose Create Entity. Enter a name and select an entity type, then confirm. The new entity is immediately added to the graph and becomes available in @-mention autocomplete in the editor.
Connecting entities
To create an explicit relationship between two entities, right-click a node and choose Add Relationship, then drag the handle that appears to the target node.
When you release over a target, a popover asks for the relationship type (filtered by the source and target entity types based on the relationship type system's domain/range rules). Selecting a type saves the relationship and adds the edge to the graph. The type system also handles inverse relationships, supertype inference, and constraint checking automatically.
Grouping entities
Select two or more nodes (click + Shift-click, or drag a selection box), then click Group selected in the toolbar. Enter a name and optional type for the group entity. A parent node is created with "member of" relationships to all selected nodes, and they are visually nested inside it as a compound group.
Layout modes
A toggle floats at the top of the canvas with two modes:
- Auto-arrange — Cytoscape lays out nodes automatically using the cose algorithm. Produces a fresh layout on each switch. This is a tool for exploration, not a saved state.
- Persistent — node positions are saved. Moving a node locks its position across reloads.
Use Pin to capture an auto-arranged layout into persistent mode. Pinning immediately prompts you to name and save the view.
Filters
A collapsible filter panel in the right sidebar. All filter choices auto-save to your session and persist across reloads.
Entity type toggles — show or hide all nodes of a given type (e.g. hide all locations to focus on character connections).
Edge complexity — a 3-step segmented control:
- All — explicit relationships + inferred relationships + co-occurrence edges (everything visible)
- Semantic — explicit + inferred relationships only (hides co-occurrence)
- Authored — only explicitly-created relationships (hides inferred + co-occurrence)
Explicit edges appear as solid lines with relationship type labels. Inferred edges (auto-created by the inference engine, e.g. "member of" from "leader of") appear as dotted lines. Co-occurrence edges (entities sharing manuscript elements) appear as dashed lines with weight-scaled opacity.
Timeline view
The mind map includes a temporal dimension. Relationships with temporal markers show their time range on the edges. This helps visualize how entity connections evolve across the story's timeline.
Structural notes overlay
Toggle Show notes in the filter panel to display structural notes on the canvas. Notes appear as small overlays near the entity nodes they are geographically closest to, based on proximity in the entity index. This gives you an at-a-glance view of revision notes and research flags in relation to the entities they concern.
Saved views
The Views section at the top of the right sidebar lets you save and restore named snapshots of the mind map — node positions, filters, and viewport.
- Save current view — appears when no preset is active. Names auto-generate as "View 1", "View 2", etc. (editable).
- Load — select a saved view from the dropdown. Views always load in persistent mode.
- Save — overwrite the current view with changes (appears when modified)
- Revert — discard changes and return to the saved state
- Save as — save a modified view under a new name
- A "modified" indicator appears when the active view has unsaved changes. Switching to Auto or Pin is blocked until you save or revert.
- Views are stored in
.skribex/mm-views.json— committed to git, so they survive across devices and backups.
Session persistence
Zoom level, pan position, node positions (in persistent layout mode), layout mode selection, and all filter states are saved automatically to your book session and restored when you reopen the mind map.
Notes
- The graph reflects the state of the entity index as of the last editor save.
- Co-occurrence edges are derived from the mention index; they appear only when two entities share at least one manuscript element.
- Node size scales with mention count — stub entities (unresolved @-mentions with no content) will appear small.
- Structural notes shown in the overlay are proximity-matched, not element-matched; a note may appear near an entity it does not directly reference.