Conversation
Adds checkboxes to the Pull/Push story lists so multiple stories can be synced in one go instead of one at a time. Each story is still pulled or pushed via its own authenticated request, conflict check, and pre-sync backup, run sequentially - the batch is just a loop over the existing per-story flow.
|
Warning Review limit reached
Next review available in: 18 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSyncModal now supports selecting multiple remote or local stories. It processes pulls and pushes sequentially, checks pull conflicts, imports before replacement deletion, tracks progress, and reports aggregate results. ChangesMulti-story sync
Estimated code review effort: 4 (Complex) | ~45 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds multi-select support to the Sync modal so users can pull/push multiple stories in one operation, while keeping the existing per-story sync flow (auth request, conflict check, pre-sync backup) and running it sequentially per selected story.
Changes:
- Replaced single-story selection with multi-select (checkbox-style UI) for both remote (pull) and local (push) story lists.
- Implemented sequential batch pull/push loops with progress display and summarized success/failure messaging.
- Expanded conflict warning UX to handle multiple conflicting story titles.
Suppressed comments (1)
src/lib/components/sync/SyncModal.svelte:467
ui.setSyncMode('syncing')happens beforesyncDirection = 'push'. If the syncing state renders between these updates, the UI may briefly show “Pushing…” with an incorrect direction (or default). SetsyncDirectionfirst.
ui.setSyncMode('syncing')
syncDirection = 'push'
loading = true
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/components/sync/SyncModal.svelte`:
- Around line 474-478: Preserve the currently active story in the batch-push
flow around the storiesToPush loop: capture the active story ID before
iterating, then restore that story after all pushes complete because
createPreSyncBackup can update StoryStore.currentStory. Keep each story’s backup
and push behavior unchanged, and ensure restoration also occurs when the batch
finishes through the existing completion path.
- Around line 405-417: Bind conflict confirmation to the selected remote-story
snapshot: in src/lib/components/sync/SyncModal.svelte lines 405-417, store the
checked story IDs and process only that snapshot after confirmation instead of
skipping checks based solely on showConflictWarning. In lines 719-739, prevent
selection changes while confirmation is pending, or clear the pending snapshot
and warning whenever the selection changes.
- Around line 454-456: Update the sync flow around story.loadAllStories() so
loading is always reset to false in a finally block, including when the refresh
rejects. Ensure reportBatchResult('pulled', ...) still executes appropriately
after a successful refresh without being skipped by the new error-handling
structure.
- Around line 433-441: Update the sync flow around findStoryIdByTitle,
pullStory, and importFromContent so it fetches the remote story and retains a
durable local export before deleting the existing story. Only call deleteStory
after the replacement import succeeds, preserving the pre-sync data until import
completion; do not rely on restoreCheckpoint.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d93d6cc7-9d0e-4887-b624-69169b684ed1
📒 Files selected for processing (1)
src/lib/components/sync/SyncModal.svelte
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/lib/components/sync/SyncModal.svelte`:
- Around line 722-726: Update the conflict messaging in SyncModal’s
conflictStoryTitles branch to replace “downloaded” with “imported,” accurately
reflecting that existing copies are removed only after importFromContent()
completes successfully.
- Around line 145-154: Make replacement imports atomic in the received-story
flow around importFromContent and the pulled-story flow at
src/lib/components/sync/SyncModal.svelte lines 442-459: use a transactional
replacement operation, or if unavailable, remove the newly imported copy when
deleteStory fails. Ensure failures do not leave both copies or report failure
after local data has already been inconsistently changed.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 202cc844-6941-45b6-8b79-8f950b5e6902
📒 Files selected for processing (1)
src/lib/components/sync/SyncModal.svelte
Code reviewFound 1 issue:
Aventuras/src/lib/components/sync/SyncModal.svelte Lines 446 to 468 in 29ef984 A pre-scan of 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
Thanks for this — import-before-delete genuinely fixes a case where a failed download left the device with neither copy, and restoring the previously open story after a push batch is a good catch. +1 to @a-frazier's duplicate-title finding; a few more things I'd like you to check, in case I've misread the flow. The pre-sync backup is gone from both pull paths. A throw outside the per-item try leaves the modal stuck. A partial failure renders as a full success. Double-clicking "Pull N Selected" can start two batches. The conflict pre-check runs N sequential Heads-up: this and #446 both rewrite |
Adds checkboxes to the Pull/Push story lists so multiple stories can be
synced in one go instead of one at a time. Each story is still pulled or
pushed via its own authenticated request, conflict check, and pre-sync
backup, run sequentially, the batch is just a loop over the existing
per-story flow.
Summary by CodeRabbit