Repository navigation
Keep a known PR badge when its machine is briefly unreachable - #6864
Merged
Merged
Conversation
After a server restart, sidebar reads re-check every restored PR before the host daemon reconnects. Each check came back "unavailable" and replaced the environment's known PR link, so the row badge disappeared until that thread was opened or the page refocused. A transient unavailable result for a known PR now leaves the last snapshot in place. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
After a server restart, the GitHub PR Status plugin restores each environment's PR from its database and serves it right away. It also starts a background re-check right away, often before the host daemon has reconnected. That re-check returned
unavailable("machine isn't available"), andstore.loadreplaced the environment's known PR link with that result. The sidebar row badge disappeared and stayed gone until something re-read that row, such as opening the thread or refocusing the page. Observed on prod: the server restarted at 13:04:14 and the daemon reconnected at 13:04:20. Afterwards the sidebar showed only #6849 (the thread that was opened). Six other inbox threads with open PRs (#6760, #6755, #6736, #6728, #6727, #6734) showed no badge, although their links and snapshots were still in the plugin database.What changed
plugins/github-pr-status/store.ts: when a re-check of a known PR URL comes backunavailable, the environment's link is no longer replaced, so the last snapshot keeps being served. The snapshot'sfetchedAtis still bumped, so the regular poll retries it. Discovery reads (no known URL) behave as before.bb pull-request showfor an environment whose machine is offline now prints the last PR bb saw, orunavailablewhen it has none. Actions (ready/draft/merge) still refuse with the machine message. The skill doc and README are updated.How you verified
unavailable, and checks that the PR is still served, nothing is published, and the next successful check publishes the update. It fails without the fix (expected { outcome: 'unavailable' } to deeply equal { outcome: 'available' }) and passes with it.pnpm exec turbo run test typecheck lint --filter=bb-plugin-bb--github-pr-status: 183/183 tests pass, typecheck and lint clean.🤖 Generated with Claude Code