grove

File tree and file viewer

Grove's left side carries two trees: the vault rail of tasks and notes (Task rail) and a files panel — a workspace-rooted file tree with a Files / Changes tab toggle. The center is the file viewer: one surface that renders source in Monaco, markdown in a WYSIWYG editor, and HTML/SVG/PDF in an in-tab browser view.

File tree

The tree is rooted at the workspace root, not per-task — it never swaps out from under you when you switch tasks. Instead, it paints per-task activity stripes: a file changed by task A shows A's color in the tree, so you can see at a glance which agents touched what, across all tasks at once.

  • The Changes tab switches the panel to the active task's changed-files list.
  • The tree lists the live working tree (.gitignore-aware) and refreshes on filesystem events — external edits from your shell or an agent propagate without a refresh button.

Interactions

  • Single click opens a file in a preview (replaceable) tab; double click pins it.
  • Rename, delete, and multi-select bulk delete — the tree is a real file manager, not a viewer.
  • New chat seeded with this path — start an agent conversation pointed at a file.
  • The crosshair button reveals the currently open file; name search is the Cmd+P palette (Search and palettes).

File viewer

The viewer picks a render mode from the filename:

  • Markdown → the Milkdown WYSIWYG editor, with a raw-source toggle. See Markdown editor.
  • HTML / SVG / PDF → an in-tab browser view.
  • Everything else → Monaco source.

The same editor carries LSP hover, go-to-definition, find-references, and semantic highlighting (LSP), per-line git blame, and outline + backlinks rails. When the open file is inside the active task's worktree, the task's changes paint over it as the diff overlay.

What's editable

Files are editable in place with auto-save — there is no read-only-source rule. The rule is simple: a file is editable if it sits under a task's worktree, or under the workspace root and isn't one of Grove's own internal files (the comment database, chat transcripts, task metadata). Those internals mount read-only so a stray edit can't corrupt your workspace state.

Splits and tabs

The editor area is a recursive tree of split panes, each with its own VS Code-style tab strip. Tabs can hold files, browser views, terminals, chats, or review diffs — and can be dragged between panes or split off into a new one.

Current limitations

  • Tree refresh is event-driven; a missed filesystem event needs a manual reveal or re-list.
  • If you and an agent edit the same markdown note concurrently, your local edit wins until the next file switch reloads from disk.

Where this lives in the code

  • Workspace file tree: src/components/FileTree.tsx.
  • Viewer and all render modes: src/components/FileViewer.tsx.
  • Editable rule: src/lib/ipc.ts (isEditableFilePath).
  • Splits and tabs: src/hooks/useEditorPanes.ts, src/components/SplitContainer.tsx, src/components/EditorTabs.tsx.