Fix white-screen crash: nullable bindings must say null - #17
Merged
Conversation
Option fields without skip_serializing_if are always present on the wire as null, but #[ts(optional)] declared them absent-or-present — so tsc never forced null handling and ciState(null) dereferenced summary.total during board render, unmounting the whole app once persisted reviews hydrated. Bindings for plan_path/dispatch_snapshot/ci_summary/ last_reviewed_sha now say T | null; the two dishonest guards are fixed; fixtures mirror the wire shape (their omission hid the crash from every test); regression tests lock the null path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause (systematic-debugging trace)
The app went white because React unmounted the tree on `TypeError: null is not an object (evaluating 'summary.total')` at `ci.ts:69` during board render. The chain:
Only reproducible with hydrated reviews (persisted state), which is why headless probes and CI never saw it.
Fix (the class, not the line)
Verified
cargo test 458 · clippy -D warnings · tsc strict clean · vitest incl. new regressions · vite build.
🤖 Generated with Claude Code