Skip to content

feat(mini-lynx): close the production gaps — errors, event transport, global props - #18

Merged
amritk merged 1 commit into
mainfrom
claude/mini-lynx-prod-gaps-aughfr
Jul 28, 2026
Merged

feat(mini-lynx): close the production gaps — errors, event transport, global props#18
amritk merged 1 commit into
mainfrom
claude/mini-lynx-prod-gaps-aughfr

Conversation

@amritk

@amritk amritk commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Three things stood between a green suite and an app shipping this, and they
share a shape: each is a place where the runtime is the outermost JavaScript
frame, with native code or the job queue above it and no caller to hand a
problem to.

  • setErrorHandler, and guards at every boundary the engine calls in on. A
    handler throwing inside the engine's dispatch and a commit throwing on the
    promise job queue were both undefined behaviour with nothing listening.
    Errors are now caught, tagged with their source, and reported; handlers on
    one (type, name) are isolated from each other, a failed commit no longer
    wedges the scheduler, and /recycle answers the engine's own -1 rather than
    unwinding into list layout mid-scroll.
  • setEventTransport plus /bridge. The worklet round trip is the one engine
    assumption here that hardware could still disprove, and the failure would be
    silent and total. The listener form is now a seam with the worklet transport
    as its default, and the string-handler fallback ships with the app owning the
    wire back from the background thread.
  • globalProps(). The engine calls exactly one updateGlobalProps, so an app
    cannot own that slot and still let a component react to a change. renderPage
    claims it and turns it into a signal.

renderPage also emits firstScreen when the root component throws: it is the
platform's cue to stop waiting, not a report of success.

Core budget moves 5064 -> 5414 gzipped to cover all of it.

Co-Authored-By: Claude Opus 5 [email protected]

📦 Bundle-size delta vs main (55e928bdd123bc)

Package Entry main PR Δ
mini core (.) 3,156 B 3,156 B +0 B (+0.0%) ⚪
mini flow 4,083 B 4,083 B +0 B (+0.0%) ⚪
mini router 4,158 B 4,158 B +0 B (+0.0%) ⚪
mini forms 4,259 B 4,259 B +0 B (+0.0%) ⚪
mini query 1,988 B 1,988 B +0 B (+0.0%) ⚪
mini-lynx core (.) 5,459 B 5,459 B +0 B (+0.0%) ⚪
mini-lynx flow 4,850 B 4,850 B +0 B (+0.0%) ⚪
mini-lynx router 5,856 B 5,856 B +0 B (+0.0%) ⚪
mini-lynx forms 5,272 B 5,272 B +0 B (+0.0%) ⚪
mini-lynx query 1,990 B 1,990 B +0 B (+0.0%) ⚪
mini-lynx testing 2,451 B 2,451 B +0 B (+0.0%) ⚪

Gzipped bytes of each bundled entry (esbuild, minified, browser/es2022, optional peer deps external). Bundling is deterministic, so unlike a timed benchmark these numbers carry no noise and every Δ is exact. ⚪ within ±0.5% · 🟢 smaller · 🔴 larger. Each package's core (.) must stay flat as subpath features land — that is the whole charter, and src/core-size-budget.test.ts holds the absolute ceiling.

… global props

Three things stood between a green suite and an app shipping this, and they
share a shape: each is a place where the runtime is the outermost JavaScript
frame, with native code or the job queue above it and no caller to hand a
problem to.

- setErrorHandler, and guards at every boundary the engine calls in on. A
  handler throwing inside the engine's dispatch and a commit throwing on the
  promise job queue were both undefined behaviour with nothing listening.
  Errors are now caught, tagged with their source, and reported; handlers on
  one (type, name) are isolated from each other, a failed commit no longer
  wedges the scheduler, and /recycle answers the engine's own -1 rather than
  unwinding into list layout mid-scroll.
- setEventTransport plus /bridge. The worklet round trip is the one engine
  assumption here that hardware could still disprove, and the failure would be
  silent and total. The listener form is now a seam with the worklet transport
  as its default, and the string-handler fallback ships with the app owning the
  wire back from the background thread.
- globalProps(). The engine calls exactly one updateGlobalProps, so an app
  cannot own that slot and still let a component react to a change. renderPage
  claims it and turns it into a signal.

renderPage also emits firstScreen when the root component throws: it is the
platform's cue to stop waiting, not a report of success.

Core budget moves 5064 -> 5414 gzipped to cover all of it.

Co-Authored-By: Claude Opus 5 <[email protected]>
@amritk
amritk merged commit 55e928b into main Jul 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants