Skip to content

fix: stop continuous config reloads - #101

Open
rzssh wants to merge 1 commit into
webstonehq:mainfrom
rzssh:fix/config-watcher-lifetime
Open

fix: stop continuous config reloads#101
rzssh wants to merge 1 commit into
webstonehq:mainfrom
rzssh:fix/config-watcher-lifetime

Conversation

@rzssh

@rzssh rzssh commented Jul 19, 2026

Copy link
Copy Markdown

The filesystem watcher was dropped when spawn() returned, disconnecting its event channel before any config edits could be observed.

The main loop then treated that disconnection as a change event and reloaded config every poll. This reset transient UI state. For example, theme-picker navigation immediately jumped back, j/k would not move the cursor, while actual hot reload never worked.

This keeps the watcher alive in its worker thread, treats disconnection as no event, and stops the worker when its receiver closes. Regression tests cover real file changes and disconnected channels.

Tested with full test suite and manually verified that the issue with theme-picker navigation was resolved.

@rzssh rzssh changed the title fix: keep config watcher alive fix: stop continuous config reloads Jul 19, 2026
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