Skip to content

fix: workspace sync gaps and stuck-loading tabs - #24

Merged
anbturki merged 3 commits into
mainfrom
fix/sync-and-loading
Jul 18, 2026
Merged

fix: workspace sync gaps and stuck-loading tabs#24
anbturki merged 3 commits into
mainfrom
fix/sync-and-loading

Conversation

@anbturki

Copy link
Copy Markdown
Owner

Resolves the reported "files don't sync" and "stuck on Loading" feedback. Every bug was reproduced live against a release build before fixing, and every fix was re-verified live afterward (screenshots in the linked issues).

Changes

Workspace sync (useLibrary)

  • Rescan the active root on launch, on workspace switch, and on window focus: stale-while-revalidate over the scan cache, so files changed while the app was closed or the workspace was inactive appear without a manual refresh.
  • Modify events now schedule a rescan (in-place writes refresh titles, tags, and search); the watcher's other/any rescan sentinels (FSEvents overflow) trigger a rescan instead of being dropped.
  • Watches attach with bounded retries and log a warning on failure instead of dying silently.
  • fs scope gains explicit $HOME/.docsreader entries: the unix scope glob requires a literal leading dot, so $HOME/** never matched the registry directory and its watch failed on every launch.

Scanner and writes (core)

  • validate_phase rejects phase names that collide with the scanner's pruned directories (build, dist, target, venv), reading the same SKIP_DIRS list the scanner uses.
  • The scanner follows symlinks (walkdir loop detection verified) and counts walker errors, unreadable files, and oversize files into a new skipped field on ScanResult, surfaced in the explorer footer.

Tabs (useTabs)

  • File loads race a 15 s timeout into a friendly, retryable error instead of an eternal spinner; a per-tab load sequence guards timeout/completion ordering; re-activating an errored tab retries the load.

Validation

  • 126 frontend tests (13 new), 105 Rust tests (7 new), tsc --noEmit clean, release build clean.
  • Live end-to-end verification in an isolated HOME: launch catch-up, live registry sync without focus, symlink visibility, in-place title refresh, and the read-timeout error were all confirmed against the rebuilt binary.

Fixes #18
Fixes #19
Fixes #20
Fixes #21
Fixes #22
Fixes #23

anbturki added 3 commits July 18, 2026 15:07
Rescan the active root on launch, workspace switch, and window focus
(stale-while-revalidate over the scan cache), so files changed while
the app was closed or a workspace was inactive appear without a manual
refresh. Fold modify events into the rescan path so in-place edits
refresh titles, tags, and search, and treat the watcher's other/any
rescan sentinels as rescan triggers instead of dropping them.

Attach fs watches with bounded retries and a warning on failure, and
add explicit fs scope entries for the registry directory: the unix
scope glob requires a literal leading dot, so $HOME/** never matched
~/.docsreader and the registry watch failed silently on every launch.

Fixes #18, fixes #19, fixes #22
…d files

Reject phase names that collide with the scanner's pruned directory
names (build, dist, target, venv): docs written there succeeded via
MCP but could never appear in the GUI. Validation reads the same
SKIP_DIRS list the scanner uses, so the two cannot drift.

Follow symlinks when scanning (walkdir detects loops and reports them
as errors), and count walker errors, unreadable files, and oversize
files into a new skipped field on ScanResult instead of dropping them
silently. The explorer footer shows the skipped count when nonzero.

Fixes #20, fixes #21
A read that blocks at the OS level (cloud placeholder, unreachable
mount, special file) never settles, pinning the tab on Loading
forever. Race each load against a 15s timeout that surfaces a
retryable error, guard timeout and completion ordering with a per-tab
load sequence, and make re-activating an errored tab retry the load.

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