This repository was archived by the owner on May 13, 2026. It is now read-only.
fix(onboarding): surface Apple import start failures instead of auto-advancing - #876
Merged
Merged
Conversation
…advancing AppleDataStep silently swallowed every appleImport* rejection in its for-loop, then set allDone=true whenever Object.keys(progressIds).length === 0. If all five sources failed (backend down, permission denied, source not available) the wizard rendered the green "Continue" button as if nothing went wrong — violating the project's "no silent failures" rule. - Track per-source error messages in failedSources state alongside progressIds. - Catch and the success-but-no-progress_id branch both record into failedSources. - Render a failure summary card (role="alert") listing each failed source's label and error. - When every source failed (no progress_ids, only failures) leave allDone=false and show a Retry button next to Skip; Continue stays hidden. - Retry clears state and re-runs handleImportAll on the still-enabled sources. - Add vitest coverage in test/components/onboarding/AppleDataStep.test.tsx for the all-fail path: failure list renders, no Continue, Retry re-attempts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
appleImport*rejection in its for-loop, then auto-setallDone=truewheneverprogressIdscame back empty. If every selected source failed (backend down, permission denied, etc.) the user saw the green Continue button as if nothing had gone wrong. That violated the project's "no silent failures" rule.failedSourcesstate alongsideprogressIds. Both the catch block and thesuccess===false || no progress_idbranch now record an error message keyed by source.role="alert",data-testid="apple-import-failures") listing each failed source's label and error message.progressIds, onlyfailedSources), leaveallDone=falseand render a Retry button next to Skip instead of Continue. Retry clears the failure state and re-runshandleImportAllon the still-enabled sources.Test plan
npm test -- AppleDataStep— new vitest suite: 3 cases covering "no Continue when all fail", "failure summary lists each label + message", "Retry re-runs without auto-advancing"npm test— full vitest suite, 56 files / 679 tests passingnpm run typecheck— clean🤖 Generated with Claude Code