Skip to content

Diff display controls in every review header, shared settings - #2730

Merged
backnotprop merged 16 commits into
mainfrom
feat/diff-controls-headers
Nov 7, 2026
Merged

backnotprop merged 16 commits into
mainfrom
feat/diff-controls-headers

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 6, 2026 •

Copy link
Copy Markdown
Owner

Approval: .product/approved/diff-controls-headers/approval.md.

What changes

  • One Split / Unified button, like DiffsHub, plus Collapse all and the Diff display gear:
    • in code review's tab strip (ReviewDockRightActions): the two words become the button, and the popover has no Split / Unified row;
    • in the Inbox full-window review: top bar only, and the chapter tabs and the docked switch are gone;
    • in the Inbox guided review: before Close.
  • The Inbox popover hides Whole file and Hide whitespace, which need the local repository.
  • Shared settings. GET and POST /api/inbox/settings carry diff_options:
    • diff_style, overflow, indicators, line_diff_type, line_numbers, background, background_intensity, tab_size;
    • each field is checked, and a 422 names diff_options.<field>;
    • diff_style stays as an alias;
    • the values are kept in config.json diffOptions, so a choice holds across code review and the Inbox, even on another host.
  • packages/inbox/diffStyle.ts becomes diffOptions.ts. theme.ts forwards every diff field in one POST. The reader applies the tab size.
  • Collapse all in the Inbox goes through the guide host's optional collapseAll value. It is not remembered.
  • The pull request page is unchanged here (its tab stays). Its controls are in PR page: diff display controls in the bar (stacked on #2672) #2732, stacked on PR view: the PR's description at the head of its diff #2672's header. a8bb782, a description line for the PR page, was pushed by mistake and is reverted by bcea108. The tree matches 98c7c8a.

packages/ui changes are additive only: two new components and a type export. Only the Bun server is touched (the Inbox is Bun-only).

Tests

  • packages/server/inbox.test.ts: the diff_options round trip, every field check, an unknown key, the alias, and an alias that disagrees with the object.
  • packages/inbox/guideDiffStyle.test.tsx (DOM, real Inbox server):
    • the bar's order;
    • the toggle reaches every diff, the cookie and config.json;
    • config.json values are adopted, and the tab size is applied;
    • the popover has no Whole file or Hide whitespace, and its changes reach config.json;
    • Collapse all;
    • a phone shows no controls.
  • reviewPane.test.tsx, ReviewDockRightActions.test.tsx.
  • The e2e specs are updated (inbox-guides, inbox-code-review) but were not run locally.

- One Split / Unified button (ui DiffLayoutToggle) and the Diff display
  popover (ui DiffDisplayOptions) in code review's tab strip, the Inbox
  guided review (before Close) and the full-window review (top bar only;
  the chapter tabs and the docked switch are gone).
- The Inbox popover hides Whole file and Hide whitespace.
- POST/GET /api/inbox/settings carry diff_options (each field checked,
  diff_style kept as an alias); diffStyle.ts becomes diffOptions.ts and
  theme.ts forwards every diff field; the reader applies the tab size.
- Collapse all in the Inbox through the guide host's optional collapseAll.
- The pull request page keeps its tab for now.
…eader, Global comment in the strip"

This reverts commit a8bb782.
… the gear, remount only changed files on Collapse all

- inbox-diff-options: look a field up only among the table's own keys, so
  toString or __proto__ answers 422 diff_options.<name>, not 500.
- DiffDisplayOptions: the gear's hover text goes through HostTitle (a native
  title in code review as before, ui's tooltip in the Inbox), with an
  optional triggerTitleSide; the Inbox opens it below, like its neighbours.
- GuideFileCard: Collapse all / Expand all mounts a file's viewer again only
  when its state changes, so an already open file keeps its opened context
  gaps and an open comment.
@backnotprop
backnotprop marked this pull request as ready for review November 6, 2026 03:13
# Conflicts:
#	docs/agent-guides/server-and-storage.md
# Conflicts:
#	docs/agent-guides/inbox-files-and-guides.md
#	packages/inbox/inbox.css
#	tests/e2e/inbox-code-review.spec.ts
# Conflicts:
#	docs/agent-guides/inbox-files-and-guides.md
#	packages/inbox/inbox.css
…estination, so Overview reads whole beside the diff controls
# Conflicts:
#	docs/agent-guides/inbox-files-and-guides.md
#	tests/e2e/inbox-code-review.spec.ts
The PR renamed the test ('Split | Unified' became 'and the diff controls'),
so the entry named a test that no longer exists and the quarantine guard
failed. The flaky step it quarantines (the jump name after the keys) is
unchanged; its line moves to 698.
@backnotprop
backnotprop merged commit fd097ba into main Nov 7, 2026
51 checks passed
backnotprop added a commit that referenced this pull request Nov 7, 2026
Every guide still opens the full-window review; main's Shape boards, Show me,
#2730's diff controls in the bar and the board-link landing now ride along in it.
GuidePane stays removed; its Shape landing and DiffControls already live in ReviewPane.
backnotprop added a commit that referenced this pull request Nov 7, 2026
…/pr-view-diff-controls

#2730 landed on main with the shared diff controls, and #2639 moved the PR page's
Split | Unified into the review app's tab row over the code (owner, 11-07 19:08). Most
of this branch is now in its base, so the tree takes #2672's, with one change left:
the PR page's tab row draws DiffControls (every review header's one Split / Unified
button, Collapse all, the Diff display gear; approval diff-controls-headers) in place
of the two-mark switch, and Collapse all reaches the reader. The bar is unchanged.
yermakoffivan pushed a commit to yermakoffivan/plannotator that referenced this pull request Nov 8, 2026
…eader

Carries backnotprop#2730's commit (98c7c8a: one Split / Unified button, Collapse all and the
Diff display gear in every review header, shared through config.json), with its
conflicts against this branch resolved, and puts the same controls on the PR page's
bar after Details. The docked Split | Unified switch and the first file's tab are gone;
the Details panel is unchanged.
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