Skip to content

Refactor: Stabilize Tab5 app execution, hardware ownership and UI - #19

Closed
aero-oli wants to merge 9 commits into
m5stack:mainfrom
aero-oli:codex/stabilize-tab5-20261017
Closed

aero-oli wants to merge 9 commits into
m5stack:mainfrom
aero-oli:codex/stabilize-tab5-20261017

Conversation

@aero-oli

Copy link
Copy Markdown

The demo previously mixed app lifecycle changes with LVGL work, performed hardware reads on the UI path, and could report failed hardware operations as successful states. This change preserves the existing modernization and makes the console a tested base for further app development.

  • Register standalone apps behind a shared shell and catalog; keep lifecycle dispatch on the LVGL owner.
  • Move hardware acquisition into bounded workers with synchronized, timestamped snapshots and explicit shutdown ownership.
  • Fix camera/audio/wake/PPS cleanup and output-state handling, restore RTC read/set, and distinguish SD/sensor failures from valid zero or empty results.
  • Complete Wi-Fi restoration/recovery and verified HTTPS OTA with actual byte progress, cancellation, image checks, confirmations and guarded rollback startup.
  • Simplify Home, add exact PPS entry with reachable Emergency Off, and contain populated network/file/serial results in scrollable panels.
  • Pin dependencies, isolate desktop UI journeys, and add hosted build/test CI plus extension and release documentation.

Validation before publication: 76/76 desktop tests, clean incremental builds, ESP-IDF v5.4.2 firmware build, populated UI/pointer journeys and focused sanitizer checks. Hosted CI is being verified on this PR.

Hardware acceptance remains pending until the Tab5 is connected. No firmware has been flashed. OTA rollback requires the matching bootloader and partition layout; app-only OTA cannot provision those. Physical PPS, DMA/audio, radio, wake and rollback behavior are listed in docs/RELEASE_CHECKLIST.md.

The pre-stabilization source is preserved in commit 7faf65f21028e1c841ce9741b342c99713961c14; milestone evidence is in docs/STABILIZATION.md.

Preserve the existing modernization as the stabilization baseline.

- Add the app catalog, shared shell, standalone hardware/settings/media screens and PPS module support.
- Include the existing camera, GPIO, PPS and power workflow safeguards, desktop simulation and regression tests.
- Preserve VS Code/CMake setup and the OTA partition layout.

The reviewed baseline builds for desktop and Tab5 and passes 55 desktop tests. Device acceptance and known lifecycle, hardware and OTA defects remain outstanding.
Dispatch Mooncake lifecycle from the LVGL timer and keep desktop SDL on the same thread. Publish sensor and network state through synchronized snapshots; keep sampling jobs alive safely when views close and drain workers before HAL destruction.

Add render, lock, input-to-flush callback and device resource diagnostics. Preserve the baseline and milestone gates in docs/STABILIZATION.md.

Validation: 56 desktop tests passed through the timer-driven smoke journeys, Tab5 firmware build passed, sensor ASan tests and network snapshot TSan tests passed. Physical device timing and hardware acceptance remain pending.
Quarantine camera resources when DMA stop is unconfirmed and drain capture before HAL destruction. Reuse and serialize BMI270 initialization, restore normal sampling after power failures, and drain every audio user before shutdown.

Give tones, music and microphone tests one cancellable codec owner. Check transfer failures, coordinate playback and capture clocks, retain resources on failed cleanup, and preserve mute at zero volume. Stop microphone work on Back.

Keep ordinary brightness above zero and preserve PPS pending or failed off warnings on Home. Add fault-injection tests and document device acceptance limits.

Validation: 61 desktop tests passed; final five-test audio/UI rerun and Tab5 firmware build passed. BMI tests passed ASan/UBSan; audio session tests passed TSan. No device connected or flashed.
Use cached, validity-aware sensor, RTC and interface snapshots so Home and tools distinguish missing, stale and simulated readings. Check INA226 initialization and reads, and serialize bounded SD scan sessions with explicit failure results.

Add confirmed RTC date/time editing with checked calendar writes and readback. Require explicit initialization for invalid clock state and preserve wake configuration during normal setting.

Validation: 65 desktop CTest tests, additional RTC/interface fault UI journeys, focused sanitizer tests, and an ESP-IDF v5.4.2 firmware build passed. Physical-device acceptance remains pending because no hardware is connected.
Restore bounded credentials, serialize network commands and publish synchronized connection state. Stream verified HTTPS updates with real progress, cancellation, compatibility checks and a guarded boot-selection boundary.

Add install/reboot confirmations, network quiescence for shutdown and power transitions, and pending-image boot health checks with a watchdog. Enable rollback in the built bootloader; device deployment still requires a compatible bootloader and partition table.

Validation: 72 desktop tests, fault/cancellation and boot-health sanitizer tests, rendered update journeys, and an ESP-IDF v5.4.2 firmware build. Physical radio, flash and rollback acceptance remain pending.
Remove duplicate Home summaries and enlarge shortcut tiles. Add strict decimal PPS entry with explicit Apply/Enable gating and Emergency Off available during keyboard editing; unchanged entries preserve verified setpoints.

Contain SD, network and COM results in scrolling panels while actions remain fixed. Preserve serial logs on reopen, bound UART queues, remove the detached desktop echo worker and drain the Tab5 UART worker before HAL destruction.

Validation: 75 desktop checks passed across the full run and renamed-guard rerun, populated render and pointer-target journeys, focused sanitizer checks, and Tab5 firmware build. Physical peripherals remain unverified.
Pin dependency commits and verify existing checkouts without overwriting local work. Add offline verification and temporary-Git regression tests, correct desktop CMake ownership and output paths, and exclude unused dependency demos.

Move desktop UI journeys out of the runtime while preserving the existing LVGL lifecycle owner. Add hosted desktop and ESP-IDF 5.4.2 CI, update VS Code paths, and document extension and physical-release contracts.

Validation: fresh desktop build with 76 passing project tests, unchanged no-op rebuilds, standard preset smoke, dependency checks and Tab5 firmware build. Preserve the damaged prior VS Code build cache. Hosted CI and physical device acceptance remain unverified; nothing was flashed or pushed.
Merge current upstream main while retaining standalone apps, checked hardware results and lifecycle ownership. Preserve ST7121 detection/driver support and LCD reset pin handling for newer boards.

Adapt the duplicate AP event guard to the synchronized Wi-Fi implementation, retain accepted stop boundaries and reject AP success after a concurrent stop. Remove manifest-dependent version definitions from the local ST7121 driver.
Trust only the mounted workspace in the ephemeral ESP-IDF container so Git version detection and the final dependency-lock check can run.

Use a CTest resource lock for desktop UI journeys whose short latency assertions otherwise compete with parallel SDL simulations. Keep controller and driver tests parallelizable, and record PR publication and deferred hardware acceptance.

Validation: merged firmware build, production AP event-order checks and workflow YAML syntax. The first hosted run passed the Linux desktop suite and firmware compilation before the Git ownership check failed.
@aero-oli aero-oli closed this Oct 17, 2026
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.

1 participant