Skip to content

fix(ssh-keys): validate Add SSH Key form onChange#1554

Merged
dawsontoth merged 1 commit into
stagefrom
fix-#1550
Jul 24, 2026
Merged

fix(ssh-keys): validate Add SSH Key form onChange#1554
dawsontoth merged 1 commit into
stagefrom
fix-#1550

Conversation

@BboyAkers

Copy link
Copy Markdown
Member

The form had no validation mode, so RHF defaulted to onSubmit — but the submit button is gated on formState.isValid, which onSubmit mode never computes. Validation could never run and the button stayed disabled. onChange matches the other forms (ClusterForm, log config) and surfaces field errors as the user types.

The form had no validation mode, so RHF defaulted to onSubmit — but the
submit button is gated on formState.isValid, which onSubmit mode never
computes. Validation could never run and the button stayed disabled.
onChange matches the other forms (ClusterForm, log config) and surfaces
field errors as the user types.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@BboyAkers
BboyAkers requested a review from a team as a code owner July 24, 2026 05:27
@BboyAkers
BboyAkers requested a review from dawsontoth July 24, 2026 05:27

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the AddSSHKeyModal component by adding mode: 'onChange' to the useForm configuration, enabling form validation on change. There are no review comments, and I have no feedback to provide.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 52.33% 5623 / 10745
🔵 Statements 52.85% 6012 / 11375
🔵 Functions 44.68% 1386 / 3102
🔵 Branches 45.25% 3770 / 8330
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/features/instance/config/sshKeys/modals/AddSSHKeyModal.tsx 0% 0% 0% 0% 37-208
Generated in workflow #1579 for commit 4932c13 by the Vitest Coverage Report Action

@dawsontoth
dawsontoth added this pull request to the merge queue Jul 24, 2026
Merged via the queue into stage with commit c50619f Jul 24, 2026
2 checks passed
@dawsontoth
dawsontoth deleted the fix-#1550 branch July 24, 2026 18:07
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.

2 participants