Skip to content

feat: v0.11 Sweep - #1

Merged
hazeliscoding merged 26 commits into
mainfrom
release/v0.11
Sep 28, 2026
Merged

hazeliscoding merged 26 commits into
mainfrom
release/v0.11

Conversation

@hazeliscoding

@hazeliscoding hazeliscoding commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

The v0.11 milestone from ROADMAP.md: every PR that needs a human shows up once, with the reason and the next step. This stays a draft until the milestone's "Done when" holds. Steps 1–9 are done: the performance groundwork, the data, the attention engine, the Sweep section, snooze and the tray line. Step 10 is the release.

It also carries 66008e9 (build each roadmap release on its own branch), which was committed on main locally but never pushed.

Done so far

  • Sweep timing. With PRSWEEP_DEBUG set, every sweep logs one [sweep] line: mode, duration, requests and retries. Every retry logs its reason and wait. desktop/e2e/bench-sweep.mjs times sweeps against the live API with the app's own code.

  • Snapshot schema. Cached sweeps carry SWEEP_SCHEMA (now 3). A snapshot from another schema is never painted or patched, so the first refresh after an update is a full one.

  • Merged PRs in parallel weekly windows, at most 4 in flight, instead of paging through the whole range one request at a time.

  • Page-size fallback. A search page that times out (502/504, or a 200 with a cut-off body) is re-sent at 50, then 25, before the normal retries. Whole-org views of big orgs used to fail outright.

  • Remembering shrunken page sizes across searches was tried and reverted (dcc7e8a): it doubled requests and made whole-org sweeps slower.

  • The data (e1fc4e8):

    • Open means open now. The open sections show every open PR by the team: those updated since the range start, plus those carried over from before it, fetched in two parallel searches. The range end no longer limits open PRs.
    • Review requests to teams count, and the Awaiting column shows them as org/team.
    • The last commit's time is fetched.
    • mergeable and the latest reviews come from a follow-up nodes(ids:) query, only for approved, changes-requested and unrequested needs-review PRs. It runs while the merged search is still in flight. If that query fails, the sweep still succeeds without those fields.
  • Attention engine (desktop/src/main/core/attention.ts): a pure function that gives every open PR its reasons (CI failing, merge conflict, changes not addressed, needs re-review, approved but not merged, no reviewers, waiting for review, stale, old draft), each with how long it has held and a next step. It runs in prs:fetch after every sweep, cached rows included, and also returns the sprint-end risk. Schema 4.

  • Sweep section at the top of the board: reason, age, chips for other reasons, and a next-step button that opens the PR, its checks or its files. The sprint-end line appears in the range's last two days.

  • Quiet rows keep the Sweep short. A flagged row goes quiet when its worst reason is a slow one (waiting, stale, old draft) or nobody has touched the PR in 30+ days. Quiet rows sit behind "Show quiet", muted, and stay out of the tray count. On the electron team profile the Sweep went from 25 rows to 13. Schema 5.

  • Snooze per row, until the PR changes on GitHub, gets a worse reason, or the day ends. Stored in localStorage, per machine. "Show snoozed" reveals the hidden rows.

  • Tray: a "N need attention (team)" menu line, and a tooltip fallback when your queue is empty. The badge still counts only your queue. The Settings hint explains that the stale threshold also drives the Sweep.

Measurements

Electron org, last 30 days, median of 5 runs, e2e/bench-sweep.mjs:

v0.10.4 This branch
Team profile (5 authors), full sweep 28.9 s, 6–7 requests 9.1 s, 10 requests
Team profile, auto-refresh, quiet org (1 request) 0.7 s 0.6 s
Whole org, full sweep failed 5 of 5 (HTTP 502) completes 5 of 5, ~170 s

A live team sweep filled details on exactly the 27 rows that need them, and found 6 merge conflicts. Whole-org time is mostly 60 s waits on GitHub's secondary rate limit (403 with Retry-After). Those track the number of search requests, and carried-over PRs added more. Pacing searches under the limit is listed under Later.

Remaining

  • Data: carried-over search, detail query (mergeable, latestReviews), new PrRow fields (schema 3)
  • Attention engine and its tests
  • Sweep section
  • Snooze
  • Tray line and Settings text
  • Quiet rows
  • chore(release): v0.11.0, and an update from an installed v0.10.4 through the auto-updater

Testing

Use a classic personal access token with the repo and read:org scopes. These orgs don't use SAML SSO, so the token needs no "Configure SSO" step.

The dev build shares its data folder with the installed app (%APPDATA%\pr-sweep): same config, token and snapshot. Replacing the token in the dev build replaces it for the installed app too.

Before release

Everything in the milestone is built. What's left is your pass through the testing steps above, then chore(release): v0.11.0 as the last commit, marking this ready, merging, and tagging v0.11.0 on main. The tag publishes a signed release that auto-updates installed copies. After that, check that an installed v0.10.4 updates through the auto-updater and that its first refresh fills in the Sweep.

Remembering page sizes doubled whole-org search requests and made the
electron whole-org sweep slower (172 s median vs 109 s). The 403 waits
follow the number of search requests, not timeouts, so smaller pages
only add to them.
@hazeliscoding
hazeliscoding marked this pull request as ready for review September 28, 2026 14:02
@hazeliscoding
hazeliscoding merged commit b1b69d3 into main Sep 28, 2026
1 check passed
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