Reserve nodes/specs/styles/labelAt/labels at reset() while the heap still
has a large contiguous block. A doubling realloc mid-build needs old+new
buffers live at once and throws bad_alloc on the heap the build itself has
fragmented; the styles vector was the one tripping the firmware's global
new-handler into a reset with ~10 populated cards.
UNVALIDATED: reproduced and fixed in the emulator only. Hardware has ~30KB
less free (NimBLE DMA buffers), so the reserves at reset() may still be
marginal there -- not yet tested on the board.
Drag, flick and tap-vs-scroll now live on the scrollX/scrollY flag in
ui.lua, so any scroll box pans with no app code. tree.hit returns the
deepest node by geometry and dispatch bubbles to the nearest handler,
dropping the now-unused CAPTURE flag. keyboard moves in as ui.keyboard,
and embed compiles nested lib dirs to dotted module names.
The controller and the WiFi driver each need a large aggregate allocation,
which a live app sitting on garbage can deny - that is why a failed connect
often succeeded on retry. Both bindings now collect before initializing, and
the tree reserves its node and spec capacity so a build does not reallocate
into a tight heap.