fix(migrate): don't hijack user to Install mode when reconcile has work#747
Conversation
|
Claude finished @kaitranntt's task in 1m 59s —— View job Code Review — PR #747
SummaryThe fix is logically correct and well-targeted. The root cause analysis is accurate: the original Logic Walkthrough (
|
|
Claude finished @kaitranntt's task in 1m 23s —— View job Code Review — PR #747
SummaryVerdict: Approve. The fix is minimal, correct, and well-targeted. The root cause analysis is accurate and the guard logic covers all relevant scenarios without breaking the original fresh-install UX. Diff Walkthrough (
|
Closes #746. Clicking Run Migration in Reconcile mode triggers a reconcile request. When the response arrives with suggestedMode="install" (registry has unknown checksums), the smart-default effect auto-flipped the tab to Install mid-action and rendered a blank picker (install candidates are never fetched in the reconcile flow). Gate the auto-flip on the plan having zero actionable work. If the plan carries any install/update/delete/conflict action, the user's Reconcile tab choice stands. Fresh-install empty-plan cases still auto-switch to Install as intended.
b4a87be to
b41b2bd
Compare
|
Claude finished @kaitranntt's task in 2m 16s —— View job Code Review — PR #747
SummaryVerdict: Approve. The fix is minimal, correct, and well-targeted. Root cause analysis is accurate and all code paths are handled correctly. Diff Walkthrough (
|
Summary
Repro: open Migrate dashboard, uncheck Skills, select Codex, keep Reconcile mode, click Run Migration. UI flipped to Install tab with a blank picker and a disabled CTA.
Root cause
`MigratePage.tsx:521-527` applied `suggestedMode` from the reconcile response unconditionally on first arrival. Since `suggestedMode` only arrives in response to a user-triggered reconcile, the auto-flip always hijacks the user mid-action. The Install tab then renders blank because `installCandidates` are only fetched by a separate endpoint.
Fix
Gate the auto-flip on the plan having zero actionable work:
This preserves the original fresh-install UX where an empty registry steers the user to Install mode, while honoring an explicit Reconcile click when there's real work to review.
Test plan
Closes #746