Skip to content

feat(dashboard): trigger key validation on Enter in AddApiKeyModal (#10995) - #11056

Merged
diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.50from
rqzbeh:fix/add-api-key-modal-enter-key
Aug 22, 2026
Merged

diegosouzapw merged 4 commits into
diegosouzapw:release/v3.8.50from
rqzbeh:fix/add-api-key-modal-enter-key

Conversation

@rqzbeh

@rqzbeh rqzbeh commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Fixes #10995 by attaching an onKeyDown Enter handler to the API Key credential input in AddApiKeyModal, allowing users to validate keys by hitting Enter.

@rqzbeh
rqzbeh requested a review from diegosouzapw as a code owner August 21, 2026 22:25
@diegosouzapw

Copy link
Copy Markdown
Owner

Nice, small UX win — Enter-to-validate is the expected form behavior and wiring into the existing handleValidate()/validating/saving state is exactly right. I ran the new test (passes) and the existing modal component tests against it (all green), so this is safe to merge. Two optional polish notes, not blockers: (1) run npx prettier --write on the new test — the final assert.ok(...) wraps when it fits on one line; and (2) the Enter handler only guards on !validating && !saving, while the Check button also disables on empty key / Google-PSE-missing-cx (AddApiKeyModal.tsx:774). Mirroring that last condition would avoid a pointless validation request when the field is empty. Since this is a UI-only change, the source-string test is an acceptable guard, but a small React render test (like the other add-api-key-modal-*.test.tsx) simulating a keydown Enter would be more robust against future refactors. Great work.

@diegosouzapw
diegosouzapw merged commit 7e48be8 into diegosouzapw:release/v3.8.50 Aug 22, 2026
13 of 16 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 22, 2026
…+ rebaseline AddApiKeyModal (1067->1073, #11056 growth)
diegosouzapw pushed a commit that referenced this pull request Aug 22, 2026
⭐4 — Suporte de backend nativo Bun + Dockerfile.bun multi-stage + fallback dinâmico de driver SQLite (better-sqlite3 prioritário sob Bun, bun:sqlite fallback; Node preservado) + correção de estabilidade do DAST CI smoke.
Validado a fundo (worktree board sobre tip): bun-support 4/4, typecheck:core limpo, dashboard-typecheck OK (220 dentro do baseline), open-sse-typecheck OK (5 pré-existentes), gate de runtime OK sob Node, changelog-integrity OK, file-size/complexity/cognitive/dead-code OK. Verificado que o driver preserva a cadeia Node/falback conforme AGENTS.md; teste bun-support presente. Baselines de typecheck removidos são ratchet honesto (erros não existem mais).
OBS: destravei 2 base-reds do tip neste turno (push direto 7ffa3ef): movi o changelog fragment da #11050 da seção inválida breaking/ para fixes/, e rebaselinei AddApiKeyModal 1067->1073 (crescimento da #11056). Sem isso a #11039 e o resto da fila ficariam vermelhos.
diegosouzapw pushed a commit that referenced this pull request Aug 22, 2026
…dal Enter handler (#10995) (#11156)

Cherry-picked onto the current tip (authorship preserved), generated-count noise stripped. Pre-merge: file-size baseline rebaselined 1080→1082 with dated annotation (the +2 lines are the Enter-handler isCheckDisabled mirror — owner-requested #11056 polish; rest is Prettier reflow). Gate green; vitest add-api-key-modal-enter-key 2/2 (jsdom render test). Thank you @rqzbeh!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…iegosouzapw#10995) (diegosouzapw#11056)

⭐5 — onKeyDown Enter no input de chave da AddApiKeyModal dispara a validação. TDD. Fecha diegosouzapw#10995.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…es/ section + rebaseline AddApiKeyModal (1067->1073, diegosouzapw#11056 growth)
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…uzapw#11039)

⭐4 — Suporte de backend nativo Bun + Dockerfile.bun multi-stage + fallback dinâmico de driver SQLite (better-sqlite3 prioritário sob Bun, bun:sqlite fallback; Node preservado) + correção de estabilidade do DAST CI smoke.
Validado a fundo (worktree board sobre tip): bun-support 4/4, typecheck:core limpo, dashboard-typecheck OK (220 dentro do baseline), open-sse-typecheck OK (5 pré-existentes), gate de runtime OK sob Node, changelog-integrity OK, file-size/complexity/cognitive/dead-code OK. Verificado que o driver preserva a cadeia Node/falback conforme AGENTS.md; teste bun-support presente. Baselines de typecheck removidos são ratchet honesto (erros não existem mais).
OBS: destravei 2 base-reds do tip neste turno (push direto c4ce593): movi o changelog fragment da diegosouzapw#11050 da seção inválida breaking/ para fixes/, e rebaselinei AddApiKeyModal 1067->1073 (crescimento da diegosouzapw#11056). Sem isso a diegosouzapw#11039 e o resto da fila ficariam vermelhos.
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…dal Enter handler (diegosouzapw#10995) (diegosouzapw#11156)

Cherry-picked onto the current tip (authorship preserved), generated-count noise stripped. Pre-merge: file-size baseline rebaselined 1080→1082 with dated annotation (the +2 lines are the Enter-handler isCheckDisabled mirror — owner-requested diegosouzapw#11056 polish; rest is Prettier reflow). Gate green; vitest add-api-key-modal-enter-key 2/2 (jsdom render test). Thank you @rqzbeh!
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.

feat(dashboard): Enter in Add API Key credential field does not submit or check the key

2 participants