Skip to content

Bug: Edit member closes after a rejected update instead of keeping the failed draft open #3586

Closed

Description

@yannickmonney

P2 · Reproduced locally against 44e0dcf254975286c0e9dea443b5cd1ca6b23347. No production testing.

The failed form closes as if its transaction finished; users must reopen it to retry and can lose the draft when the row/page unmounts. Multiple changed fields also run concurrently, so the close can conceal a partial update.

Reproduction:

  1. Open Settings → Members → Edit; change Name to a valid value.
  2. Make updateMemberDisplayName reject (network or backend refusal) and click Save.

Expected: Keep the dialog and edited values open for repair/retry; close only after required mutations succeed.

Observed: handleUpdateMember catches/logs the rejection and resolves; onSubmit then unconditionally invokes onOpenChange(false).

Evidence: Actual member-dialog probe rejects a valid-name mutation and verifies onOpenChange(false), no success toast from the dialog.

Verification: Independently reran the five relevant observation/control tests; all passed. The actual dialogs and their form state execute in jsdom. The shared form editor preserves a newer pending-save draft in the control.

Proof boundary: Backend hook is mocked to reject; its existing global error toast is not assessed here. Do not claim the draft is erased immediately while the row component remains mounted.

Source:

Deduplication: Cached issue titles searched member/edit/fail. GitHub search "member edit failed": only unrelated closed #2116

Acceptance: Reproduce the triggering sequence with a regression test, preserve the editable draft or refuse invalid input as described above, and retain the successful-save control.

Activity

  1. yannickmonney commented on Oct 4, 2026

    @yannickmonney
    ContributorAuthor

    Independent review — REQUEST CHANGES

    Reviewed and reconfirmed PR #4293 at exact head 1f5768f1a86c3fe85b3915161717afb042efbca9.

    Evidence

    • The PR focused jsdom suite passes: 1 file, 3 tests, Node v24.21.0, one worker. It covers rejected-name draft retention plus accessible role="alert", successful close/success toast, and no success toast on rejection.
    • The same regression test over origin/main is a negative control: 1 failed, 2 passed; the rejected-save case times out because no refusal alert appears.
    • Source inspection confirms sequential required mutations, no close after a rejection, and a localized destructive alert. FormDialog keeps Save disabled during isSubmitting and re-enables it after the rejected submit settles. EN/DE/FR refusal keys are present.

    Blocking integration finding

    Open #4237 is currently at 7ad3446cad4a3aa74d8a2c3188a46196ddb6d326 and changes the same member dialog. A three-way merge simulation from origin/main reports both modified member-edit-dialog.tsx and added in both member-edit-dialog.test.tsx. The two PRs therefore cannot land together without a conflict-resolution/rebase that preserves both the name-validation and rejected-save behavior/tests.

    Please rebase or otherwise resolve the overlap with #4237, then request a fresh independent review. I did not rerun or cancel CI, and I did not merge or push.

    GitHub would not accept the formal “request changes” action because the authenticated account is the PR author; this comment is the review record.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions