You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Events are silently dropped after a bun --hot reload #37
Run an app with bun --hot, save any source file so React remounts, then click anything. No event handler fires.
Claude tells me:
createRenderer() constructs the native renderer once with a closure that calls handleGpuixEvent, and the renderer survives reloads via the globalThis render-host slot. But containersByRenderer in reconciler/event-registry.js is a module-level WeakMap, and bun --hot re-evaluates the whole module graph on reload.
So after a reload:
the remounted root registers its handlers via attachRoot in the new module instance's WeakMap,
the old root's unmount empties the old instance's WeakMap,
the native event closure still dispatches into the old instance → containersByRenderer.get(renderer) returns undefined → every event returns silently.
And thank you for the quick fixes to the other issues I reported!
Activity
Keep events live across Bun hot reloads
release: @gpuix/[email protected] and @gpuix/[email protected]
Count elements built and StyleDesc and Inherited clones per frame, ex…
Build host elements through a borrowed slot instead of moving the 1.6…
One Inherited clone per built element, and borrow instead of clone fo…
Box the display:contents overlay so taking it is not a 9 KB copy, bor…
Decide per frame which subtrees a retained replay would reuse, count …
Measure the retainable share per page: exclusions can be lifted in th…
Text, images and lists keep their layout nodes and measures across fr…
Widen retain eligibility (#37): overflow-hidden, label and aria links…
Frames skip what the sources say did not change and hand it to gpui a…
Retained replay through the full pipeline (#37 step 5b): a page of ca…
Skipping is measured and guarded (#37 step 5b): table rows are not ro…
A bounds read on a dirty window skips the retained subtrees the last …
Frames that find nothing to skip stop being recorded for a while (#37 …
Scroll frames cost what they cost without retention (#37 follow-up): …