Skip to content

fix: disable empty information saves - #66

Merged
arnestrickmann merged 1 commit into
mainfrom
arnestrickmann/disable-empty-info-save
Oct 9, 2026
Merged

arnestrickmann merged 1 commit into
mainfrom
arnestrickmann/disable-empty-info-save

Conversation

@arnestrickmann

Copy link
Copy Markdown
Contributor

Summary

  • Disable Save in new Address, Payment Card, and Note dialogs until at least one field contains a non-whitespace value.
  • Guard form submission itself so keyboard or programmatic submission cannot create a blank Information record.
  • Keep existing-record editing and agent-side forms unchanged.

Test Coverage

All changed paths are covered:

  • requireNonEmpty with blank and whitespace-only values: Save disabled and submission blocked.
  • requireNonEmpty with a real value: Save enabled and values submitted.
  • Forms without requireNonEmpty: existing behavior preserved.
  • /info Add dialogs: Address, Payment Card, and Note all opt into the guard.
  • /info edit dialog: an existing empty record remains editable.

Tests: 47 → 49 (+2 new test files). AI-assessed changed-path coverage: 100%.

Pre-Landing Review

One informational test gap was found and fixed by adding route-level coverage. Testing, maintainability, performance, and code-structure reviews are otherwise clean.

Design Review

Design Review (lite): no findings. The change uses the shared Button component's existing native disabled state.

Eval Results

No prompt-related files changed, so evals were skipped.

Scope Drift

Scope Check: CLEAN. The diff is limited to the Information modal behavior and regression tests.

Plan Completion

No relevant plan file was detected.

Verification Results

  • 374 tests passed, 0 failed.
  • All package typechecks passed.
  • Web app, docs, and website production builds passed.
  • Manual /info flow was exercised locally before shipping.

TODOS

No root TODOS.md exists; no unrelated tracking file was added for this focused fix.

Test plan

  • New Address starts with Save disabled.
  • New Payment Card starts with Save disabled.
  • New Note starts with Save disabled.
  • Whitespace-only input keeps Save disabled.
  • A non-whitespace value enables Save.
  • Existing Information records remain editable.
  • Full repository test suite passes.
  • Production builds pass.

@arnestrickmann
arnestrickmann merged commit 07ec491 into main Oct 9, 2026
1 of 4 checks passed
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