Skip to content

bug(platform): an Edit credential dialog vanishes with its draft when another admin deletes the credential #4082

Closed

Description

@yannickmonney

Summary

On Settings › Connectors, an Edit credential dialog with typed, unsaved input closes by itself 0.3 s after another admin deletes that credential. There's no notice: no toast, no alert, nothing in the table. The typed input is lost and the person isn't told why the dialog vanished.

Another session's change to a different credential leaves the same dialog open with its typing intact, which is #3712's repair (#3895) working. So the gap is specific to the credential being edited.

Source and environment

  • Source: origin/main at 09d0b20d2 (2026-10-02), in a detached worktree with no local changes.
  • Stack: an isolated local stack. Vite runs on localhost:3631, the backend on 127.0.0.1:3636, and the occurrence has its own PostgreSQL cluster on 127.0.0.1:55363. All egress goes to a dead proxy.
  • Browser: headless Chromium 1208 (playwright-core 1.58.2) at 1280×900, en-US.
  • Data: a synthetic organization with its owner (browser) and an admin (another session using the app routes), plus synthetic Tavily credentials.

Reproduction

  1. As the owner, open Settings › Connectors, then Actions for Tavily edited › Edit credential. Type "Typed but unsaved" into the name field and don't save.
  2. Control: as the admin, rename a different credential (PATCH …/connector-credentials/‹other› answers 200). Wait 4 s.
  3. Case: as the admin, delete "Tavily edited" (DELETE …/connector-credentials/‹id› answers 204).

Observed

  • Control: the dialog stays open, the field still reads "Typed but unsaved", and there's no toast.
  • Case: the dialog closes after 302 ms, the typed input is gone with it, and the row drops. There's no toast and no alert.

Expected

The person learns what happened to the thing they were editing, and their draft doesn't vanish without a word. For example:

  • keep the dialog open with an inline notice ("This credential was deleted in another session") and Save disabled, so they can copy what they typed and close it themselves;
  • at minimum, close it with a toast saying why.

This matches how editors here report another session's change ("These settings changed in another session…").

Root cause

services/platform/app/features/settings/credentials/credential-row-actions.tsx:203–210 renders CredentialEditDialog inside the row's own CredentialRowActions, mounted per row by credential-table.tsx:309. When the live refetch drops the deleted credential's row, the row unmounts and takes its open dialog and draft with it. Nothing records that the dialog was open on a credential that has disappeared.

The same row actions serve AI providers credentials, so that page very likely behaves the same. It wasn't driven.

Acceptance checks

  • With Edit credential open and typed into, another session's delete of that credential leaves a visible explanation. Either the dialog stays with an inline notice and Save disabled, or a toast says why it closed. The typed text is not discarded silently.
  • Another session's change to a different credential still leaves the dialog and its typing alone (the control).
  • A test drives the delete-while-editing case.

Retained evidence

Evidence is retained locally under /agent/workspace/.tale358/r20261002T1215/, and attached as a tarball to Tale task TALE-358:

  • evidence/c1-credential-leads.log (L2 control and case);
  • evidence/c1-L2-after-delete.png;
  • scripts/c1-credential-leads.ts.

Limits

Activity

  1. yannickmonney commented on Oct 11, 2026

    @yannickmonney
    ContributorAuthor

    Post-merge recheck at main 8d09856be (Review A, TALE-358, 2026-10-11 08:15 Zurich occurrence; static reading).

    #4409 (76cfc5ce30) fixes the reported behavior.

    • credential-table.tsx now owns the edit dialog (editing state) instead of the row, so the dialog no longer unmounts when the credential disappears from the list.
    • editingDeleted passes deleted to credential-edit-dialog.tsx. The dialog then keeps the draft, shows a warning alert ("This credential was deleted in another session." in en/de/fr, with no ß, so de-CH is fine) and blocks Save.

    No regression test came with it. The commit changes no test file: credential-edit-dialog.test.tsx is unchanged and there is no table-level test. The only coverage added is one line in tests/manual/reference/automation/settings.md. The issue's old-fails/new-passes expectation (the row removed under an open dialog: the draft survives, Save is refused, the alert is named) is still unpinned. A refactor that moves the dialog back into the row would pass CI.

    #4081 (delete of an already-deleted credential, PR #4190) is still open, so settings.connectors REL-MANUAL stays FAIL in Review A's inventory.

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