Skip to content

ability to symlink a vault#380

Open
arkml wants to merge 1 commit intodevfrom
add_vault
Open

ability to symlink a vault#380
arkml wants to merge 1 commit intodevfrom
add_vault

Conversation

@arkml
Copy link
Contributor

@arkml arkml commented Feb 17, 2026

Feature: Link external “knowledge folders” into Rowboat
Users can now add an external folder (e.g., an Obsidian vault) into Knowledge. It is mounted as a symlink at:

~/.rowboat/knowledge/
This mount:

appears in the Knowledge tree
is searchable by workspace-grep
is included in the knowledge graph index
remains read/write (deleting files inside it affects the real folder)
can be “unlinked” from the UI without touching the external data
Core config + backend plumbing
New config file
knowledge_vaults.ts

Stores metadata in knowledge_vaults.json
Tracks: name, path, mountPath, readOnly, addedAt
Validates names and prevents collisions with reserved folder names
Handles symlink creation and removal
Guards against duplicates
Config auto‑init
initConfigs.ts

Ensures vault config file exists at startup via ensureKnowledgeVaultsConfig()
IPC + main process
New IPC channels
ipc.ts

knowledge:listVaults
knowledge:pickVaultDirectory
knowledge:addVault
knowledge:removeVault
Handler implementation
ipc.ts

Folder picker via Electron dialog.showOpenDialog
knowledge:addVault creates symlink + persists config
knowledge:removeVault unlinks + removes config entry
Workspace tools now follow mounted folders safely
Workspace API
workspace.ts

stat now resolves symlink targets, preserving isSymlink
readFile returns stats based on target file
readdir:
includes symlinked folders only if they are known mounts
recurses into those symlinks
prevents symlink cycles using realpath tracking
Helper to validate symlink mounts from config
Search tools
builtin-tools.ts

workspace-grep now follows symlinks under knowledge/
uses rg --follow
fallback uses grep -R
workspace-glob uses follow: true under knowledge/
Watcher
watcher.ts

followSymlinks: true so file changes in linked folders appear in the app
Knowledge graph integration
knowledge_index.ts

Recognizes:
knowledge//People
knowledge//Projects
knowledge//Organizations
knowledge//Topics
as valid category roots
So graph index and entity resolution work for mounted folders
build_graph.ts

Added explicit instruction: new notes must be created only in base knowledge folders, not mounted folders
Updates to existing notes (including in linked folders) are still allowed
UI: Add Knowledge Folder
Quick action
sidebar-content.tsx

Adds “Add Knowledge Folder” action in Knowledge toolbar
Uses circled plus icon (PlusCircle)
Dialog
App.tsx

Open folder picker → show dialog to name the folder
Creates symlink via IPC
Toasts updated to “knowledge folder” copy
Wording changed per your request (“Add Knowledge Folder”, “Link an existing folder…”)
UI: Unlink instead of delete for mounted folders
sidebar-content.tsx

On right‑click:
If folder is a symlink mount, action becomes “Unlink Knowledge Folder”
Otherwise it stays “Delete”
Prevents renaming of linked folders (to avoid breaking config)
Uses workspace:stat lazily to detect symlink
Unlink calls IPC to remove mount + config
Bugfix
workspace.ts

Fixed TS type error in readFile stats by explicitly typing stat as workspace.Stat
Other notable changes
Updated UI text everywhere to avoid the word “vault”
Updated toast messages to match new copy
Resolved rebase conflict in App.tsx after upstream changes (new tab support, etc.)

@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rowboat Ready Ready Preview, Comment Feb 19, 2026 10:13am

Request Review

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