fix(diag): forward wasm panics to console.error with a readable trace (MAPPS-299) #284

Merged
YousifShkara merged 1 commit from fix/MAPPS-299-wasm-panic-hook into main 2026-06-21 07:13:38 +02:00
Owner

Installs console_error_panic_hook as the very first call in main() (before snapshot_initial_search and the Dioxus launch) so the next reproduction of the "Schedule Appointment" wasm crash surfaces a readable panic message + stack trace in the browser console instead of an opaque RuntimeError: unreachable at a hex offset (the QA repro reported wasm:0x352c4f). This does not yet fix the underlying crash in the appointment form modal: it is the third acceptance-criterion item on the ticket and a prerequisite for diagnosing the first two. The hook is web-only (the desktop/native builds inherit the default Rust panic handler that already writes to stderr). Bundle impact is a couple of KB.

#MAPPS-299

Installs `console_error_panic_hook` as the very first call in `main()` (before `snapshot_initial_search` and the Dioxus launch) so the next reproduction of the "Schedule Appointment" wasm crash surfaces a readable panic message + stack trace in the browser console instead of an opaque `RuntimeError: unreachable` at a hex offset (the QA repro reported `wasm:0x352c4f`). This does not yet fix the underlying crash in the appointment form modal: it is the third acceptance-criterion item on the ticket and a prerequisite for diagnosing the first two. The hook is web-only (the desktop/native builds inherit the default Rust panic handler that already writes to stderr). Bundle impact is a couple of KB. #MAPPS-299
fix(diag): forward wasm panics to console.error with a readable trace (MAPPS-299)
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m13s
Create release / Create release from merged PR (pull_request) Has been skipped
5f4e258700
Installs `console_error_panic_hook` as the very first call in `main()` (before `snapshot_initial_search` and the Dioxus launch) so the next reproduction of the "Schedule Appointment" wasm crash surfaces a readable panic message + stack trace in the browser console instead of an opaque `RuntimeError: unreachable` at a hex offset (the QA repro reported `wasm:0x352c4f`). This does not yet fix the underlying crash in the appointment form modal: it is the third acceptance-criterion item on the ticket and a prerequisite for diagnosing the first two. The hook is web-only (the desktop/native builds inherit the default Rust panic handler that already writes to stderr). Bundle impact is a couple of KB.

#MAPPS-299
YousifShkara deleted branch fix/MAPPS-299-wasm-panic-hook 2026-06-21 07:13:39 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!284
No description provided.