Skip to content
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
shiba4life merged 1 commit into
mainfrom
fix/apple-data-step-error-handling
May 5, 2026
Merged

fix(onboarding): surface Apple import start failures instead of auto-advancing#876
shiba4life merged 1 commit into
mainfrom
fix/apple-data-step-error-handling

Conversation

@shiba4life

Copy link
Copy Markdown
Collaborator

Summary

  • AppleDataStep silently swallowed every appleImport* rejection in its for-loop, then auto-set allDone=true whenever progressIds came 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.
  • Track per-source error messages in failedSources state alongside progressIds. Both the catch block and the success===false || no progress_id branch now record an error message keyed by source.
  • Render a failure summary card (role="alert", data-testid="apple-import-failures") listing each failed source's label and error message.
  • When every source failed (no progressIds, only failedSources), leave allDone=false and render a Retry button next to Skip instead of Continue. Retry clears the failure state and re-runs handleImportAll on 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 passing
  • npm run typecheck — clean
  • Manual dogfood on macOS once merged

🤖 Generated with Claude Code

…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>
@shiba4life
shiba4life enabled auto-merge May 5, 2026 18:12
@shiba4life
shiba4life added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit 112e5a2 May 5, 2026
12 checks passed
@shiba4life
shiba4life deleted the fix/apple-data-step-error-handling branch May 5, 2026 18:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant