[FIX] Reviews tab: GitHub-approved PRs leave open work - #16
Merged
Merged
Conversation
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.
Why
A PR approved on GitHub kept sitting under "open work". Two causes:
review-requested:search — the approval was never collected. The row survived only via its offline review file, which carries no GitHub state.my_reviewtook the single most recent review event. A later thread reply lands as a COMMENTED review and masked a standing approval.What
reviewed-by:<login>search incollect.shwritesmy_reviews.json(url → my effective review state) for open PRs I already reviewed; best-effort, a failed fetch keeps the previous file.my_reviewis now the effective state: the newest APPROVED / CHANGES_REQUESTED wins over trailing COMMENTED events (last:10instead oflast:1).build.pyships the map asDATA.my_reviews; the page seedsGH_MY_REVIEWfrom it, so the existing decided logic and the "✓ approved on GitHub" pill now cover rows with no live request too.Verified: shellcheck, py_compile, CI script-extraction + node --check, jq fixtures for the effective-state expression (approve-then-comment stays APPROVED), and the live
reviewed-byquery returns the expected APPROVED map.