Files
airship/packages
Nayan 94b623cb69 feat(overlay): boot the overlay once, and take all of it back down
There was no teardown at all, which is survivable exactly as long as an overlay
is never rebuilt in a page — and `?__airship=inline` rebuilds one on every HMR
cycle. Each cycle left a second full set of capture-phase key bindings, every
one calling `preventDefault` for a `when()` that closed over a dead panel. The
symptom is not a crash; it is undo quietly doing nothing, and the more times you
save the file the worse it gets.

`destroy()` now releases what `mount` took. The socket goes with it, because its
reconnect loop is self-sustaining and closing the socket is what causes it to
come back. So do the two debounces, the dnd monitor listeners, and the frame
documents the key registry was observing — those came off in practice only
because the stage happens to be torn down first, an ordering nothing stated.

None of which ran. The boot guard was a `window` flag, and a `window` flag
survives a bundle swap for exactly the same reason the teardown hook does, so
the incoming bundle was turned away one line before the hook it was published
for. It is a module flag now, which separates the two cases for free — a second
`boot()` re-enters this module, a replaced bundle gets a fresh one — and the
shell path calls the hook at all, which it never did.

The bar gets a button for the command palette. It had `⌘K` and a row in the
shortcuts sheet, which made the one surface listing everything the editor can do
reachable only by already knowing about it.

Stray modifiers no longer fire commands. A chord reads Command on a Mac and
Control elsewhere, and nothing rejected the other one — so on a Mac `⌃←` matched
the bare arrow, nudged the selection and swallowed the Mission Control gesture,
`⌃⌫` deleted it and `⌃F` opened the device picker. Nothing caught it because the
test fixture set both modifiers at once, which is a keystroke no keyboard sends.
2026-08-16 13:05:37 +05:30
..