Default the Add connection tab to OAuth when a matching app exists

Merged
RH
2mo ago
+354-111

When an integration offers both an API key and OAuth, select OAuth only when a matching client is available. Use the app picker’s integration, endpoint and scope rules. Otherwise keep the API-key default. Late client responses preserve the user’s selected method and any key already entered.

Verified: 87 focused unit tests, all 6 connection scenarios on cloud and self-host, React and E2E type checks, lint, and formatting pass. Chrome also checked ready-client and missing-client forms. Provider consent uses the published Slack emulator. All 43 CI checks pass; one check is skipped.

The change: which tab opens first

Both columns use the same OpenAPI test setup: an API-key method, an OAuth method, and an already-registered OAuth app. Neither opening excerpt clicks an auth tab. Before, API key is selected. After, OAuth is selected automatically.

oauth-default-comparison.mp4

The comparison crops the first 2.5 seconds of each original recording, then holds the final frame. Labels and outlines identify the selected tabs.

Full original recordings

Before: API key selected despite a ready OAuth app

After: matching OAuth app selected automatically

No matching client: keep the API-key default

Connection setup · without a matching client the API key stays the default (selfhost)

Late client response: preserve the entered key

Connection setup · client list arrives with the form enter API key (selfhost)

All recordings use synthetic accounts. Filming adds deliberate pauses; video duration is not a page-load measurement.