Repository navigation
Description
P2 · Reproduced locally at 44e0dcf254975286c0e9dea443b5cd1ca6b23347.
The Add credential wizard blocks Cancel while creation is pending but leaves Back active. Back erases the pending draft, and a later save refusal is shown against a new empty form instead of preserving the original fields for correction. The wizard is shared by Connectors and AI providers.
Reproduction:
- Have an existing connector credential, then open Add credential for the same connector.
- Fill its required fields and use the existing credential's name, which the server will reject as a duplicate.
- Submit on a slow connection. While the request is pending, observe Cancel disabled and click Back.
- Pick the connector again before the original response arrives, then let that response complete.
Expected: Back should obey the pending-save guard, or preserve the original request's draft until its outcome is known. A refusal must remain associated with the form that submitted it.
Observed: Back is enabled and immediately calls clearSetup. The second form is empty. The original real HTTP 409 CREDENTIAL_NAME_TAKEN later populates an error on that empty form, while its original name, username, password and server draft are gone.
Cause: handleOpenChange prevents closing during create.isPending, and Cancel is disabled. The header receives onBack: backToPicker directly; backToPicker unconditionally clears every setup field and does not check pending state. The still-running handleSubmit catch sets the shared error after navigation.
Frozen observation/control output:
CONFIRMED pending credential POST: Cancel disabled, Back enabled; Back resets draft; real native duplicate-name 409 later appears on fresh empty form
CONTROL same real native 409 without Back keeps original name/login/draft for correction
Control: Without Back, the identical delayed native refusal preserves all original input values. Ordinary Back after an idle draft is intentionally a reset; this report is confined to navigation while the save is in flight.
Exact probe command (2/2 passed; cwd detached source services/platform):
/Users/yannick/.npm/_npx/22f2fe8d8bc13000/node_modules/.bin/bun x vitest run --config /Users/yannick/.codex/notes/tale-100-findings/provider-connector-proof/vitest.config.ts /Users/yannick/.codex/notes/tale-100-findings/provider-connector-proof/credential-pending.probe.test.tsx --maxWorkers 1 --testTimeout 30000 --reporter verbose --silent=falseProof boundary: Actual CredentialAddDialog, connector adapter, mutation hook and HTTP adapter. The native localhost API produced the duplicate-name refusal; only delivery of its already-received response was delayed at the final fetch seam. The request used an owned fixture name, loopback hosts and nonfunctional test material. No credential was created, and no model, mail transport, external provider or OAuth request ran. This is a component/native API proof, not a browser run.
Source:
Deduplication: Cached all-state credential/provider/connector titles and current findings reviewed. The native duplicate-name validation is functioning; the root is a wizard navigation path that bypasses its pending guard. Distinct from credential-table refresh remounts, failed multi-resource saves, and generic dialog keyboard debt. Parent performs live all-state dedup.
Independent parent verification: inspected the complete proof and independently reran the two-test batch against owned localhost fixtures; all passed. Relevant live all-state IMAP-port and credential-Back-pending searches found no matching root. Logs: provider-connector-proof/parent-connector-boundaries.log and parent-credential-pending.log.
Activity
[-]bug(platform): bug: Add credential Back bypasses pending-save guard and loses the rejected request draft[/-][+]bug(platform): Add credential Back bypasses pending-save guard and loses the rejected request draft[/+]