Skip to content

feat(x): folders as workspaces — linked folders, list view, live workspace chats - #799

Open
arkml wants to merge 3 commits into
mainfrom
workspace2
Open

feat(x): folders as workspaces — linked folders, list view, live workspace chats#799
arkml wants to merge 3 commits into
mainfrom
workspace2

Conversation

@arkml

@arkml arkml commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Three changes to the Workspaces section, verified end-to-end by driving the app with Playwright:

1. Any folder can be added as a workspace (4c461259)

  • Linked folders: "Add workspace" now offers New workspace (existing behavior) or Add existing folder… — pick any folder on disk and browse/edit it in Rowboat. Nothing is copied or symlinked; a registry at config/workspace-folders.json records {id, name, path}.
  • New @folder/<id>/… path space in resolveWorkspacePath/absToRelPosix, containment-checked against the linked root — every existing workspace:* IPC (readdir/read/write/rename/remove/reveal) works on linked folders unchanged.
  • Deletes inside a linked folder go to the OS trash (main registers shell.trashItem into core) — WorkDir/.trash would fail cross-volume and leak files into Rowboat's workdir.
  • Deliberately not watched by chokidar (a linked repo's node_modules would EMFILE — see watcher.ts); the view refreshes on navigation/focus + manual Refresh. Linked folders also stay out of the knowledge index/graph, wiki links, and version history by construction.
  • Rename edits the Rowboat label only; "Remove from Rowboat" unlinks without touching disk.

2. Workspace browsing is a list view (408c084b)

  • Both the workspaces root and folder contents render as a list: Name · Location/Kind · Last updated (6h ago, Yesterday, Jul 20; exact timestamp on hover).
  • Column headers sort (name A→Z, time newest-first on first click), choice persisted in localStorage. Folders group first only when sorting by name.
  • A workspace's time is the newest mtime anywhere inside it (deep walk of the already-loaded tree); linked roots show their own mtime since their contents load lazily.

3. Workspace chats work again, and live (ab78c975)

  • Fix: runs:listByWorkDir still scanned legacy runs/*.jsonl, which the boot migration moves to runs-archive/ — so the Chats panel was always empty. It now filters the in-memory session index against the config/workdir-<id>.json sidecars (new runtime/sessions/by-workdir.ts); dead legacy implementation removed.
  • Sessions the index failed to load (empty timestamps) are filtered out — one corrupt session would previously fail schema validation for the whole response and blank the panel.
  • The panel updates live: debounced refetch on sessions:events (create/retitle/delete) and on a new WORKSPACE_CHATS_CHANGED renderer event fired when a chat's work directory is set — covering the no-navigation case where the workspace is open in the middle pane while the chat sits in the right pane.

Verification

Driven in the real app (isolated ROWBOAT_WORKDIR, real session fixtures): add/browse/edit/rename/delete in linked folders incl. path-traversal + boundary rejections; sort flips and persistence; chats panel populated from a real migrated session, nested-dir matching, live appearance of new/retitled/moved-in chats. npm run typecheck clean; lint unchanged from main (same 11 pre-existing errors).

Known follow-ups

  • Chats panel could open by default when entering a workspace.
  • Recent-work-dir picker shows only folder basenames — picking a same-named folder from another Rowboat workdir is indistinguishable (bit us once already).
  • Pre-existing: rename input doesn't take keyboard focus from the context menu (present before this branch).
  • The larger chat-first workspace redesign (default workspace, switcher, per-tab binding) is specced separately and builds on this.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant