Skip to content

feat: review progress, conversations and a refreshed bar - #7

Closed
hyanmandian wants to merge 31 commits into
wxtfrom
review-progress
Closed

hyanmandian wants to merge 31 commits into
wxtfrom
review-progress

Conversation

@hyanmandian

@hyanmandian hyanmandian commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #6.

Review progress

  • Reads GitHub's Viewed state. The time next to the line totals counts only files not yet viewed.
  • The breakdown shows, per filter, files viewed (green when complete), lines changed and time left. An (i) beside Time left explains the estimate.

Conversations

  • A button in the bar shows how many review threads the shown files have. Opening it lands on the first one and shows a compact card: the file and line, whether the thread is waiting on you, answered (the last comment is yours, or you reacted to it) or resolved, the position, and ‹ › to move between threads. The card stays open while you navigate; its toggle or Escape closes it.
  • Each jump centres the thread and lights a soft ring around it.
  • Newer view: uses the embedded threads, opening unrendered files and landing on the line's comment marker. Classic view: uses review-thread-collapsible threads, reading authors, reactions and the signed-in login (meta[name="user-login"]) for the reply state.

GitHub's newer diff view

Checked against a signed-in session on real pull requests (579 and 174 files):

  • Embedded data: every changed file comes from the JSON in script[data-target="react-app.embeddedData"] (path, digest, line counts, markedAsViewed, review threads by line), so totals, counts, time and Viewed are exact even though the list only renders files near the screen. Viewed toggles seen in the page override the embedded value.
  • Large PRs: where the list positions each file absolutely, files outside the filter are dimmed instead of hidden.
  • File tree: tree items map to files through their #diff-<digest> links.

Robustness and performance

  • GitHub elements are found by roles, ids, data-* attributes, labels and custom element names rather than styling classes. Hashed class names remain only as a last fallback for comment markers.
  • Embedded data is parsed once per script element; text-only mutations (ticking timestamps) are ignored; a frame update cancels a pending idle one; chip measuring only happens when the selection changes.

Bar

  • Filters are plain toggles: turn on as many as you like; All is exclusive and comes back when nothing is on. Each shows its file count.
  • Stats use tabular figures, and the stats block reserves its width so the bar never jumps.

Accessibility

  • Contrast checked against GitHub's real light and dark tokens with both popovers open (axe in e2e); forced-colors fixes; labels start with the visible text; focus returns to the toggle when a popover closes.

Tests

- The bar shows how many of the shown files are viewed and the time left, or
  Done once everything shown is viewed
- The breakdown adds a Viewed column and its time column becomes time left
- Viewed toggles from the new diff view (aria-pressed) and the classic one
  (change events) update the panel on the next frame
…h the bar

- In the newer diff view, take every file's line counts, Viewed state and review
  threads from the page's embedded JSON, so large virtualized pull requests get
  exact totals; the classic view keeps reading the DOM
- Dim files outside the filter in the virtualized list, where hiding would leave
  gaps, and map tree items to files through their #diff- links
- Next unviewed file: a button and Alt+Shift+J; files GitHub hasn't rendered are
  opened through the file tree
- Conversation navigator: previous and next buttons and commands that centre and
  outline each thread, including threads in unrendered files
- Filter buttons show their file counts; the stats use one typeface with tabular
  figures and reserve width as a block, so spacing stays even
@hyanmandian hyanmandian changed the title Show review progress from GitHub's Viewed toggles Review progress, file and conversation navigation, and a refreshed bar Oct 2, 2026
- Clicking a filter turns it on or off; All is exclusive and comes back when
  nothing else is on, so a filter is always active
- Arrow keys move between filters; Enter or Space toggles
- The breakdown button sits beside the review time, the popover drops its title
  and hint, and an (i) beside Time left explains the estimate in a tooltip
- The next unviewed button reads Next unviewed with its count
Viewed shows viewed out of total files, green once complete, and a complete
row leaves its time empty instead of repeating Done.
- Conversations are one button that steps forward and shows the position; going
  back appears beside it once the reader has started
- Next unviewed drops its arrow icon, which read as a download
- Viewed sits beside the filter name and the line counts start a new group
- The breakdown centres over its button, kept on screen
- Conversations popover: state icon, file:line, reply state, position and arrows in one card
- Find Viewed toggles and threads by labels, ids and attributes instead of styling classes
- Parse embedded data once per script element; skip text-only mutations; drop stale scheduled applies
- Hide tree folders from a set of shown directories; read line counts from the page only in the classic view
- Return focus when a popover closes on its own; hoverable time tooltip; Escape closes it first
- Contrast fix for the selected filter count; forced-colors fixes; labels start with the visible text
- Check panel contrast against GitHub's light and dark tokens with both popovers open
- Remove dead CSS, locale keys and unused APIs
… messages

A code table in a review comment carries data-tagsearch-path too; diff containers also have a diff- id.
Merges to main keep a release pull request up to date; merging it tags the release, attaches the builds and
publishes them. The README now covers review progress, Next unviewed and conversations, and drops shift-click.
Review progress stays in the breakdown and the time left; the bar keeps conversations as its only navigation.
@hyanmandian hyanmandian changed the title Review progress, file and conversation navigation, and a refreshed bar Review progress, conversations and a refreshed bar Oct 2, 2026
The page has the logo, what Focus Diff does, the 30-second video and links to the stores (placeholders until the
listings are live) and the repository. The site stays out of the Firefox sources zip.
Resolved threads in the classic view start collapsed; the jump expands them, waits for GitHub to load their
comments, then centres and highlights them.
…in how to load them

- Releases attach focus-diff-chromium.zip, focus-diff-firefox.zip and focus-diff-safari.zip under fixed names,
  so the site links to the latest ones
- The site and README walk through loading each build without a store
- Safari build scripts, and a timeout fallback where requestIdleCallback is missing (Safari)
…rows

Long file names now end in an ellipsis while the line number stays, so the card no longer resizes between
conversations.
@hyanmandian hyanmandian changed the title Review progress, conversations and a refreshed bar feat: review progress, conversations and a refreshed bar Oct 2, 2026
@hyanmandian

Copy link
Copy Markdown
Owner Author

Landed on main directly as part of the history cleanup before the first release.

@hyanmandian hyanmandian closed this Oct 2, 2026
@hyanmandian
hyanmandian deleted the review-progress branch October 2, 2026 15:02
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