Skip to content

MD Kanban

The watcher tore itself down on every change

6 September 2026 Updated 10 September 2026 1 min read
screenshot of MD Kanban

Live update worked sometimes and missed others because every change tore all file watches down and rebuilt them. Watches are now steady and new folders subscribe on arrival.

The watcher worked, then it did not, then it did again. Intermittent misses with the sidebar timer frozen in between. The cause was the refresh design itself: every change re-walked the whole folder tree and tore all watches down to rebuild them.

The gap

Between closing the old watches and finishing the re-walk, nothing is watched. Under steady agent edits that gap opens constantly, so edits land in the blind window and never trigger a refresh. Overlapping re-walks made it worse. The five second poller should have covered the misses, which is why the frozen checked time was the second clue that something structural was off.

Steady watches

Watches are now created once and never torn down on change. A change only debounces and broadcasts. New subfolders get watched at the moment they appear, through rename events that stat the new path and subscribe when it is a directory. Concurrent setup calls share one in-flight run instead of interleaving with each other. The list-projects path that boots all watches is now cheap and idempotent, which also removes a startup hang risk.

Where it stands

Edits refresh consistently under burst load in testing, and the debounce still collapses a burst into one rescan. The fix ships in the current dmg. If a refresh ever stalls again, the sidebar checked time is the tell: frozen means the loop stopped completing, lagging means events are missed and the poller is covering.