Skip to content

Bug: Team editor accepts new typing during Save then closes with that newer draft unsaved #3585

Closed

Description

@yannickmonney

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

Saved feedback and dialog closure hide later unsaved edits; closing the parent detail/page drops them.

Reproduction:

  1. Rename a team to First draft and click Save against a slow response.
  2. While updateTeam is pending, change enabled name input to Later unsaved draft.
  3. Allow First draft save to succeed.

Expected: Either disable edits while saving or keep the dialog open and dirty when newer edits remain.

Observed: Input accepts Later unsaved draft, but only First draft is sent; the success handler requests dialog close unconditionally.

Evidence: Deferred updateTeam probe verifies enabled input, old request payload, newer visible input, and onOpenChange(false) after resolution.

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: Component requests close; parent wiring closes the dialog in production. Probe keeps controlled open prop fixed to inspect final input. It does not claim the mounted RHF draft is immediately erased before parent close/unmount.

Source:

Deduplication: Cached issue titles searched settings/async/save. GitHub search "save pending edit lost": [] GitHub search "draft save settings": []

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.

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