fix(ui): keep update credentials wizard open#10675
Conversation
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
|
✅ All necessary |
🔒 Container Security ScanImage: ✅ No Vulnerabilities DetectedThe container image passed all security checks. No known CVEs were found.📋 Resources:
|
There was a problem hiding this comment.
Hey!
I spotted one thing that I think introduces a subtle regression though:
/providers is never revalidated in the update flow
After this PR, the full update-credentials chain looks like:
updateCredentialsProvider→handleApiResponse(response)— no revalidationcheckConnectionProvider→handleApiResponse(response)— no revalidationLaunchStep→ callsscanOnDemand/scheduleDaily→ revalidates/scans, not/providershandleClose()→ resets wizard state, closes modal — no revalidation
So the /providers page data is never refreshed after the user updates credentials through the wizard. Any changes that should be reflected in the providers table (connection status, credential type, etc.) will stay stale until a manual page refresh.
The PR description says "revalidation deferred to the connection test step", but checkConnectionProvider also had its "/providers" removed — so the revalidation isn't deferred, it's gone entirely.
Suggested fix
The controller fix (removing the early-return in handleTestSuccess) is what actually solves the modal-closing bug. I think we can safely restore revalidatePath in checkConnectionProvider:
// checkConnectionProvider
return handleApiResponse(response, "/providers");Since the modal no longer remounts on revalidation (the early-close is gone), this should keep the wizard open and ensure the providers table shows fresh data when the user eventually closes it.
The removal in updateCredentialsProvider is fine to keep — revalidating at connection-test time is enough.
Let me know what you think!
|
Fixed the wizard flow end to end. The root cause was that the provider wizard modal was mounted inside table rows, so every refresh of the providers page could remount the row and close the modal. I moved the wizard to a stable page-level host and wired row actions and Add Provider to open that shared modal instead. With that change in place, the providers table now refreshes after:
and the modal stays open through each intermediate step until the flow actually finishes. I also fixed the action label so rows without a secret show Add Credentials instead of Update Credentials. Tests updated and passing locally. @alejandrobailo @pfe-nazaries could you please take another look? |
alejandrobailo
left a comment
There was a problem hiding this comment.
The changelog must be for the .24
|
Fixed. Moved the changelog entry out of the released 1.23.0 block into a new |
- avoid providers revalidation during credential updates - add regression coverage for add and update credential actions
- add changelog entry for update credentials wizard fix - add inline comment explaining why revalidation is omitted - add test verifying checkConnectionProvider still revalidates
- send update flows to the launch step after a successful test - avoid providers revalidation during connection checks inside the wizard - cover the launch transition with regression tests
- move the providers wizard to a stable page-level host - refresh providers data after link, authenticate, and connection checks - update provider actions and tests for the shared wizard flow
0669e60 to
0c9df42
Compare
Context
Updating provider credentials in the providers table wizard was closing the modal after a successful connection test, which prevented users from reaching the final launch step and starting a scan from the same flow.
Description
/providersduring wizard connection checks to avoid remounting the row-level modal in Next 16Steps to review
/providersUpdate CredentialsCheck connection, clickCheck connectionLaunch scansteppnpm run healthcheckpnpm test:run actions/providers/providers.test.tspnpm test:run components/providers/wizard/hooks/use-provider-wizard-controller.test.tsxChecklist
Screen.Recording.2026-04-14.at.12.43.15.mov
Community Checklist
SDK/CLI
UI (if applicable)
API (if applicable)
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.