Skip to content

[Fix] API-key integration setup is erased after a failed save - #3486

Closed
roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/integration-save-retry-draft-0f1abghskgt4c
Closed

roomote-roomote[bot] wants to merge 1 commit into
developfrom
fix/integration-save-retry-draft-0f1abghskgt4c

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Telegram.

Related issue

Internal maintainer-requested recovery work; no issue opened.

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

A failed API-key integration save clears the entered name, origin and lifetime along with the key. Re-entering the key should be enough to retry an otherwise complete setup.

What changed

Clear only the key input immediately after starting the request. Keep nonsensitive setup fields intact while the request is pending and after a failure. Successful creation still closes the dialog; shared/personal visibility, validation and busy guarding are unchanged. One input ref replaces the full-form reset; no new state, API, schema, dependencies or UI controls.

How it was tested

  • Current-develop actual dialog and deferred-fetch regression reproduce metadata loss; the regression fails on baseline.
  • Tested head 05449fa14caa2c494b2d30a63f90e77782d307c0: induced network failure, metadata/key-state assertions, remove fault, enter only a replacement fake key, actual Save, direct PostgreSQL metadata/scope readback, then actual Remove and cleanup. Repeated for shared and personal paths. Final database readback confirms zero proof integrations and unchanged empty shared guidance.
  • Eleven focused shared/personal integration tests, web typecheck and complete pre-push gates pass. Four actual desktop/mobile dialog images were inspected. The local web process used a sandbox-only public-origin override matching 127.0.0.1:3000 for its real same-origin API checks.
  • No real credential, external provider request or user message was used. Pending key clearing and duplicate-submit behavior are test-backed; images alone do not prove those timing or persistence claims.

Checklist

  • The PR title follows the repo convention: [Fix], [Feat], [Improve], [Refactor], [Docs], or [Chore] followed by a user-facing description
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
    • Normal fast equivalents passed through the full pre-push suite; changed files formatted.
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset
    • Narrow retry fix; no standalone changeset.

Screenshots

Disclosed network-fault injection on the actual shared/personal form. These prove retained nonsensitive fields, empty key and readable recovery layout under an induced failure; they do not prove a live outage or backend correctness. Success and cleanup were separately verified through the real local API and PostgreSQL. Desktop 1440×1000; mobile 390×844.

Shared setup after failed save, desktop

Shared setup after failed save, mobile

Personal setup after failed save, desktop

Personal setup after failed save, mobile

Related PRs

@roomote-community

roomote-community Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed the key-input ref, metadata retention, pending/error/retry flow, shared and personal callers, input primitive, schema/API contract, and regression test. Current-head lint, type checking and Knip passed; tests, Docker build and JavaScript/TypeScript analysis were still running when checked. Repository validation suites were left to CI.

Reviewed 05449fa

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