fix(cmux-tui-core): drop the new expect in notification.clear (crash ratchet base red from #34498)

Merged
TE
2d ago
+3-3

Base red: on feat-cmux-next pushes, cmux-next checks (god files, concurrency, crash safety, l10n) fails its Crash safety step, so cmux-next swift test is skipped on base.

crash_ratchet.py reports rust cmux-tui-core: expect 190 -> 191. The new hit came from #34498 (notifications panel clears a selected row), which added value.as_str().expect("catalog resource-id validation") for notification_id in clear_notifications (resource_router.rs). Bisected with the ratchet: clean at 7467cdd49da8^, red at 7467cdd49da8.

Fix: parse value.as_str().unwrap_or_default() instead, so a non-string id becomes a validation error (NotificationPublicId::parse("") fails) instead of a panic. No behavior change for valid input. crash_ratchet.py is ok and check-crash-safety.sh passes locally at this head.

The job's other red, Check the app FFI pin, is stale since #34507 and #34052. It is the FFI release bot's to re-pin (#33988 will update once app FFI release run 41763425088 publishes), so this PR doesn't touch it.

Agent session: agent session

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes a crash in the notifications clear handler in cmux-tui-core that was failing the crash-safety check on base.

clear_notifications previously used expect("catalog resource-id validation") when reading notification_id, which panicked if the value was not a string. It now uses unwrap_or_default(), so a non-string id parses as "" and fails as a validation error instead of panicking. Valid input behaves exactly as before.