Merged
Conversation
…r check Move `disposeGlobal` call inside the success-only branch so the extension is not torn down when migration partially fails. Similarly, defer the `loadSessions` webview message to the "Continue" button on the error screen so sessions are only reloaded after the user acknowledges the failure. - `handleStartLegacyMigration`: move `disposeGlobal` inside the `!failed && success` guard to avoid disposing on partial failure - `MigrationWizard`: skip `loadSessions` post-message when errors are present; send it from the "Continue" button instead
…tor utilities Replace inline error text rendering in MigrationWizard with a dedicated MigrationError component that displays a structured error box with a copy-to-clipboard action. Extract error parsing logic into reusable selector functions in a separate module. - Add `MigrationError` component with header, detail text, and preformatted error code block; copy button writes error to clipboard and shows a success toast - Add `error-selectors.ts` with `getMigrationError` (strips error type prefix), `getSessionMigrationError`, and `getSessionMigrationErrorDetail` - Replace `<Show>` + raw `error-text` div in MigrationWizard sessions row with `<MigrationError>` using the new selector-derived signals
…vations Extract `ProgressEntry` type and inline derived-state functions from `MigrationWizard` into a dedicated `migration-view-model.ts` module, and update call sites to use the new public API. - Add `migration-view-model.ts` exporting `ProgressEntry`, `getGroupStatus`, `getGroupMessage`, `getSuccessCount`, `getTotalCount`, `getCurrentSessionError`, and `getCurrentSessionErrorDetail` - Remove duplicated logic from `MigrationWizard` and delegate to the new module, keeping the component focused on rendering concerns - Consolidate the `getGroupMessage` resolver used by error selectors so it is derived from a single source of truth
Move `MigrationResultItem` out of `legacy-types.ts` into a new `migration-types.ts` module, and introduce a `MigrationFailure` typed error structure in `errors/migration-failure.ts`. - Add `migration-types.ts` exporting `MigrationResultItem` to separate runtime migration result types from legacy configuration types - Add `errors/migration-failure.ts` defining `MigrationFailure` and `MigrationFailureKind` for structured error classification - Remove `MigrationResultItem` from `legacy-types.ts` to eliminate the coupling between legacy config shapes and migration output types - Update `migration-service.ts` import to reference the new module
Introduce `migration-error.ts` with `normalizeMigrationError` and `getMigrationErrorMessage` to convert arbitrary thrown values into typed `MigrationFailure` objects. - Classify errors by kind (`http`, `sdk`, `generic`, `unknown`) based on the presence of `status`, `data`, `body`, or `Error` instance - Extract human-readable message from `message`, `body`, `data`, or raw string fallback, defaulting to "Unknown migration error" - Compose a `detail` string from status code, body, and data fields when they differ from the primary message - Propagate nested `cause` text for additional diagnostic context
Remove the separately extracted `migration-view-model.ts`, `error-selectors.ts`, `MigrationError.tsx`, and `MigrationFailure` type in favour of inlined logic directly in `MigrationWizard` and a simplified `getMigrationErrorMessage` utility. - Delete `MigrationFailure` type and `normalizeMigrationError`; replace with a flat `getMigrationErrorMessage` function - Inline `ProgressEntry` interface, group-status logic, and count helpers into `MigrationWizard` - Replace `MigrationError` component with inline clipboard copy handler using `showToast` - Simplify session migrate result shape: drop structured `error` field, surface plain `message` string instead
…wizard Add CSS for the error display box and copy-to-clipboard button in the migration wizard, including layout, typography, theming via VSCode CSS variables, hover/active/focus-visible states, and high-contrast border overrides. Also align wizard items to flex-start for multi-line content.
markijbema
reviewed
Mar 31, 2026
| </Show> | ||
|
|
||
| {/* Cleanup option after done */} | ||
| {/* |
Contributor
There was a problem hiding this comment.
Why is this code commented out?
Contributor
Author
There was a problem hiding this comment.
Shows the following button - Which deletes legacy settings. I think the cautious move for now is to not have it in place.
Screen.Recording.2026-03-31.at.17.48.54.mov
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 216,800 tokens |
markijbema
approved these changes
Mar 31, 2026
… all sessions Replace the single "Chat sessions" progress item with per-session tracking, passing the session ID directly to onProgress calls and mapping each session to its own pending item in the wizard's progress list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Adds error handling so that users see an error on Session migration. See video attached.
Temporarily commenting out the option to "Delete all Legacy Settings" so users can retry migration or go back to the old extension if migration fails.
Known limitation: Only handles session migration at the moment. Doesn't cover failures migrating other elements.
Video
Screen.Recording.2026-03-31.at.12.31.22.mov
Testing