Skip to content

Show GitHub approval and bot reviews by default - #73

Merged
tcamise-gpsw merged 2 commits into
mainfrom
fix/review-cell-github-approval
Nov 9, 2026
Merged

tcamise-gpsw merged 2 commits into
mainfrom
fix/review-cell-github-approval

Conversation

@tcamise-gpsw

Copy link
Copy Markdown
Collaborator

Summary

Copilot approvals did not turn the Reviews cell green. Two causes:

  • review_label used GitHub's reviewDecision only when the PR had no listed reviews. Pending reviewer requests and the bot filter masked an APPROVED decision, so the cell showed ◷ pending. GitHub's decision now wins unless a visible review requests changes. An approval given only by a hidden bot reads ✔ approved (bot).
  • reviews.show_bots now defaults to true, so bot reviewers such as Copilot are listed without pressing b. Set show_bots = false to restore the old behavior. The b toggle is unchanged.

Observed on gopro/infra-katalyst-platform#2297: reviewDecision: APPROVED, bot approver copilot-pull-request-reviewer, two pending human requests.

Testing

  • cargo fmt --all -- --check: passes (make preflight)
  • cargo clippy --workspace --all-targets --locked -- -D warnings: passes (make preflight)
  • cargo test --workspace --locked --no-fail-fast: passes (make preflight). The new test github_approval_by_a_hidden_bot_is_not_masked_by_pending_requests failed without the fix. Three tests that pinned the old default (keymap.rs x2, render.rs) were rewritten to assert default-visible bots and the toggle hiding them.
  • TUI smoke via make demo: N/A because the demo stack has no bot-approved PR and my PTY capture of make demo returned no text. The render contract is covered by TestBackend tests.

Docs and architecture

  • Living architecture docs updated / N/A because structure is unchanged. README Reviews cell description and config example updated.
  • ADR written for a significant decision / N/A because a display default and a label fix do not warrant one
  • cargo doc --workspace --no-deps --locked: passes; the new Default impl and field are documented

Notes for reviewers

  • Behavior change: users who relied on bots being hidden must now set show_bots = false.
  • The verdict is unchanged; it already used the bot-inclusive summary.

The cell fell back to reviewDecision only when no reviews were listed. Pending reviewer requests and the bot display filter therefore masked an APPROVED decision, so a Copilot approval read as pending or blank. GitHub decision now wins unless a visible review requests changes, and an approval given only by a hidden bot reads "approved (bot)".
reviews.show_bots now defaults to true so bot reviewers such as Copilot appear without pressing b. Set show_bots = false to restore the old behavior.
@tcamise-gpsw
tcamise-gpsw marked this pull request as ready for review November 9, 2026 16:35
@tcamise-gpsw
tcamise-gpsw merged commit 69994f8 into main Nov 9, 2026
5 checks passed
@tcamise-gpsw
tcamise-gpsw deleted the fix/review-cell-github-approval branch November 9, 2026 16:36
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