Skip to content

fix+test: disable action buttons in saved and discarded panel states#47

Merged
enlorik merged 1 commit into
mainfrom
feature/review-panel-empty-error-state-tests
Jun 9, 2026
Merged

fix+test: disable action buttons in saved and discarded panel states#47
enlorik merged 1 commit into
mainfrom
feature/review-panel-empty-error-state-tests

Conversation

@enlorik

@enlorik enlorik commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary

The review panel left Save, Append, and Discard enabled after a note was saved or discarded, making a second accidental save possible. Added isActionBlocked (covering saving | saved | discarded) so those buttons are correctly disabled once the draft is no longer actionable.

Also split the existing "shows saved status" test into two focused tests (one for the success message, one for the dropdown callback), and added five new widget tests for error, saved, discarded, and overflow edge cases.

Changed files

  • lib/widgets/note_draft_review_panel.dartisActionBlocked guard on buttons and dropdown
  • test/note_draft_review_panel_test.dart — split one test, add five new state/overflow tests

Tests run

flutter analyze — no issues
flutter test — 259 passed (was 253; +6 net)

Risks / follow-up

Minimal. The only production change is the extra disabled condition on three buttons and the dropdown onChanged. Existing search-screen integration tests still pass.

Intentionally not changed

Persistence, SearchScreen wiring, Brave behaviour, markdown generation, evidence generation, source sorting logic.

The review panel was leaving Save, Append, and Discard enabled after a
note was saved or discarded, allowing the user to trigger a second save.
Introduces isActionBlocked to cover saving/saved/discarded, and adds five
new widget tests for the error, saved, discarded, and overflow edge cases.
@enlorik enlorik marked this pull request as ready for review June 9, 2026 00:35
@enlorik enlorik merged commit d1447aa into main Jun 9, 2026
1 check passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant