Skip to content

fix(desktop): read a booting board as progress, not an error - #13

Merged
FadyFaheem merged 1 commit into
mainfrom
fix/booting-board-log
Jul 29, 2026
Merged

fix(desktop): read a booting board as progress, not an error#13
FadyFaheem merged 1 commit into
mainfrom
fix/booting-board-log

Conversation

@FadyFaheem

Copy link
Copy Markdown
Owner

A board that answers a hello before app_main finishes refuses it with the display startup stage it has reached, and the hello retry timer tries again a second later. The desktop logged that as Device error: display-ready, which reads like a contradiction and like a failed flash — and it shows up during the post-flash reconnect, which is exactly when a failed flash would.

The CrowPanel starts its protocol tasks before display bring-up on purpose, then sets system_ready on the last line of app_main, after deck_ui_init has restored saved decks from flash. Any hello landing in that window gets refused with bsp_display_status().

bsp_display_status is the only pre-handshake source of a display-* code, so those now log as Protocol: board is still starting up (display-panel-init); retrying. Every other refusal, including unsupported-protocol and invalid-json, is untouched.

Desktop only — no firmware change, no reflash.

Covered by a new test in desktop/test/device.test.js that refuses the first hello with a startup stage and a genuine error, then asserts the two log lines read differently and the session still completes.

A board that answers a hello before app_main finishes refuses it with
the display startup stage it has reached, and the hello retry timer
tries again a second later. Logging that as a device error reads like
a contradiction and like a failed flash, which is exactly when it
shows up.

bsp_display_status is the only pre-handshake source of a display-*
code, so those now report the board as still starting up. Every other
refusal is untouched.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FadyFaheem
FadyFaheem merged commit d8249f8 into main Jul 29, 2026
3 checks passed
@FadyFaheem
FadyFaheem deleted the fix/booting-board-log branch July 29, 2026 14:34
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