11. Project Management and Markdown Annotations
This chapter covers the UI operations and annotation features for Plan / Report. For an overview of the analysis flow, see §1.3, §2.
11.1 Projects and File Management
In the sidebar Projects section, you can create and manage analysis projects.
Create a project:
- Click the + button in the Projects section.
- Enter a project name and confirm.
- The new project appears in the sidebar; you can add Markdown files under it.
Manage files:
- Right-click the project name and choose New File to add a Plan or Report file.
- Click a file name to open its Markdown tab in the main area.
- The right-click menu offers open, delete, and set / edit alias (see §11.2).
- The right-click menu also offers Export project…, which packs that project (you can also check additional projects) into a
.lantidefile (see §11.1.0 below).
11.1.0 Which Export to Use
For the step-by-step instructions for the four .lantide exports, see §11.1.1–§11.1.3. First choose the type by your goal:
| Your goal | Which one | Typical scenario |
|---|---|---|
| Share analysis context and results | Project | Cross-team Plan/Report review, handing off Executed conclusions; PM/ops import and annotate; back up a single analysis artifact |
| Collaborate and continue work in the original environment | Workspace | A colleague takes over the same set of SQL tabs and connection settings; optionally include chat sessions and query ledger; move machines or copy the whole analysis environment |
| Cross-workspace Agent memory | Application profile | Migrate User Memory, knowledge/memory settings, optional AI preferences |
| Move everything at once to a new machine | Full backup | Multiple workspaces + Application profile merged into a single file |
In one line: Project carries this analysis's contract and delivery; Workspace carries the whole work environment (excludes local CSV/Parquet by default, optionally packed); Application carries who you are; and none of the four include database passwords or the license cache.
Common scenario guide:
| Scenario | Recommendation |
|---|---|
| Have a manager/ops review metrics and read the Report (with Plan annotations) | Project export/import |
| A weekly meeting that only presents numbers externally, with no need for the other party to open Lantide | The Report's HTML Report (see §10) |
| Analyst A hands off to B on the same workspace (including SQL tabs) | Workspace (optionally check chat sessions) |
| Switching machines locally, full migration | Workspace or Full backup |
| Move only the Plan/Report; the recipient connects their own data | Project |
Common misconceptions:
- A Project does not include physical data files—the recipient must have the same data locally, or Rebind / connect it themselves, before they can rerun the SQL.
- A Workspace excludes CSV/Parquet by default—to continue querying you usually need to Rebind to a local folder, or check Include physical data files when exporting.
- You cannot query immediately after import—you must Reconnect databases and Reconfigure MCP; without physical data you often need a Source Run to rebuild the cache.
11.1.1 Export and Import Projects (.lantide)
You can pack the Plan, Report, project_knowledge.md, Reference files (ref_*.md; the older NN_reference.md is still compatible), and related sidecars (progress, annotations *.annotations.json, HTML, viz) of one or more projects into a single .lantide file. Best for sharing analysis context and results (see §11.1.0). It does not include workspace data files, SQL tabs, connection settings, or chat history.
Export:
- Click the top-bar UsersRound icon → Export… → Project; or right-click a project → Export project… (which pre-selects that project).
- In the dialog, check the projects to export (at least one), then click Export….
- Choose a save location; the default file name is
proj_export_<date>.lantide.
Import:
- Click the top-bar UsersRound icon → Import… → Project.
- Choose a
.lantidefile (only the extension must be.lantide; the base file name can be anything). - After confirming the preview, choose the target workspace; if the project name already exists, you can check Rename on conflict to automatically add a suffix such as
(imported)or(2). - Click Import. On success the sidebar project list updates; project focus does not switch automatically. Reconnect your data sources before running queries.
Note: If an HTML report contains local localhost URLs, its preview may need to be regenerated or adjusted under the current instance after import.
11.1.2 Export and Import a Workspace (Workspace .lantide)
You can pack an entire workspace's settings (data.json, tabs.json, schema.json, connection and MCP settings, knowledge_queue, all projects, etc.) into a .lantide file. Best for collaborative handoff or moving machines (see §11.1.0). It excludes physical data files by default; you can optionally check Include physical data files to also pack registered CSV/Excel/Parquet. It does not include user_knowledge.md or the global global_config.json.
Export:
- Click the top-bar UsersRound icon → Export… → Workspace.
- Optionally choose whether to include the agent query ledger, chat sessions, and MCP cache.
- Physical data (optional): After checking Include physical data files, choose Referenced in SQL tabs or All registered files; over 50 MB requires a second confirmation, and over 10 MB shows progress.
- Choose a save location; the default file name is
ws_export_<date>.lantide.
Import:
- Without physical data: a five-step wizard — Rebind to match locally registered files.
- With physical data: a six-step wizard — also includes Review files to extract (conflicts: Replace / Rename imported / Keep existing); files are extracted to the chosen folder.
Afterward, Reconnect databases and Reconfigure MCP sources; run a Source Run on the relevant tabs if needed. You can choose whether to switch to the new workspace.
Note: Connection passwords are not written into the bundle; a physical-data bundle may contain sensitive files, so share it carefully.
11.1.3 Export and Import Application Profile and Full Backup (Application / Full backup)
The Application profile can pack the cross-workspace user_knowledge.md (User Memory), a subset of global_config.json (knowledge/memory settings), and optional AI preferences (ai_settings_config). It excludes license_cache.json, physical data files, and workspace content.
Full backup merges one or more workspaces (nested .lantide sub-bundles) plus the Application profile into a single .lantide file—suitable for a full migration to a new machine.
Export an Application profile:
- UsersRound → Export… → Application profile.
- Optionally include AI preferences; API keys are excluded by default (a second confirmation is required to include keys).
- Save as
app_export_<date>.lantide.
Import an Application profile (three-step wizard):
- Choose the
.lantideand preview it (including user memory size and whether API keys are included). - Choose the User Memory strategy: Merge (dedupe and combine) or Replace (overwrite, backing up to
.pre_import.bakfirst). - Choose the Knowledge settings (global_config.knowledge) strategy: Merge or Replace; Memory is merge only; optionally apply AI preferences.
Export a Full backup:
- Export… → Full backup.
- Multi-select workspaces; optionally include ledger/chat/MCP cache, each workspace's physical data (same scope as the Workspace export), and the Application options.
- With multiple workspaces, physical data size is shown as Size unknown until export before export (each nested bundle is estimated independently).
- Save as
full_backup_<date>.lantide.
Import a Full backup:
- After choosing the bundle, assign a new name and folder to each embedded workspace in turn; workspaces that contain
physical_datarequire step-by-step handling of file conflicts (same as the Workspace Extract Wizard). - Finally, configure the Application profile (User Memory / Knowledge settings / AI preferences).
- When finished, follow the checklist to reconnect databases and MCP; run a Source Run on the relevant tabs if needed, and check AI Settings (including localhost hints).
11.1.4 Optional Encryption (passphrase)
All four .lantide exports (Project, Workspace, Application profile, Full backup) can optionally encrypt the outer bundle with a passphrase. When unchecked, the file produced is identical to older versions (a plaintext ZIP with a PK header) and can be imported by and from older apps.
Export:
- Check Encrypt bundle (or a similar option) in the Export dialog.
- Enter a passphrase (at least 8 characters) and enter it again in the confirmation field.
- The UI warns that a lost passphrase makes the content unrecoverable—store it safely yourself.
Import:
- After choosing a
.lantide, the system first inspects the bundle type; for an encrypted file, it shows a low-sensitivity summary from the header (e.g. project count, embedded workspace names) and notes that a full preview requires unlocking. - Enter the passphrase and click Unlock; unlocking may take a few seconds (Argon2 key derivation).
- After a successful unlock, the full preview is shown (bindings, warnings, etc.), and you can then import or Rebind.
Notes:
- A Full backup encrypts only the outer layer; each inner workspace sub-bundle remains a plaintext ZIP.
- Encrypted bundles need more temporary disk space (decryption writes a temp zip), which is cleaned up automatically afterward.
- Preview and Import each decrypt once (no cross-step cache).
11.2 Display Alias for Files
Each Plan / Report can be given a display alias (up to 30 characters) so you can recognize a file in the sidebar and tab labels by a meaningful name, instead of memorizing file names like 01_plan.md. The actual file name on disk is unchanged.
How to set:
- Right-click a project file row in the sidebar and choose Set alias (none set yet) or Edit alias (already has one).
- Enter the alias in the dialog; save it empty to clear the alias.
- You can also double-click the tab label of an open Markdown tab, or right-click the tab → Edit alias (for SQL tabs, double-click / right-click still renames the tab—different behavior).
Display rules:
- Sidebar: With an alias, shows
alias (01_plan); without one, shows only the stem (e.g.01_plan). Hover to see the full tooltip. - Tab label: Shows
ProjectName/aliasorProjectName/01_plan(without an alias); hover to see the full title. Double-click editing still edits only the alias itself. - The project name cannot contain the
/character (validated on both create and rename). - Aliases must be unique within a project; if one conflicts with another file, saving shows an error.
Relationship with AI:
- The AI can see the mapping between
file_nameanddisplay_aliasvialist_project_filesand the focused-project summary. - You can refer to a file by alias in chat (e.g. "open the Q1 plan"); the Agent tools resolve it to the correct canonical file name before reading or writing content.
11.3 Archived Docs
When many Plan / Report files accumulate in a project, you can archive documents you do not currently need to keep the main sidebar list tidy. Archiving does not delete files, nor does it move their paths on disk—the documents still exist in the same project.
UI location:
- After expanding a project in the sidebar, the Archived docs group is pinned at the top of the list (click the header to expand/collapse).
- Non-archived Plan / Report files appear below Archived docs, in file-number order.
- Whether the archive area is expanded is remembered per workspace + project (stored in the local browser).
How to archive and restore:
- In the normal list, hovering over a file row shows an archive icon on the right; clicking it moves the file into Archived docs.
- In the Archived docs area, hovering over a file row shows a restore (unarchive) icon; clicking it returns the file to the normal list below.
- Fallback: On touch devices or when hovering is inconvenient, right-click the file row and choose Archive or Unarchive.
- Clicking an icon or menu item does not open the document; clicking the file-name row (the row itself) still opens the Markdown tab as usual.
- A Plan in a locked editing state such as Executing / Executed can still be archived or restored (this only changes its sidebar grouping and does not unlock the content).
Relationship with AI:
- Archived documents can still be read and opened by the AI; if you want to continue an older plan or report, just open it.
- With a focused project, the "project file summary" sent to the AI skips archived files and understands the current work context mainly from non-archived files (e.g. the Agent tools' "latest Plan/Report" also uses non-archived ones).
11.3.1 Reference Docs
Reference is an editable, large reference corpus within a project (field mappings, status-code dictionaries, join notes, etc.), listed separately from Plan / Report under the sidebar's Reference docs subtree.
| Concept | Description |
|---|---|
| Reference file | ref_N.md (default for new files; the older NN_reference.md is still compatible), edited as ordinary Markdown |
| Intro (index) | Written to the ## Rules in project_knowledge.md, in the format [Ref: file_name] Purpose: … When to read: … |
| Agent read | Loads full text on demand via read_reference according to the index's When to read |
| Agent edit | Only patch_reference (small-scope find-replace); create a new Reference from the UI |
Update Intro (toolbar):
- Create by agent: Send the artifact to the Agent →
propose_knowledge→ approval card → Apply writes it into Rules. - Enter manually: Fill in Purpose / When to read directly, without an approval card.
- When there is no Intro yet, Update Intro shows a yellow hint; after the first successful save it guides you to create an Intro (you can choose Not now, which requires a second confirmation).
Export/import: Both the Project bundle (.lantide) and the Workspace's embedded projects include the Reference files (ref_*.md) and the [Ref: …] entries in project_knowledge.md.
Compare view: You can right-click a Reference file row to open a read-only comparison window (no annotation sidecar). In the tab bar and Compare view, Reference tabs are marked with an amber md badge, distinguishing them from Plan (blue) and Report (green).
Archive: Archived References are excluded from the Agent's proactive read scope by default; unless you explicitly ask in chat, the Agent will not load an archived file via the [Ref: …] index.
11.4 Project Focus Mode
Focus / unfocus:
- In the sidebar project list, each project has an eye icon (👁) on the right. A focused project shows its green eye icon persistently; when unfocused, the eye icon and sort arrows are hidden by default and appear only when you hover over the project row (or give it keyboard focus within the row), to avoid crowding the row with icons.
- Click the eye icon to focus the project—the icon turns green and the row is highlighted.
- Click the same project's eye icon again to unfocus it.
- Clicking another project's eye icon automatically switches focus (only one project can be focused at a time).
Manual project sorting:
The ↑ / ↓ arrows on the right of each project row (and, when unfocused, the eye icon) show by default only on hover or focus-within the row; invalid arrows for the topmost / bottommost project are hidden. Click an arrow to adjust the project's display order in the list. The sort is persisted and stays the same after a page refresh.
Automatic focus switching:
When you open a Plan or Report tab whose project differs from the currently focused one, the system switches focus automatically to that project:
- When the AI is not generating: Focus switches automatically, and a Toast appears at the bottom right (e.g. "Focused project switched to 'Sales Analysis'") with an Undo button to revert in one click.
- When the AI is generating: A confirmation dialog appears first, letting you decide whether to switch (switching does not interrupt AI generation, it only changes focus).
- When no project is focused yet: It switches silently, with no notification.
Note: Automatic focus switching only applies within the same workspace. Opening a tab from another workspace does not trigger it.
Automatic cleanup:
- When a focused project is deleted, focus is cleared automatically.
- When a workspace is renamed, focus and sort settings migrate automatically to the new name and are not lost.
Tip: Focus state is stored per workspace—different workspaces can each focus a different project without affecting one another.
11.5 Markdown Dual-Mode Editing
Markdown tabs support two editing modes, switchable anytime from the tab toolbar:
| Mode | Description |
|---|---|
| Visual (WYSIWYG) | Uses the Milkdown editor for rich-text editing—what you write is what you see |
| Markdown (source) | Uses the Monaco editor to edit the raw Markdown source directly |
Tab label colors: Plan tabs are shown in blue, Report tabs in green, and Reference tabs in amber, matching the sidebar colors so you can tell the different types of Markdown files apart at a glance.
Toolbar layout (Plan / Report): On the left is the Visual / Markdown mode toggle; in the middle are the Save icon button (tooltip shows Cmd/Ctrl+S; a dot appears at the top right when there are unsaved changes) and View options (including Wide layout, Visual mode only); on the right are workflow buttons such as Progress, Resolve (N) (Astroid icon + text, see §11.9), and Approve & Execute / HTML Report. Save is hidden when the Plan is Executing or Executed.
Manual Plan / Report linking (View options): In Visual mode, the View options of an Executed Plan and a Report show, depending on link state, Linked report: … / Linked plan: … (click to open the paired file; the name prefers the alias) or Link generated report / Link source plan (manually bind from unpaired candidates). A Plan in Planning / Executing does not show this option. A manual Link only writes the association metadata into the plan sidecar—it does not mark the Plan as Executed, freeze its steps, or complete its Todo; a formal execution still has to go through the Execute flow.
Tip: Content in the two modes syncs live. An annotation added in Visual mode appears as a
<mark>HTML tag in Markdown mode.
11.5.1 Plan / Report Code Display
The features in this section apply only to Plan and Report Markdown documents, and require Visual mode. Raw Markdown mode and code display in Chat are outside the scope of this section.
Inline code (backticks):
- No decorative backtick characters are shown.
- Rendered as a light-background pill in a monospace font, set apart from the body text.
Multi-line fenced code (`````):
- Rendered with a unified card frame (the toolbar and code area share one look), with a light background and border.
- This version does not provide syntax highlighting—only monochrome text on a background tint.
Code block toolbar (left to right):
| Control | Description |
|---|---|
| Collapse / expand | Only hides or shows the code body; the toolbar is always visible. Expanded by default. |
| Language label | Shows the language declared by the fence (e.g. sql); shows text if no language is specified. |
| Copy | Copies the block content to the clipboard. Shows Copied on success, Copy failed on failure. |
| Open in new SQL tab | Opens a new temp SQL tab (temp_tabN) with the block content and switches to it. The content is pasted as-is; for a non-SQL language block, verify it yourself before running. |
Collapse persistence: Within the same session, if you collapse a code block and switch to another tab and back, the collapse state is preserved (stored in the in-memory tab-ui-state, not written to the project file).
After the Agent edits content: If the block's inner text changes, the system treats it as a new code block and expands it by default.
Read-only state: When the Plan is Executing, or the document is locked, you can still use collapse, Copy, and Open in new SQL tab—this does not unlock body editing.
11.5.2 Report Table and Chart Tools
The features in this section apply only to Report-type Markdown documents, and require Visual mode (Raw Markdown mode has no table toolbar). Tables in a Plan document do not show the tools below.
Hover toolbar: When you move the pointer over a table in a Report, a set of icon buttons appears at the top right of the table (floating with the table, staying aligned as long content scrolls). The buttons have no text labels; hover over an icon for its description. Icon order (left to right): Bar chart → Line chart → Copy for Excel; if the table already has a bound chart, Remove chart is rightmost.
Chart area toolbar: After a chart is created, another toolbar appears at the top right of the chart block. Icon order (left to right): Show values → Bar chart → Line chart → Copy for Excel → Remove chart. Show values / Hide values toggles whether value labels are shown on the chart (off by default); the label text matches what is shown in the table cells (including %, thousands separators, etc.), while plotting still uses the parsed numeric values.
| Icon (hover description) | Purpose |
|---|---|
| Show values / Hide values | Toggles value labels on bar tops/points (chart toolbar only; off by default). Labels use the table cell text as-is. |
| Bar chart / Line chart | Builds a bar or line chart from the table data. Clicking opens the Column mapping dialog; after you confirm the column roles, the chart renders in ECharts right below the table. Line charts use straight segments (not smoothed curves). |
| Copy for Excel | Copies the current table as tab-separated text (TSV) with a UTF-8 BOM, for pasting into Microsoft Excel, Numbers, or Google Sheets. The header is the first row, followed by data rows; the content matches what is shown in Visual mode (including %, thousands separators, etc., as text—not auto-converted to numeric format). |
| Hide source table | When a chart has been created and the source table is still shown, hides the source table and keeps only the chart (this setting is persisted). |
| Remove chart | Removes the chart binding, from the chart area toolbar. |
Chart persistence: Each table's chart binding, hide_source_table, and show_data_labels settings are stored in the project sidecar file (01_report.viz.json, sharing the Report's name prefix) and are preserved when you close and reopen the Report. The app no longer provides a global "hide the source tables of all created charts at once" switch.
Steps to paste into Excel:
- In the Report tab, switch to Visual.
- Move the pointer over the target table and click the Copy for Excel icon.
- Select the target cells in Excel and press
Cmd/Ctrl + Vto paste.
When the source table is hidden: After hiding the source table, hovering over the table area no longer shows the floating toolbar; use Copy for Excel from the same icon set at the top right of the chart block instead (the data still comes from the chart's corresponding table).
Limits and notes:
- A table with merged cells (colspan / rowspan) can still be copied, but the system warns that the layout may not fully restore in Excel; check it yourself after pasting.
- This feature differs from Export in the SQL query results panel: Export saves query results to a file; Copy for Excel only copies the Markdown table in the Report editor to the clipboard.
- If writing to the clipboard fails (due to permissions or environment limits), an error prompt is shown.
- After switching the Dark / Light theme, the axis and label colors of an already-rendered chart may briefly mismatch the current theme; reopen the Report tab or toggle Show values again to restore the correct colors.
Tip: Even when a Report is read-only during Plan execution, you can still use Copy for Excel and Show values without modifying the Markdown body.
11.6 Plan State Machine
A Plan document has four states, managed via the buttons on the right of the toolbar (Executed and Stopped are shown as read-only status labels, not clickable buttons):
| State | Description |
|---|---|
| Planning | The freely editable initial state; if the project has no Plan file yet, the Agent can use add_plan in the Planning state to create a new Plan (update_plan applies only to an existing Plan file) |
| Executing | The AI is executing the analysis plan; the document becomes read-only |
| Executed | The AI has finished the analysis; the document is read-only, but annotations can still be added and edited. At this point the Agent status indicator returns to "Project Focused", and you can keep reviewing the report or start a new analysis plan |
| Stopped | The Plan was formally stopped before completion; it is read-only and retains the reason, partial outcome, Progress, and any linked replacement Plan |
One-click approve and start AI execution: When you finish reviewing the Plan in the Planning state, click the Approve & Execute button in the toolbar. The system automatically switches the Plan state to Executing and, at the same time, automatically sends a "start execution" system instruction to the AI Agent (shown in the conversation as Execute plan), driving the Agent to begin executing the analysis step by step according to the Plan—you do not need to switch to the AI panel and type a command manually. Even if the AI panel is collapsed, the system automatically expands it and begins executing.
Interrupt recovery (Continue): If the AI Agent is interrupted during Executing (e.g. session timeout, network interruption, closing and reopening the AI panel, or reloading the page), the Plan will not get stuck unable to proceed in the Executing state. In this case:
- The toolbar button changes from the "Executing..." spinner animation to a Continue button (left) and a dropdown button (right), forming a split button.
- The AI status indicator shows "Paused — click Continue on plan".
- Click the Continue button, and the system sends a "resume" system instruction different from Execute (shown in the conversation as Continue plan), explicitly asking the Agent to continue from the interruption based on the conversation history and existing cached results, rather than re-executing from scratch.
Tip: You do not need to return to the Planning state and start over. The Continue mechanism ensures the Plan's Executing state can be resumed safely, and the AI continues the remaining steps based on the completed cached results.
Stop and replan: If the data is unavailable, the metric definition or direction has changed, or this formal run should not continue, choose Stop & Replan… from an Executing Plan's actions; a Planning Plan offers Stop Plan…. The confirmation requires a reason and a summary of the partial outcome, and lets you choose whether to draft a replacement Plan now.
- The old Plan becomes Stopped, never masquerading as complete; its SQL Steps, Todo, and formal evidence stay available for review.
- A replacement Plan returns to Planning with an explicit link to the old Plan. Review it again before Approve & Execute.
- New Plan on a Stopped Plan lets you begin the replacement later; it never restores the old execution grant or resumes stopped work.
Note: In the Executing, Executed, and Stopped states, the Plan body cannot be edited manually. Use Stop & Replan for a changed plan, or annotations for a small revision to a completed deliverable.
Execution progress (Progress): When a Plan is Executing or Executed, a Progress icon button appears on the right of the toolbar. Clicking it shows an Execution Progress inline panel at the top of the workspace, with two tabs:
- Todo: the execution to-do list the Agent maintains (read-only), with Circle / CircleCheck icons marking pending and completed items.
- Steps: the query step list mirrored from the Query Step Ledger (read-only); click View SQL to inspect the corresponding SQL.
The bottom of the panel can be dragged to adjust its height (default ~280px, range ~140–560px); when you shrink the window the displayed height adapts automatically, and it restores your adjusted height when you enlarge it again.
When the Agent updates the Todo or adds a query step, the Progress button shows a red-dot hint; the dot disappears once you open the panel. Progress data is stored in the Plan's same-named sidecar file (*.progress.json), not in the Plan body.
Analysis Lineage: Choose Analysis Lineage from a Plan or Report toolbar to open the saved Plan → Markdown Report → HTML Report evidence chain. Select a node to inspect its status and evidence role, including a stopped Plan's reason and partial outcome, or open that artifact. Save any current edits first: lineage reflects saved artifacts only. A manual Report without a linked Plan says so explicitly; long histories can Load more, and missing or ambiguous links are never presented as complete.
11.7 Immersive Annotations
The annotation feature lets you mark opinions on specific paragraphs in a Markdown document; these comments are saved together with the file.
Add an annotation:
- In Visual mode, use the mouse to select (highlight) the text you want to annotate.
- When the selection is complete, an annotation icon button appears at the end of the text; click it to open the annotation popover.
- Write your comment in the popover's input box.
- Click the Enter button or press
Cmd/Ctrl + Enterto submit.
After submission, the annotated text is highlighted in semi-transparent yellow, and a corresponding annotation card appears on the right. The comment is written immediately to the same-named sidecar file (*.annotations.json), and an id-only <mark data-annotation-id="…"> tag is written into the Markdown body; Cmd/Ctrl + S saves both the mark-containing Markdown and the sidecar together.
Annotation card panel:
When annotations exist in a document, the view automatically splits into an editing area on the left and an annotation card panel on the right. You can drag the divider in the middle to adjust the width of each side.
Each card's vertical position aligns with the corresponding source text on the left, including annotations inside table cells (fixing an older issue where they could be misplaced to the top of the panel). When the document layout changes—e.g. collapsing or expanding a code block, or a change in a chart block's height—the card positions on the right re-align automatically.
Each card shows the comment's text content and offers the following actions:
| Action | Method |
|---|---|
| Edit | Double-click the card text, or click the pencil icon (Open state only) |
| Save edit | Press Cmd/Ctrl + Enter, or click anywhere outside the card (auto-save) |
| Delete | Click the ✕ button on the card (Open state only) |
| Archive | An annotation that is Resolved or Anchor outdated can be archived away (history is still kept in the sidecar dismissed[]) |
| Reopen | Restores a Resolved annotation to Open (keeping the Agent reply and history) |
| Re-anchor | When Anchor outdated, re-highlight the body text to restore the anchor (main window only) |
| View changes | A resolved annotation can show a Before/After comparison (Popover or, for long text, a Dialog) |
Bidirectional hover highlight:
- When you move the pointer over the annotated text, the corresponding card on the right highlights.
- When you move the pointer over a card on the right, the corresponding text highlight on the left deepens.
- Multiple cards (especially several Resolved ones) may overlap vertically; hovering over the source text on the left or a card on the right brings that card to the top with an opaque background, making it easier to read a stacked area.
This lets you quickly cross-reference the mapping between annotations and the source text.
Status terms: Anchor outdated on a main-window annotation card and orphaned in the Compare view refer to the same state—the body mark is lost or cannot be matched; the annotation metadata is still kept, and it needs a Re-anchor (main window only) or Archive.
Tip: Annotation highlights are driven jointly by the
data-annotation-idmark in the Markdown and the editor runtime map; the sidecar stores metadata such as comment, status, and history (it no longer writes the UTF-16anchor.span). If an old project still containsdata-commentinline marks, the annotation metadata is migrated to the sidecar automatically on first open; full retention of id-only body marks is still converging, so the migration may first write clean Markdown without the old inline tags.
Note: Overlapping (nested) annotations on an already-annotated text range are not supported. To change an annotation's range, delete the existing annotation first, then re-select and add a new one.
11.8 AI Annotation Context (read_plan / read_report)
When you use annotations in a Plan / Report and call the AI, the Agent obtains, via read_plan / read_report:
- the disk body
content(with id-only<mark data-annotation-id>tags) - the annotation sidecar
annotations(with open / resolved status, quote, history; the staleanchor.spanis ignored) open_annotation_countandannotation_summary(the Action Required task list)patch_guidance(resolve modes A/B and mark boundary rules)
The Resolve Comments flow uses the dedicated resolve_annotations tool, which atomically updates the sidecar and the Markdown body (preserving the marks) and refreshes the editor via sync_tab_content.
11.9 One-Click Resolve Comments
When a document has multiple annotations for the AI to handle together, you do not need to communicate them to the AI one by one—when annotations exist, a Resolve (N) button appears on the right of the toolbar (the Astroid icon + text, where N is the number of pending annotations; the same icon as the AI panel on the right), driving the AI in one click to read all the annotations and update the document.
How to use:
- In a Plan or Report Markdown tab, make sure you have added at least one annotation (the toolbar then shows a button like Resolve (1)).
- Click the Resolve (N) button (hover for the full description, e.g. "Resolve N comments with AI").
- The system automatically:
- Saves the current document (so the AI reads the latest version).
- Opens the AI panel (if collapsed).
- Sends an annotation-handling request to the AI, which updates the document in one pass based on the feedback in all annotations.
Button visibility and disabling:
| Situation | Behavior |
|---|---|
| The document has no annotations | The button is not shown |
| The Plan is Executing or Executed | The button is not shown (the body is locked) |
| The AI Agent is running | The button is shown but disabled; the hint is Agent is busy |
Tip: Resolve Comments has the same effect as manually saying "help me handle the annotations" in the AI conversation. The AI reads the sidecar annotation list via
read_plan/read_report, then writes back viaresolve_annotations. Once done, the document and sidecar update automatically; the Resolve (N) count comes from the number of open annotations in the sidecar.
Design note: For the Plan / Report, annotations, and the Execute boundary, see Data analysis workflow in the Agent era §§3–8.
11.10 Compare View
Compare view is a separate desktop sub-window for read-only side-by-side viewing of a Plan, Report, or persistent SQL tab, convenient for dual-monitor or wide-screen workflows: edit and execute in the main window, read alongside in the Compare view. The Compare view provides no Markdown toolbar, cannot run SQL, and cannot add or modify annotations.
11.10.1 Supported Content and Entry Points
| Content type | How to open the Compare view |
|---|---|
| Plan / Report (project Markdown) | In the sidebar Projects, right-click a file → Open in compare view; or right-click an already-open Plan / Report tab in the main window |
| Persistent SQL tab | In the sidebar workspace Persist list, right-click → Open in compare view; or right-click a persistent SQL tab in the main window |
| Archived documents | Plan / Report files in Archived docs work the same as normal files—right-click to open |
Not supported: temp (Temp) SQL tabs, cached tables, or right-click open of MCP data tables.
Submenu structure:
Open in compare view ▸
New compare view
─────────────────────
Compare view 1
Compare view 2
- New compare view: Creates a new comparison window (up to 2 instances: Compare view 1, Compare view 2).
- If both instances are open and unclosed, New compare view is disabled; you must close one OS window before you can create another.
- Each Compare view holds up to 5 compare tabs; when full, the corresponding items are disabled and it hints
This compare view is full (5 tabs max).
If the target document is already in that Compare view, the system activates that compare tab and brings the OS window to the foreground.
11.10.2 Window and Tab Bar
- A newly opened Compare view 1 appears by default on the right half of the main display; Compare view 2 is slightly offset within the right-half area to avoid fully overlapping view 1. You can drag the window to a second monitor.
- Window title format:
Compare view 1 — {current active tab title}. - Tab bar layout (left to right): ☰ hamburger menu → Refresh → horizontally scrollable compare tabs.
- The style matches the main window tab bar (height, font).
☰ hamburger menu:
- The first item, Refresh all, refreshes all compare tabs in that Compare view.
- Below it is the tab list: click to switch the active tab; the × on the right of each row removes it from the Compare view (without closing the main window tab).
Refresh (left icon button):
- Refreshes only the currently active compare tab (tooltip: Refresh active tab).
- The icon spins while in progress; on a fully successful refresh it may show
Compare view refreshed.
11.10.3 Read-Only Content and Annotations
| Type | Compare view behavior |
|---|---|
| Plan / Report | Visual read-only Markdown; no toolbar, no Progress panel |
| Persistent SQL | Top: read-only SQL (following the app's dark/light theme); bottom: read-only query result table (cannot Run). When there are results, a run in progress, or an error, you can drag the split between the SQL and result areas to adjust their heights |
| Annotations | Reads the sidecar (*.annotations.json); shows open / resolved / orphaned cards and highlights; the View changes Popover is available; cards cannot be edited, deleted, or Re-anchored; hover still drives linked highlighting |
To edit, Execute, Save, add annotations, or Resolve Comments, return to the corresponding tab in the main window.
11.10.4 Sync With the Main Window
- If a compare tab corresponds to the same tab still open in the main window (mirror), content changes in the main window (including unsaved edits) are reflected live in the Compare view.
- If you opened it directly from the sidebar and the main window has not yet opened the file, the Compare view uses the current disk content (standalone); once you open the same file in the main window afterward, it automatically upgrades to a mirror.
- Closing a tab in the main window does not close the Compare view; that compare tab keeps a content snapshot from the moment of closing and can still be viewed read-only.
Source status hint (Info icon):
An Info icon (not the dirty dot of the main TabBar) appears beside a compare tab title in the following cases:
| Situation | Tooltip (English) |
|---|---|
| The corresponding main-window tab has unsaved changes | Source tab has unsaved changes. |
| A newer version exists on disk (common after opening directly from the sidebar when the file has been updated by someone or something external) | A newer version is available on disk. Click Refresh to update. |
Click Refresh or Refresh all to reload from disk. If the main tab has unsaved changes, Refresh still updates the Compare view but does not overwrite the in-memory content of the main window, and may hint Main tab has unsaved changes. Compare view refreshed from disk.
11.10.5 Refresh Behavior Summary
| Binding | What Refresh does |
|---|---|
| Mirror + Plan / Report | Re-reads from the project file; syncs back to the main window when the main tab is not dirty |
| Mirror + persistent SQL | Re-reads the SQL from the workspace persist API; results follow the main tab's current results (and sync if the main tab is not dirty) |
| Standalone | Updates only the display inside the Compare view, without affecting the main window |
11.10.6 Lifecycle and Limits
| Event | Behavior |
|---|---|
| Close the main app window | All Compare views close together |
| Close a Compare view OS window | Only that instance; the main window and the other Compare view are unaffected |
| Close the last tab in a Compare view | Keeps the empty Compare view window (shows a placeholder) |
| Switch workspace | Closes all Compare views and clears the compare tab list |
| Close and reopen the same-numbered Compare view within the same session | Restores the last window position on a best-effort basis (restore across restart is not yet supported) |
Tip: Compare view is for "read to compare, edit in the main window"—ideal for comparing against the Plan while Executing, checking metrics while accepting a Report, or comparing two persistent SQL results. For an analyst workflow example, see Plan → Execute → Report.