feat(desktop): hide bots and resolved threads in the Pull request tab's Conversation

Merged
DA
3d ago
+442-10

C1 of the "Conversation filters and reactions" stack, on top of #3250 (feat/pr-tabs-layout).

What

Two toggles at the top of the Pull request tab's Conversation pane, ported from stage-cli's PR view:

  • Hide resolved hides every resolved review thread. Like stage-cli, it also hides a review once every one of its threads is resolved. A review with some threads still open stays, showing only those. Comments are never hidden by this toggle.
  • Hide bots hides every comment and review written by an App's bot, such as Devin or Vercel. It uses the bot flag the conversation read already carries.

Each toggle shows how many items it would hide, counted on its own, as soon as the conversation has been read. The switch's description gives the same count in words. When the filters leave nothing to show, the pane says "No matching comments."

The choice is kept the same way the File tabs' view settings are (file-view-settings.ts): in the renderer's storage under luke.conversation-filters. It applies to every pull request, survives relaunches, and starts with both toggles off. No new app setting is needed. keptOr is now exported from file-view-settings.ts so both modules use the same rule for reading stored values.

This PR is read-only: it makes no GitHub writes and no new requests. The header, the tab row, and PullRequestTabs are unchanged. The row sits inside the Conversation pane, above its scrolling page.

Screenshots

Both toggles off, then both on (fake data from a throwaway harness):

Filters off Filters on

Tests

agent-pull-request-tab.test.ts has two new tests:

  • The counts, both toggles, a review hidden once all its threads are resolved, and the choice still set the next time a conversation is drawn.
  • The "No matching comments." message.

pnpm check:affected passes.

Made with Luke


Devin Review


Summary by cubic

Adds Hide bots and Hide resolved toggles to the Pull request tab's Conversation pane, letting reviewers focus on human feedback.

  • Hide resolved hides every resolved review thread and any review whose threads are all resolved; Hide bots hides all comments and reviews from bot accounts.
  • Each toggle shows how many items it would hide; the choice persists in renderer storage across launches and pull requests.
  • When the filters hide everything, the pane shows "No matching comments."