Fix default Agent selection in API key modal - #15825
Open
warp-agent-staging[bot] wants to merge 2 commits into
Open
Fix default Agent selection in API key modal#15825warp-agent-staging[bot] wants to merge 2 commits into
warp-agent-staging[bot] wants to merge 2 commits into
Conversation
Contributor
Author
|
This PR was generated with Warp. Comment |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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_uidin 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
ready-to-specorready-to-implement. (The work item is in Linear and has no such label.)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.cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warningscargo clippy -p warp --all-targets --tests -- -D warningscargo clippy -p warp_completer --all-targets --tests -- -D warningscargo build --bin warp— passed../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
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.
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
CHANGELOG-BUG-FIX: Fixed Agent API key creation requiring users to re-select the default agent.