Skip to content

fix: surface post-sync republish failures in the UI - #131

Merged
vboctor merged 1 commit into
mainfrom
fix/republish-error-visibility
May 22, 2026
Merged

vboctor merged 1 commit into
mainfrom
fix/republish-error-visibility

Conversation

@vboctor

@vboctor vboctor commented May 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • When auto-republish after sync fails (e.g. expired Cloudflare credentials), the error was written to job.status briefly before being overwritten by "completed" — invisible at the 500 ms poll interval
  • Add republishError field to SyncJob so the error persists independently of sync completion status
  • SyncProgress now shows a warning banner after the job finishes when republishError is set

Root cause

The catch block in startSyncJob set job.status = "republish failed: ..." then immediately job.status = "completed" — both assignments happen before the next poll tick, so the error was always missed.

Test plan

  • Trigger an incremental sync on a published collection with invalid/expired Cloudflare credentials
  • Verify the sync shows "Done" and the warning banner appears: "Sync completed but auto-republish failed: ..."
  • Verify a successful republish shows no warning banner
  • bun run ci passes ✅

🤖 Generated with Claude Code

When the auto-republish triggered after a sync fails (e.g. expired
Cloudflare credentials), the error was written to job.status briefly
before being overwritten by "completed" — invisible at 500ms polling.

- Add `republishError` field to SyncJob so the error persists
  independently of the sync completion status
- SyncProgress now renders a warning banner after the job finishes
  when `republishError` is set, so the user always sees it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vboctor
vboctor force-pushed the fix/republish-error-visibility branch from e5cdf61 to f26b7d1 Compare May 22, 2026 05:32
@vboctor
vboctor merged commit 6d92754 into main May 22, 2026
1 check passed
@vboctor
vboctor deleted the fix/republish-error-visibility branch May 22, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant