Skip to content

fix(watcher): always exclude the app state directory - #337

Merged
gnacho merged 1 commit into
mainfrom
fix/337-watch-state-dir
Nov 12, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/337-watch-state-dir

Conversation

@gnacho

@gnacho gnacho commented Nov 12, 2026

Copy link
Copy Markdown
Owner

The watcher skipped .nextsync only when a configured pattern matched it, and the default patterns do not include it. Every journal write therefore re-armed the scheduler, and opening an account reads the journals, touches the state directory and starts another full cycle. That is the loop users see when they switch between accounts.

Skip the app state directory unconditionally, like the engine's own scan does, whatever the user patterns say. Adds a regression test with an empty matcher.

Closes #324

The watcher only skipped .nextsync when a pattern matched it, and the default
patterns do not include it, so every journal write re-armed the scheduler.
Presenting an account reads the journals, which touches the state directory and
starts another full cycle: the endless loop users see when they switch accounts.

Skip the state directory unconditionally, whatever the user patterns say.

Closes #324
@gnacho
gnacho merged commit ef5582c into main Nov 12, 2026
2 checks passed
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.

Sync loop: watcher forwards events inside excluded directories, own .nextsync/state.db retriggers sync

1 participant