Disable Continue button styling when New API key form is incomplete#11802
Conversation
The Continue button in the auth-secret FTUX dialog (orchestration API key dropdown -> '+ New API key...') already early-returned when required fields were empty, but it always rendered with the accent blue fill and a pointing-hand cursor, so visually it looked clickable. - Add `validated_form_snapshot` as a single validation source consumed by both the disabled-state check and `handle_continue`, so the two can't drift. - Disable Continue (gray fill via `internal_colors::neutral_4`, muted text via `neutral_5`, arrow cursor, no-op click) when name or any required field is empty, or while the save is in flight. - Subscribe to `EditorEvent::Edited` on the name + field editors so the button restyles as the user types. Co-Authored-By: Oz <oz-agent@warp.dev>
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR disables the Continue affordance in the New API key flow until the creation form has a trimmed non-empty name, all required fields are non-empty, and no save is in flight. The implementation reuses the same validation snapshot for rendering and submit handling, updates the button live on editor edits, and includes before/after screenshots for the user-facing styling change.
Concerns
- No blocking correctness, security, or spec-alignment concerns found.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Before:

After:

Description
The Continue button in the "New API key" dialog (orchestration API key dropdown →
+ New API key…) was already non-functional when required fields were empty (handle_continueearly-returns), but it always rendered with the accent blue fill and a pointing-hand cursor, so visually it looked clickable. This PR adds proper disabled styling so the affordance matches the behavior.Before: button looks active even when name / API key are empty.
After: button renders with the design system's disabled palette (
internal_colors::neutral_4background,neutral_5text, arrow cursor) until the form is ready to submit.How
validated_form_snapshotas a single source of truth for "is this form ready to submit". Both the Continue button's disabled-state check (can_submit_creation_form) andhandle_continueconsume it, so they can't drift.render_buttongains adisabled: boolparam that swaps fill/text colors, switches cursor toArrow, and short-circuits the click handler. MirrorsDisabledThemeinview_components/action_button.rs.EditorEvent::Editedon the name + field editors so the button restyles live as the user types.Continue is disabled when:
is_saving)Linked Issue
Fixes https://linear.app/warpdotdev/issue/QUALITY-752/continue-button-should-be-disabled-in-secrets-popup-if-fields-not
Testing
./script/runcargo check -p warp✓cargo clippy -p warp --all-targets --tests✓ (no new warnings)cargo fmt✓Co-Authored-By: Oz oz-agent@warp.dev