Skip to content

Show why a docs sync failed and keep the GitHub dialog current - #166

Merged
s3rot0n1n merged 2 commits into
mainfrom
fix/docs-sync-feedback
Oct 30, 2026
Merged

s3rot0n1n merged 2 commits into
mainfrom
fix/docs-sync-feedback

Conversation

@s3rot0n1n

@s3rot0n1n s3rot0n1n commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Three small fixes to the GitHub dialog in the admin (Settings → Integrations → GitHub → Manage). They came up while smoke-testing #147.

  • Why a sync failed. "What went wrong" printed only the error code (e.g. BROKEN_LINK). It now lists the failed sync's diagnostics, with the file, the location and the message. The API already sent these; the dialog wasn't showing them. It falls back to the code when a failure has no diagnostics.
  • No more stuck "Syncing". While a sync runs, the dialog polls the source status every 5 seconds and stops once the sync settles. A sync queued after a failure now counts as syncing, so retrying also updates on its own. While it runs, the old error is hidden.
  • Plurals. "1 files" now reads "1 file" in the setup, merge and preflight steps and in the proposals list.

Admin-only change; the API and public site are untouched. Rebased on main after #147; the GitHub dialog keeps #147's API reference panel, which still reloads when a sync starts or finishes.

Testing

  • check-types and ESLint pass for apps/web (no new warnings).
  • Browser smoke test against the GitHub test repo, with one Sync now click per step and nothing else:
    • Pushing a doc with a broken link moved the dialog from "In sync" to "Syncing" and then to "Latest sync didn't go live". It listed docs/<file>.md, the location in the page and "The target documentation page does not exist."
    • Reverting it went "Syncing" → "In sync" with no Refresh, and the old error was hidden during the retry.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T05:55:52.592811Z 61f26fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 61f26febc6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

verificationAttempt.current = attempt;
verifyMergedSetup();
}, [migration?.planId, migration?.status, migration?.pullRequest?.status, setupId]);
const polling = open && !wizardMode && source != null && syncInProgress(source);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Poll for syncs that start while the dialog is open

When the dialog opens with the source in sync and a GitHub push starts a sync afterward, this condition remains false, so no polling interval is installed. The local source is only refreshed by explicit actions, leaving the dialog showing stale status and missing the new run or its failure until the user refreshes or reopens it. Poll while the connected dialog is open, or subscribe to source updates, so it can observe runs that start after opening.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 09e447b: the dialog now polls the whole time it shows a connection, every 5 s during a sync and every 30 s otherwise, so a sync started by a push while it shows "In sync" is picked up. Checked in the browser: with the dialog open, a push moved it from the previous failure to "In sync" within 20 s, with no clicks.

- "What went wrong" lists the failed sync's diagnostics (file, location,
  message) instead of the bare error code.
- The GitHub dialog polls every 5 seconds while a sync runs, so it settles on
  "In sync" or the failure without clicking Refresh. A retry after a failure
  shows as syncing.
- File counts use the singular for one file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@s3rot0n1n
s3rot0n1n force-pushed the fix/docs-sync-feedback branch from 61f26fe to b3897bb Compare October 30, 2026 17:09
The dialog only polled once a sync was already running, so a sync started
by a push while it showed "In sync" went unnoticed until Refresh. It now
polls the whole time the connected dialog is open: every 5 s during a
sync, every 30 s otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@s3rot0n1n
s3rot0n1n merged commit 7fa4644 into main Oct 30, 2026
3 checks passed
@s3rot0n1n
s3rot0n1n deleted the fix/docs-sync-feedback branch October 30, 2026 17:29
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