Repository navigation
Refresh review board canvases automatically every 15 minutes - #5707
Conversation
Reuse the existing refresh routes while canvases are open, preserve local review state, and surface polling errors without clearing board data. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
🚦 Submission status: 👀 Ready for reviewRisk tier: Why this tier
Automated checks
Review
Commands
Updated for |
|
🟡 Contributor Reputation Check: MEDIUM risk
Maintainers: please review this contributor before merging. |
There was a problem hiding this comment.
🟡 Changes recommended
Automatic refresh can advance approval to a commit the maintainer has not reviewed.
2 open issues
What changed in this PR
Adds automatic refresh to the repository’s two maintainer review-board canvases so new PRs and external-plugin submissions appear without manual refresh.
Changes:
- Poll existing refresh routes every 15 minutes, skip overlapping ticks, and stop timers when canvases close.
- Show polling failures through the existing toast UI.
- Document polling behavior and add lifecycle and state-preservation regression coverage.
| File | Description |
|---|---|
| eng/board-preview.test.mjs | Checks selection, drafts, tabs, and action guards across snapshots. |
| eng/board-periodic-refresh.test.mjs | Adds polling cadence, concurrency, recovery, and lifecycle coverage. |
| .github/extensions/open-pr-board/README.md | Documents automatic refresh and regression tests. |
| .github/extensions/open-pr-board/public/app.js | Displays refresh-error toasts. |
| .github/extensions/open-pr-board/lib/server.mjs | Adds polling, overlap protection, and timer cleanup. |
| .github/extensions/external-plugin-review-board/README.md | Documents automatic refresh and regression tests. |
| .github/extensions/external-plugin-review-board/public/app.js | Displays refresh-error toasts. |
| .github/extensions/external-plugin-review-board/lib/server.mjs | Adds polling, overlap protection, and timer cleanup. |
Review effort: Max
Pin approvals to the displayed SHA and reject stale AI bulk reviews. Reload changed PR previews and invalidate plugin issue details after refresh without losing drafts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Capture queued-review and manual-approval heads so bulk actions cannot carry old choices onto new commits. Skip shared-server polling when no refresh handler exists. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Include head SHA and approval staleness in agent summaries, and prevent invalidated PR detail reads from overwriting current cached previews. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record obsolete-head feedback in history without installing a decision that would clear newer queues, reviews, or manual moves on refresh. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use commit provenance to clear old-head reviews, queues, and manual buckets while preserving state created for the current head. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
New PRs and external-plugin submissions currently appear only after a manual refresh. Both review boards now poll every 15 minutes while their canvas is open, using the existing read-only refresh routes and state merges.
Scheduled refreshes share in-flight fetches with manual refreshes, skip overlapping timer ticks, and stop when the canvas closes. Existing reviews, queue tokens, local decisions, manual buckets, selection, and staged feedback are preserved for items that remain on the board. Polling never starts AI reviews or performs GitHub writes. Failures use the existing logging and toast UI without clearing good board data, and subsequent polls can recover.
Type of Contribution
Additional Notes
Closing a canvas cancels future polls but does not abort an already running read. Existing refresh semantics still remove inactive items and update eligibility/staleness. Both board READMEs document the cadence.
Validation:
node --experimental-vm-modules --test --test-reporter=tap eng\board-periodic-refresh.test.mjs eng\board-state-storage.test.mjs eng\open-pr-board.test.mjs eng\external-plugin-review-board.test.mjs eng\external-plugin-review-board-state.test.mjs eng\external-plugin-review-board-ui.test.mjs eng\board-preview.test.mjs eng\board-bulk-actions.test.mjs eng\board-column-order.test.mjs eng\open-pr-board-drag.test.mjs eng\external-plugin-review-board-fixes-request.test.mjs .github\extensions\external-plugin-review-board\lib\github.test.mjs- passed, 132 tests.node --check .github\extensions\open-pr-board\lib\server.mjs- passed.node --check .github\extensions\external-plugin-review-board\lib\server.mjs- passed.node --check .github\extensions\open-pr-board\public\app.js- passed.node --check .github\extensions\external-plugin-review-board\public\app.js- passed.npm start- passed after restoring missing dependencies withnpm ci; generated README and marketplace outputs remain unchanged. Existing non-SPDX license warnings remain.bash eng/fix-line-endings.sh- passed.git diff --check- passed.Coverage includes exact cadence, repeated open, overlap with manual refresh, slow fetches, edits/review completion during fetch, queue and decision preservation, error delivery/recovery, close/reopen, close during a fetch, and selection/draft/tab/in-flight action state on live snapshots. Tests use fake GitHub reads and accelerated clocks. A live Copilot canvas test and a real 15-minute wait were not performed.
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.