Skip to content

Fix: config hot-reload watcher dropped immediately after spawn() - #114

Open
aquinoonell wants to merge 2 commits into
webstonehq:mainfrom
aquinoonell:fix-navigation-in-theme-modal
Open

Fix: config hot-reload watcher dropped immediately after spawn()#114
aquinoonell wants to merge 2 commits into
webstonehq:mainfrom
aquinoonell:fix-navigation-in-theme-modal

Conversation

@aquinoonell

@aquinoonell aquinoonell commented Jul 27, 2026

Copy link
Copy Markdown

Closes #113

Fix: move watcher into the background thread (let _watcher = watcher;)
so its lifetime matches the thread's, instead of ending the moment spawn()
returns.

Testing: confirmed via eprintln! instrumentation in reload_config and
pick_theme_step that reload_config was firing continuously at startup
with no user interaction, and that pick_theme_step's cur index was
always reading back 0. After the fix, reload_config only fires on an
actual edit to config.toml, and the theme picker preview steps correctly
through j/k.

@mikenikles

@aquinoonell

Copy link
Copy Markdown
Author

I found that there's an open issue as well as a pull request fix: stop continuous config reloads - #101 who does the same thing as mines, although mines is more targeted. I found the bug after using the app.

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