Commit graph

5 commits

Author SHA1 Message Date
Darkatse
6cc5deb727 fix(dev): use native file watcher for reloads (#229) 2026-09-06 00:59:33 -04:00
gaogao-gao
85cb559aef fix(dev): stop fs.watch last-access noise from looping page reloads
On Windows hosts with NTFS last-access updates enabled (fsutil behavior
DisableLastAccess 0/2), every read of a file under src/ updates its
last-access time, and recursive fs.watch reports that as a change event.
The dev server then reloaded the page for any non-bundled path: fonts,
styles, images and other static assets fetched by the page itself.
Each reload fetched those assets again, producing a reload -> fetch ->
last-access -> reload feedback loop where any UI interaction kept
refreshing the page.

Two guards in handleFrontendChange:

- Directory-level change events arrive with a null filename and cannot
  identify a reloadable file; ignore them instead of reloading.
- A last-access update never changes mtime, so a change event whose
  mtime is far in the past is read noise, not an edit. Only reload for
  files written within the last 30 seconds. Trade-off: writers that
  deliberately preserve mtime no longer trigger a reload.

Verified on Windows (DisableLastAccess=2): two rounds of fetching 12
static assets produced zero reload events (previously 8 in one round),
while a real file write still triggered exactly one reload.
2026-09-06 04:08:38 +01:00
Darkatse
94f6209c34 refactor(frontend): establish React migration foundation 2026-08-20 21:21:47 -04:00
Darkatse
8aa01b3372 fix(dev): rebind service workers across app restarts 2026-07-24 02:28:50 -04:00
Darkatse
d1a7ddc860 fix(dev): keep frontend changes from invalidating Rust builds 2026-06-24 22:21:36 -04:00