Changelog

# Changelog: brookesia_jsonui_aot

All notable changes to the JSON UI AOT runtime support component are documented
here. The component version follows `idf_component.yml`.

## 0.8.0 (JSON-GUI AOT v1.1, 2026-11-04)

First consolidated release of the JSON UI AOT path: build-time JSON → native C
with zero JSON runtime in the product firmware.

### Codegen contract (tools/jsonui_codegen)

- Single-screen and multi-screen documents compile to `<screen>_page_create()`,
  `<app>_init(asset_path)` and a ScreenManager descriptor table.
- 18 upstream view types covered: screen/container/label/button/image/frameView/
  textInput/slider/switch/checkbox/dropdown/progressBar/spinner/arc/line/table/
  canvas/keyboard, plus viewTemplate/interactionTemplate expansion.
- `rules.json` is the single source for style/common/layout/placement/event/
  animation/effect/view mappings; unknown properties fail fast (E040/E008).
- Multi-target output (`--target NAME=ENV`) for orientations and languages;
  per-board environments selected at example build time.
- AOT annotations (embedded `aot` field or `<doc>.aot.json` sidecars):
  - `prewarm` — descriptor prewarm flag
  - `stage` — staged page creation (begin/step/finish) with a ScreenManager
    lv_timer slicing root children
  - `preload` — eager/lazy/ondemand image+font tiers with runtime lazy loader
    hooks and generated `<doc>_resource_load()`
  - `i18n` — build-time text table, `<doc>_set_language()` and
    `jsonui_i18n_bind/refresh`
- Keyboard custom layouts, `keyStyles`/`keyStyleRefs`, `allowedModes`,
  `iconSize` and image keys (icon drawn centered, text fallback when missing).
- Resources: `imageSet` PNG → `lv_image_dsc_t`, `fontSet` with multi-size file
  fonts, constants/themes → static `lv_style_t`; `frameViewProps` with
  `autoRegisterOutput=true`.

### Runtime support (gui/brookesia_jsonui_aot)

- View registry with page-scoped lifetime and allocation tracking.
- Event bindings with `require_valid_press` semantics; actions that destroy
  their own page are safe (registry liveness re-validation after dispatch).
- FrameView frame sink (`jsonui_frame_view_apply/push/set_sink`) with shadow
  buffer, dirty-rect copies and a `set_thread_gate()` for producer threads;
  delete-time unsubscribe is race-free against in-flight callbacks.
- `ScreenManager` (C++): attach/detach, staged creation timers, prewarm,
  owner/layer-aware screen registry shared with system apps.
- Custom keyboard engine: text entry, mode switching, OK/Cancel, backspace,
  cursor move, space; recolored image keys.

### Build forms

- B-only (`RUNTIME_NONE`, no system_core, no parser/Document/Runtime symbols —
  `nm` asserted in CI), mixed (JSON AOT + native pages in one ScreenManager)
  and A-only (runtime kept for other apps) forms; `jsonui_aot_only_*` link
  checks in the host gate.

### Verification

- Host gates: 33 codegen unit tests, runtime-vs-AOT golden (object tree +
  framebuffer) on hello/form/list/widgets/mixed, `nm` runtime-symbol bans,
  screen registry / screen manager / interaction / live preview / frame view /
  keyboard image tests — `tools/golden/run_all_gates.py`.
- Device: ESP32-P4X-Function-EV (1024×600) and ESP32-S31-Korvo1 (800×480),
  including the FrameView display-output demo end to end.

### Known v1 boundaries

- `frameView autoRegisterOutput=false` fails fast (E011).
- Images: non-interlaced 8-bit PNG only (JPEG and interlaced PNG fail fast).
- File fonts register by basename from the asset root.
- `step` interaction semantics are parsed but not applied (kept aligned with
  the A runtime which does not apply them either).
- Runtime-side golden comparison for PNG-bearing samples requires the Display
  service; covered by unit tests and device runs instead.
- Browser preview (wasm + Monaco) is a separate follow-up track, not part of
  this release.