Skip to content
flow

FeaturesPull requests

Pull requests

Track the PRs that need you on the Reviews and My PRs pages, open any PR from its session, and merge, ready or close it without leaving Flow.

View as Markdown
On this page

Flow keeps your pull requests next to the sessions that make them. Every session on a branch with a PR shows it in its header, one shortcut opens it as a review tab, and the merge, ready, draft, close and auto-merge changes run from the palette. Two queue pages, Reviews and My PRs, gather the PRs that want something from you across every repository, sorted into sections you define.

This page covers the queue pages, the PR pill and the status changes. Reading a PR, commenting, reviewing, requesting reviewers and review sessions are on PR review. To have an agent keep several sessions moving toward a mergeable draft PR, see the babysit-prs skill in Agent skills.

Note: The Reviews and My PRs pages are an experiment (BETA). Turn them on in Settings › Experiments (features.pull_requests). While it is off, neither page appears anywhere (the Tools band, the palette's Go to rows) and the queue never fetches. The PR pill, PR review tabs, ⇧⌘G / ⌥⌘R, the palette's PR status changes and PR review sessions work with the experiment off.

Before you start

Flow reads and writes GitHub through the GitHub CLI. Install gh and sign in with gh auth login.

  • Reads go through the read CLI in git.cli, by default the bundled ghx, a caching client that shows cached data at once and refreshes it in the background. Plain gh works too. See ghx and gitx.
  • Writes (merges, comments, reviews) go through ghx while it is the read CLI, which hands them to gh; with any other read CLI they run gh itself.
  • A review tab reads PRs on github.com or on one GitHub Enterprise Cloud tenant (NAME.ghe.com). The Reviews and My PRs funnels search github.com only.

The PR pill

A session whose branch has a pull request shows a PR pill at the right of its primary pane's header: the state glyph in the PR colours, # and the number, a dim state word (Draft, Open, Merged or Closed) and the checks as passed over total (✓ 3/4).

Click the pill to open the pull request:

  • With git.open_pr_in_review on (the default), it opens as a PR review tab in that session. A review tab already open on that PR is focused instead of opening a second one.
  • With it off, or for a PR on a host the review tab can't read, it opens in your browser.

A narrow header drops the PR pill before the branch pill. The pill shows on the Sessions page; a collapsed primary pane has no header.

Open a pull request

ActionDefaultWhat it does
Open pull request⇧⌘GOpens the session's PR by the PR pill's rule: a review tab while git.open_pr_in_review is on, else the browser.
Review pull request⌥⌘RAlways opens the session's PR as a review tab.
Open PR as session…unboundOpens any PR as its own review session. See PR review sessions.

On the Sessions page these act on the active session; on the Dashboard, on the focused card. When Flow has no PR cached for the branch yet (one opened since the last poll), ⇧⌘G and ⌥⌘R ask GitHub first and open it when the answer lands.

A review tab opened this way is pinned to the front of its pane's tabs, so ⌘W keeps it until you unpin it. Turn git.pin_pr_review_tab off to open it as an ordinary tab.

Change a pull request's status

These actions change the session's pull request through gh. On the Sessions page they act on the active session, on the Dashboard on the focused card. Each is in the command palette (⇧⌘P) and can be bound in Settings › Keyboard.

ActionDefaultRunsWhen it applies
Merge pull request⇧⌘Mgh pr merge N --squash (the git.merge_method strategy)Open, not a draft, mergeable, no check failing or pending, not blocked or behind its base
Mark PR ready for reviewunboundgh pr ready NAn open draft
Convert PR to draftunboundgh pr ready N --undoAn open PR that is not a draft
Close pull requestunboundgh pr close NAny open PR
Enable auto-mergeunboundgh pr merge N --auto --squashAn open PR that can't merge yet and isn't a draft
Disable auto-mergeunboundgh pr merge N --disable-autoWhile auto-merge is on
Change PR status…unboundOpens a picker of the changes aboveAny open PR
  • The palette is context-aware: opened beside a session, it lists only the changes that apply to that session's PR, and Change PR status… shows the rest dimmed.
  • A change that doesn't apply is refused with a toast that says why, for example "Cannot merge pull request: a draft cannot be merged".
  • Only one change runs per session at a time. A toast shows the progress ("Merging #12…") and the outcome.
  • A merged or closed PR offers no changes; there is no reopen.
  • A merge never deletes the branch.

The same changes are in the status selector of a Dashboard card's PR label (see Dashboard) and of a review tab's state chip (see PR review).

Merge method

git.merge_method picks the strategy for Merge and Enable auto-merge: squash (the default), merge or rebase. Any other value counts as squash. A repository usually allows one strategy, so a team can set it for its repository and your own override still wins. Set it per repository in Settings › Repos; see Settings scopes.

The Reviews and My PRs pages

  • Reviews lists the pull requests other people want from you: review requests, re-requests and unreplied @mentions.
  • My PRs lists the pull requests that are yours: authored by you, assigned to you, or carrying your commits.

Open them from their rows in the sidebar's Tools band, from the palette's Go to Reviews and Go to My PRs (both unbound), or from a terminal:

sh
flow-cli page pr_reviews
flow-cli page my_prs

Each page has the queue on the left and, on the right, a preview of the selected PR (or the Customize panel). Drag the preview's left edge to resize it (300 to 900 px, one width for both pages); double-click the edge to reset it to 360 px.

How a PR gets on a page

  1. Funnel. Each page has a list of GitHub search queries. Their results together are the watch set. Everything after this step runs locally.
  2. Mine fingerprint. A set of clauses, each toggleable, that decide which PRs are yours. My PRs shows what its funnel found plus every watched PR that matches the fingerprint. Reviews never shows a PR that matches it.
  3. Admit (Reviews only). Of what the Reviews funnel found, only PRs that pass this query are shown. By default that is review:requested OR mention:unreplied: a review requested from you or one of your teams, or an @mention you haven't answered. An empty Admit admits nothing.
  4. Sections. A sieve: in order, each section takes the PRs its query matches that no earlier section took. Whatever is left falls to Everything else, which is always last in the sieve.

Within a section, pinned PRs come first in pin order, then the rest by the page's sort: newest activity first by default.

Refreshing

The queue fetches at launch, every 5 minutes while a page is shown, every 15 minutes while you are elsewhere and the page is in the Tools band (for its badge), and when you enter a page whose last fetch is over a minute old. It also refetches when ghx reports a change and a moment after you edit a funnel. The title bar's refresh button reads fresh from GitHub. The last result is saved, so both pages show their PRs at launch before the first fetch.

A fetch error shows as a quiet line in the title bar; only the refresh button raises a toast.

Rows

Each row shows the PR's state colour, up to three labels, repo #N, the author, a reason line, your local tags and pin, the size as +A −D, a checks dot and the age. A PR you haven't seen since its last update carries an unread dot where the page shows dots. Leaving a PR selected in the preview for a second marks it seen.

The reason line says why the PR is there, first match wins: ignored, snoozed, woke up, @mentioned and unreplied, or draft. Then on My PRs: changes requested, approved, "Yours via" the fingerprint clause that matched (when someone else authored it), or waiting on review. On Reviews: re-requested (with the number of commits since your review), you approved, requested you (turning warmer once the request is over 48 hours old), via a team, or involved.

Badge and unread dots

Each section has a bell. A belled section counts toward the page's badge in the sidebar; on Reviews it also shows unread dots. The badge counts the PRs in belled sections. My PRs shows no unread dots by default. A muted section is shown dimmed.

The preview

The preview of the selected PR shows, top to bottom:

  • an amber Needs your reply callout for an unreplied @mention, with Reply, Resolve and Open thread buttons that open the PR's review session;
  • an excerpt of the description;
  • the Files, Diff and Threads counts, the checks and the reviewers;
  • the Local box: Pin, Snooze, your tags and an "Until query…" field (see below);
  • the main button: Start review on Reviews, Open PR session on My PRs, or Resume review when a review session on the PR is already open. It opens the PR as a review session; see PR review sessions.

Default sections

Reviews sectionQueryBell
Pinnedlocal:pinnedon
Needs responsemention:unrepliedon
This sprinttag:this-sprinton
Re-requestedreview:re-requestedon
Asked me directlyreview:requested-me -review:approved-by-meon
Quick team reviewsreview:team size:<300on
Dependency bumpsauthor:bot OR label:dependenciesoff
Everything else(whatever is left)off
Waiting on CIchecks:pending OR checks:failoff
Draftsis:draftoff
Snoozedlocal:snoozedoff
Ignoredlocal:ignoredoff
My PRs sectionQueryBell
Pinnedlocal:pinnedon
Needs responsemention:unrepliedon
Changes requestedreview:changes-requestedon
Failing checkschecks:failon
Agent PRs to vetauthor:boton
Ready to mergereview:approved checks:passoff
Everything else(whatever is left)off
Draftsis:draftoff
Snoozedlocal:snoozedoff
Ignoredlocal:ignoredoff

Both tables are in display order. The sieve order differs: Pinned, Ignored and Snoozed catch first, so a pinned, ignored or snoozed PR lands in that section whatever else it matches.

The default funnels are is:pr is:open involves:@me and is:pr is:open review-requested:@me for Reviews, and is:pr is:open author:@me and is:pr is:open assignee:@me for My PRs. The default fingerprint is author:@me, assignee:@me, commit-email:@me and co-author:@me, all on, plus a head: branch-prefix clause that starts off.

Pin, snooze, ignore and tag

These annotations live only in Flow and are never sent to GitHub. They are kept in ~/.flow/pr_local.json and apply on both pages. Right-click a row for Pin and Snooze, or use the preview's Local box.

  • Pin (P) puts the PR at the top of its section, in pin order, and into the Pinned section. Pinning clears a snooze.
  • Snooze for a while: 1 hour, tomorrow at 9:00, or Monday at 9:00, in your local time. Snoozing unpins.
  • Snooze until… something happens: new commits (commits:new), checks pass (checks:pass), re-requested (review:re-requested) or @mentioned (mention:unreplied). For anything else, type a query in the Local box's "Until query…" field and press ↩; the PR wakes while that query matches.
  • Forever · ignore (E) moves the PR to Ignored until you stop ignoring it (E again, or Stop ignoring in the menu).
  • A woken PR returns to its normal section with a "Woke up" reason and matches local:woke. The snooze stays until you clear it with Wake now.
  • Tags are free words, trimmed and lower-cased. Filter on them with tag:NAME, as the default "This sprint" section does with tag:this-sprint.

Keyboard

With no field focused on a queue page:

KeyAction
↑ / ↓ or J / KMove the selection
↩Start or resume the selected PR's review session
PPin or unpin
EIgnore, or stop ignoring
⌘CCopy the PR's link
/Focus the search box
EscClose Customize, else clear the search

In the search box ("Filter by title, repo, author"), ↑ / ↓ still move the selection and Esc clears the search, then leaves the box. Other ⌘ chords keep their usual meaning.

Customize a page

Click Customize in a page's toolbar to replace the preview with the editor. Edits save as you type. Reset to defaults restores the page's built-in configuration.

  • Funnel · GitHub search: one GitHub search query per row, + Add query to add one. The queue refetches once you stop typing. Past 100 watched PRs the page suggests narrowing the funnel.
  • Mine fingerprint (on My PRs): the clauses that make a PR yours; each has an on/off check, and + Add clause adds one. Each clause shows how many open PRs it matches. Reviews uses the same fingerprint to leave your own PRs out.
  • Admit (on Reviews): the query a funnel PR must pass.
  • Sections: the Sieve tab (what catches) orders the sections for catching, with Catch earlier / Catch later, delete and + Add section. The Display tab (what shows first) orders them on the page with Show higher / Show lower. A new section is named "New section", has an empty query (which matches nothing) and starts belled. Click a section's bell to count it toward the badge or not, and its dim toggle to show it dimmed.

Each page's configuration is a JSON value in your settings: pr.reviews and pr.mine. Besides what Customize edits, it holds sort (updated, the default: newest activity first; created: newest opened first; size: smallest first; age: oldest opened first) and dots (whether the page shows unread dots).

Query language

Fingerprint clauses, the Admit query, section queries and "Until" snoozes share one local query language. (Funnels are GitHub search strings and use GitHub's syntax.)

  • Terms separated by spaces must all match.
  • A standalone OR (upper case) separates alternatives; any alternative may match.
  • A leading - negates a term.
  • There are no parentheses and no quoting, so a label with a space can't be named.
  • An empty query matches nothing.
  • A term Flow doesn't know (a bare word, an unknown key or value, a malformed comparison) is flagged as Unknown term: … and fails its whole alternative, so a typo never widens a query.
TermValuesMatches
review:requestedA live review request from you or one of your teams
requested-meA request from you directly
teamA request via a team only
re-requestedA live direct request after you submitted a review
approved, changes-requested, noneGitHub's review decision
approved-by-meYour latest review approves
checks:pass, fail, pending, noneThe head commit's checks rollup
author:@me, bot, a loginWho opened the PR
assignee:@me, a loginWho it is assigned to
commit-email:@me, an addressThe commits' author emails
co-author:@me, an addressThe commits' Co-authored-by: trailers
head:a branch, or a prefix ending in *The head branch (case-sensitive)
label:a label nameA label on the PR
repo:owner/name or nameThe repository
tag:a local tagYour Flow tags
is:draft, unreadA draft; changed since you last saw it
commits:newNew commits since you last saw it (or since your review)
mention:unreplied, unresolved, anySomeone else @mentioned you
local:pinned, snoozed, ignored, woke, anyYour annotations
age:>2d, <=12h, >1wHours since opened (units h, d, w; h by default)
size:<300Additions plus deletions
threads:>0Unresolved review threads

Keys are case-insensitive. Logins, labels, repositories and emails compare ignoring case; the values of the fixed keys are exact lower-case words. A comparison is an optional >, >=, < or <= (none means equal) and digits.

mention:unreplied means an unresolved review thread holds someone else's comment mentioning you with no comment of yours after it, or a top-level comment mentioning you that you haven't answered with a later top-level comment. unresolved adds mentions in unresolved threads you did answer; any is a mention anywhere, the description included.

@me in commit-email: and co-author: means any of your emails: git config --global user.email plus the addresses in the pr.me.emails setting (a JSON array of strings).

Some examples:

text
review:requested -review:approved-by-me
checks:fail OR checks:pending
author:bot label:dependencies
size:<300 age:<2d

Settings

KeyTypeDefaultEffect
features.pull_requestsbooleanfalseShows the Reviews and My PRs pages (Settings › Experiments)
git.open_pr_in_reviewbooleantrue⇧⌘G, the PR pill and a Dashboard card's PR label open a review tab; off, the browser
git.pin_pr_review_tabbooleantrueA review tab opened by ⇧⌘G, the PR pill or ⌥⌘R is pinned to the front of its pane
git.merge_methodsquash, merge or rebasesquashStrategy for Merge and Enable auto-merge
git.clitextghxThe program that reads PR data; empty means ghx
git.asyncbooleantrueServe cached data at once and refresh in the background; not available with plain gh
pr.reviewsJSON objectbuilt-inThe Reviews page's funnel, Admit, sections, sort and dots
pr.mineJSON objectbuilt-inThe My PRs page's funnel, fingerprint, sections, sort and dots
pr.me.emailsarray of stringsnoneExtra addresses @me matches in commit-email: and co-author:

The git.* toggles are under Settings › General › Pull requests. git.open_pr_in_review and git.pin_pr_review_tab can differ per repository but are never set by a team file.

Limits

  • The funnels search github.com only; GitHub Enterprise funnels aren't supported.
  • Team review requests need your teams. If Flow can't read them (for example a token without read:org), every team request counts as yours.
  • Mention detection reads each PR's newest 20 review threads and the newest 10 comments in each, so a mention only in an older thread doesn't count as unreplied.
  • Flow doesn't create pull requests; open them with gh pr create or your agent.
Sources

Written from these files in the Flow app repo

  • src/pr_tool.rs
  • src/pr_tool_ui.rs
  • src/pr_query.rs
  • src/pr_local.rs
  • src/pr_queue.rs
  • src/pr_status.rs
  • src/gh.rs
  • src/infobar_ui.rs
  • src/main.rs
  • src/pages.rs
  • src/command.rs
  • src/dashboard_ui.rs
  • src/settings_catalog.rs
  • src/settings.rs
  • src/scope.rs
  • src/features.rs
  • src/bus_exec.rs
  • docs/settings-scopes.md
  • agent-skills/babysit-prs/SKILL.md