fix(core): fix device_menu crash on devices without a serial number#7022
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| model | device_test | click_test | persistence_test |
|---|---|---|---|
| T2T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3B1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3T1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
| T3W1 | test(all) main(all) ![]() |
test(all) main(all) ![]() |
test(all) main(all) ![]() |
Latest CI run: 26623644989
There was a problem hiding this comment.
Pull request overview
This PR fixes a crash in the homescreen “Device menu” on unprovisioned T3W1 devices where reading the serial number can fail (no SN in OTP yet). Instead of propagating the exception and ending in a black screen, the menu now shows a fallback value.
Changes:
- Wrap serial number retrieval in a
try/exceptto handle unprovisioned devices gracefully. - Display
"N/A"in the About section whenutils.serial_number()cannot be read.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.




































Fixes an issue on unprovisioned devices in development.
When a device has not yet been provisioned no serial number is assigned or written to OTP), opening the device menu on T3W1 throws an exception and results in a black screen.
With this fix, unprovisioned devices display N/A instead of a serial number.