diff options
| author | Adam Malczewski <[email protected]> | 2026-06-13 23:48:14 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-13 23:48:14 +0900 |
| commit | c4939d736ff55fa48cff31a26333f4922430c3d8 (patch) | |
| tree | 66ce055e9b88e1c519bd55038faec7220d04a726 /packages/kernel/src/kernel.cpp | |
| parent | 81b40bd6ee8dc2c151f318352a7f68cb7525ef3a (diff) | |
| download | unbox-c4939d736ff55fa48cff31a26333f4922430c3d8.tar.gz unbox-c4939d736ff55fa48cff31a26333f4922430c3d8.zip | |
kernel: fix asset hot-reload regression (watch the whole asset dir, not the .rml basename)
The watch_file refactor (35e5d32) moved the substrate's UI-asset hot-reload onto
the shared FileWatcher but armed a BASENAME watch on the document's .rml file only.
The dock's styling lives in a separately-<link>ed dock.rcss, so editing it (the
common case) never matched the watch — asset hot-reload silently stopped working on
the real seat (no "dev hot-reload ON" line, no reload on save), while config
watching kept working. The ui_reload_surface() seam test passed because it bypassed
the real inotify->reload path.
Fix: FileWatcher::add_dir watches the document's whole DIRECTORY (so any .rml/.rcss
in it triggers the surface reload); the substrate uses it and restores the
"dev hot-reload ON (inotify watching asset dir '...')" log. Added an END-TO-END
test mirroring the dock (a doc that <link>s a separate .rcss, real inotify event,
wl_event_loop pumped, assert the document actually reloaded) — fails on the buggy
code, passes now; no more relying on the seam.
Real-seat verified: editing dock.rcss now reloads the live dock (border-radius +
background-color changes apply on save). kernel 59 cases/260 assertions green on
build + build-asan, no new suppressions. Edits confined to packages/kernel/.
Diffstat (limited to 'packages/kernel/src/kernel.cpp')
0 files changed, 0 insertions, 0 deletions
