Summary
The fs scope glob matching requires a literal leading dot on unix, so the $HOME/** scope entries can never match ~/.docsreader. The registry watch therefore throws PathForbidden at setup on every macOS install; the error is swallowed as a debug log whose comment assumes "directory does not exist yet" is the only failure mode. Net effect: workspaces created by agents while the app is open never appear live; they only show up when the window loses and regains focus (the reconcile fallback). The same scope rule silently breaks watching and reading for any workspace under a dot directory or outside $HOME.
Reproduction (release build of f485396, macOS, isolated $HOME)
- With the app open and frontmost, write a valid entry into
~/.docsreader/workspaces.json (exact shape the MCP sidecar writes) for a workspace at ~/agent-ws.
- Wait: the workspace switcher never shows
agent-ws (first screenshot, taken 6 s after the write; it stayed absent for minutes). A working watch would surface it in about 1 s (200 ms watch delay + 600 ms debounce).
- Force a real window focus event (defocus, refocus):
agent-ws appears immediately (second screenshot, switcher now shows "welcome docs-ws agen[t-ws]").
Root cause
- Tauri fs scope:
require_literal_leading_dot defaults to true on unix (tauri-plugin-fs-2.5.1/src/commands.rs:1559, tauri-2.11.2/src/scope/fs.rs:198-208), so $HOME/** (src-tauri/capabilities/default.json:82-94) cannot match ~/.docsreader. No override in tauri.conf.json.
- The failed
watch(registryDir) is logged at debug level and never retried: src/hooks/useLibrary.ts:466-470. The focus fallback at useLibrary.ts:473 is the only remaining sync channel.
- Related asymmetries: the Rust scan command is not scope checked (
src-tauri/src/tauri_api/mod.rs:28-34) while frontend watch/readTextFile are, so a workspace under a dot path or outside $HOME (MCP init_workspace accepts any absolute path, src-tauri/mcp/src/server/workspace_tools.rs:104-113) renders a browsable tree that can neither sync nor open files. The workspace watch failure is equally silent and never retried (useLibrary.ts:424-426).
Upstream reference for watch scope behavior: tauri-apps/plugins-workspace#2362.
Proposed fix
- Add explicit scope entries for
$HOME/.docsreader and $HOME/.docsreader/** (watch + read).
- Surface watch failures to the user and retry instead of debug-logging them once.
- Decide a policy for dot-path and out-of-home workspaces: either scope them explicitly or reject them at
init_workspace, so a workspace is fully usable or clearly refused.
Screenshots
Registry entry written while the app is open and frontmost, workspace absent; appears only after a real focus cycle:

Summary
The fs scope glob matching requires a literal leading dot on unix, so the
$HOME/**scope entries can never match~/.docsreader. The registry watch therefore throws PathForbidden at setup on every macOS install; the error is swallowed as a debug log whose comment assumes "directory does not exist yet" is the only failure mode. Net effect: workspaces created by agents while the app is open never appear live; they only show up when the window loses and regains focus (the reconcile fallback). The same scope rule silently breaks watching and reading for any workspace under a dot directory or outside$HOME.Reproduction (release build of f485396, macOS, isolated
$HOME)~/.docsreader/workspaces.json(exact shape the MCP sidecar writes) for a workspace at~/agent-ws.agent-ws(first screenshot, taken 6 s after the write; it stayed absent for minutes). A working watch would surface it in about 1 s (200 ms watch delay + 600 ms debounce).agent-wsappears immediately (second screenshot, switcher now shows "welcome docs-ws agen[t-ws]").Root cause
require_literal_leading_dotdefaults to true on unix (tauri-plugin-fs-2.5.1/src/commands.rs:1559,tauri-2.11.2/src/scope/fs.rs:198-208), so$HOME/**(src-tauri/capabilities/default.json:82-94) cannot match~/.docsreader. No override intauri.conf.json.watch(registryDir)is logged at debug level and never retried:src/hooks/useLibrary.ts:466-470. The focus fallback atuseLibrary.ts:473is the only remaining sync channel.src-tauri/src/tauri_api/mod.rs:28-34) while frontendwatch/readTextFileare, so a workspace under a dot path or outside$HOME(MCPinit_workspaceaccepts any absolute path,src-tauri/mcp/src/server/workspace_tools.rs:104-113) renders a browsable tree that can neither sync nor open files. The workspace watch failure is equally silent and never retried (useLibrary.ts:424-426).Upstream reference for watch scope behavior: tauri-apps/plugins-workspace#2362.
Proposed fix
$HOME/.docsreaderand$HOME/.docsreader/**(watch + read).init_workspace, so a workspace is fully usable or clearly refused.Screenshots
Registry entry written while the app is open and frontmost, workspace absent; appears only after a real focus cycle: