breadbug GUI retains the previous report after a failed preview rebuild #34

Open
opened 2026-10-11 13:10:35 +08:00 by Breadway · 1 comment
Owner

Found while improving the breadbug GUI and reviewing the Preview report callback in breadbug-gui/src/lib.rs on feature/breadbug-gui (5b538e8).

Confidence: high from source inspection. A successful build stores State.prepared and populates the preview. On the next attempt, an error only changes status text and disables Send; it leaves State.prepared, the previous preview and Save available.

Reproduction: build a preview, return to details and change the notes, then make the next build fail, for example with a synthetic crash marker larger than the report size cap. The error screen still allows saving the previous report, rather than the newly requested one. Invalid configuration is not a valid trigger: the report builder does not load breadbug.toml.

Expected: invalidate the old prepared report when rebuilding, disable Save and Send until the new report is ready, and show an empty error state on failure. This prevents a user from saving stale notes or a report for the wrong app.

Implemented locally on fix/breadbug-gui-polish, with an opt-in isolated walkthrough check that injects an oversized marker, restores the fixture, and asserts that Save and Send are disabled after the failed rebuild.

Found while improving the breadbug GUI and reviewing the Preview report callback in breadbug-gui/src/lib.rs on feature/breadbug-gui (5b538e8). Confidence: high from source inspection. A successful build stores State.prepared and populates the preview. On the next attempt, an error only changes status text and disables Send; it leaves State.prepared, the previous preview and Save available. Reproduction: build a preview, return to details and change the notes, then make the next build fail, for example with a synthetic crash marker larger than the report size cap. The error screen still allows saving the previous report, rather than the newly requested one. Invalid configuration is not a valid trigger: the report builder does not load breadbug.toml. Expected: invalidate the old prepared report when rebuilding, disable Save and Send until the new report is ready, and show an empty error state on failure. This prevents a user from saving stale notes or a report for the wrong app. Implemented locally on fix/breadbug-gui-polish, with an opt-in isolated walkthrough check that injects an oversized marker, restores the fixture, and asserts that Save and Send are disabled after the failed rebuild.
Author
Owner

PR #51 (#51) is open for the fix on fix/bread-35-breadbug-gui-stale-report. Exact head SHA a2e3964019, based on origin/main 6e2010a. Confirmed on origin/main before fixing: a failed rebuild left State.prepared, the old preview and Save available. Gates in breadbug-gui: cargo test --lib 9 passed, 0 failed; cargo check --all-targets pass; cargo clippy --all-targets -- -D warnings pass. Not run: the window itself. Not merged. Requesting independent review on this exact head.

PR #51 (https://git.breadway.dev/Breadway/bread/pulls/51) is open for the fix on fix/bread-35-breadbug-gui-stale-report. Exact head SHA a2e396401961b273980a02810a47dc355ead68b8, based on origin/main 6e2010a. Confirmed on origin/main before fixing: a failed rebuild left State.prepared, the old preview and Save available. Gates in breadbug-gui: cargo test --lib 9 passed, 0 failed; cargo check --all-targets pass; cargo clippy --all-targets -- -D warnings pass. Not run: the window itself. Not merged. Requesting independent review on this exact head.
Sign in to join this conversation.
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
Breadway/bread#34
No description provided.