Skip to content

Fix default Agent selection in API key modal - #15825

Open
warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
factory/app-5819-api-key-default-agent
Open

Fix default Agent selection in API key modal#15825
warp-agent-staging[bot] wants to merge 2 commits into
masterfrom
factory/app-5819-api-key-default-agent

Conversation

@warp-agent-staging

@warp-agent-staging warp-agent-staging Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Initialize the Agent API key form from the first available agent when the modal has no explicit selection. This keeps the displayed default agent and selected_agent_uid in sync, so Create key is enabled without re-selecting the agent.

Existing explicit selections, empty agent lists, loading, and Personal keys remain unchanged. Closing the modal now also clears any Agent search filter so reopen state and the visible selection stay synchronized.

Linked Issue

APP-5819

  • The linked issue is labeled ready-to-spec or ready-to-implement. (The work item is in Linear and has no such label.)
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • cargo nextest run -p warp -E 'test(default_agent_selection_is_restored_after_modal_reset) | test(test_agent_dropdown_is_searchable)' — 2 passed.
  • ./script/format --check — passed.
  • Repository presubmit Clippy matrix — passed:
    • cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings
    • cargo clippy -p warp --all-targets --tests -- -D warnings
    • cargo clippy -p warp_completer --all-targets --tests -- -D warnings
  • cargo build --bin warp — passed.
  • I have manually tested my changes locally with ./script/run. (Equivalent internal launch used: cargo run --bin warp.)

The authenticated verification environment reached the real API key modal, but its account had no agents and the API returned Unauthorized: Expected a user account. The capture therefore confirms the modal path and that no secret was generated, but it does not visually prove automatic Default Service Account selection. The regression unit test covers that state transition.

Screenshots / Videos

Computer-use video recordings

Demonstrates launching the authenticated Warp GUI terminal, navigating to Settings > Cloud platform > API keys, opening the New API key modal, selecting the Agent key type, waiting for the agent list to load, entering the name 'APP-5819 verification', and observing the Create key button state, then closing the modal without creating a key.
Warp GUI: Navigate to Cloud platform API keys and open New API key modal: Demonstrates launching the authenticated Warp GUI terminal, navigating to Settings > Cloud platform > API keys, opening the New API key modal, selecting the Agent key type, waiting for the agent list to load, entering the name 'APP-5819 verification', and observing the Create key button state, then closing the modal without creating a key.

Computer-use screenshots (2)

New API key modal with Agent type selected, Name field containing 'APP-5819 verification', Agent section showing 'No agents available. Create one first.' (untouched, no dropdown interaction), and the enabled-looking blue 'Create key' button visible.
New API key modal with Agent type selected, Name field containing 'APP-5819 verification', Agent section showing 'No agents available. Create one first.' (untouched, no dropdown interaction), and the enabled-looking blue 'Create key' button visible.

Final confirmation: New API key modal fully closed and API keys page shows 'No API Keys' state, confirming no key was created during testing.
Final confirmation: New API key modal fully closed and API keys page shows 'No API Keys' state, confirming no key was created during testing.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

CHANGELOG-BUG-FIX: Fixed Agent API key creation requiring users to re-select the default agent.

@cla-bot cla-bot Bot added the cla-signed label Sep 4, 2026
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View origin

@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review September 4, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants