Fix stale prerequisite validation when switching from Docker to Podman#757
Fix stale prerequisite validation when switching from Docker to Podman#757Iamliuxiaozhen wants to merge 4 commits into
Conversation
|
Good catch, that was my mistake. I removed the import while replacing the async prerequisite check for |
Please restore it to the original line so there's no diff, thanks :) |
TibixDev
left a comment
There was a problem hiding this comment.
Assuming computedAsync is what breaks here for some reason, wouldn't it be easier to have a simple watch that directly reassigns containerSpecs? The operation isn't heavy enough to require the duplication check (or if it is, let me know), so we can avoid having a request counter and all that stuff.
Shouldn't it be like two lines that way? Just reassign as ref as you did and use an immediate watcher on the runtime.
Let me know. 😄
|
Oh and additionally, if it does take a longer time, we can have some boolean ref such as |
|
Thanks, updated this to immediately mark prerequisites as checking from the runtime picker change handler, clear the previous specs synchronously, and disable Next while the current runtime checks are running. I also simplified the watcher and removed the request counter. |
I can still click fast enough after selecting Podman in the drop down that it lets me through when it shouldn't. |
|
Thanks for re-testing. I moved the guard earlier than the |
Refactor setup step interactions to make runtime switching and step transitions safer and more consistent. - Add `beginContainerRuntimeChange(runtime)` and call it from menu item `pointerdown`, `keydown.enter`, and `click` handlers - Reuse the same function in `handleContainerRuntimeChange` to centralize runtime-change behavior - Skip runtime updates when the selected runtime is already active to avoid unnecessary prerequisite rechecks and state resets - Replace inline `currentStepIdx++` with `goToInstallLocationStep()` so advancing is blocked while checks are running or prerequisites are not satisfied This prevents redundant state churn and avoids moving forward before setup requirements are valid.fix(setup-ui): harden runtime switch and step navigation Refactor setup step interactions to make runtime switching and step transitions safer and more consistent. - Add `beginContainerRuntimeChange(runtime)` and call it from menu item `pointerdown`, `keydown.enter`, and `click` handlers - Reuse the same function in `handleContainerRuntimeChange` to centralize runtime-change behavior - Skip runtime updates when the selected runtime is already active to avoid unnecessary prerequisite rechecks and state resets - Replace inline `currentStepIdx++` with `goToInstallLocationStep()` so advancing is blocked while checks are running or prerequisites are not satisfied This prevents redundant state churn and avoids moving forward before setup requirements are valid.
Thanks. It's working well for me. Bear with us - we'll get it reviewed eventually :) |
Summary
This fixes a setup wizard bug where the
Nextbutton could remain enabled after switching the container runtime from Docker to Podman, even though Podman prerequisites had not been validated yet.What changed
containerSpecsstate with an explicitwatchoncontainerRuntimeWhy
The previous implementation could briefly reuse the old runtime's successful prerequisite result while the new runtime check was still in flight. That allowed users to continue with stale validation state.
Testing
Nextbutton is disabled immediately after switching runtimesRelated