Skip to content

feat(inbox): code review in the Inbox, phase 1 - #2582

Merged
backnotprop merged 5 commits into
mainfrom
feat/inbox-code-review
Nov 4, 2026
Merged

backnotprop merged 5 commits into
mainfrom
feat/inbox-code-review

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Phase 1 of code review in the Inbox (approval "inbox-code-review-direction": concept A take B, plus concept C's switch and skills). Everything is behind Settings → Capabilities → Code review. The setting is config.json inboxCodeReview, off unless the person turns it on. It follows the Board / Checklist pattern, including event: capabilities sync.

What it does when on

  • Agent protocol: submit_guide lists review: boolean. With review: true the message's guide carries review and its chapter titles.
  • "/" list: /review-curate is listed under Plannotator. /review-recheck appears only in a thread where a review already happened. /review-guide is written but not offered: add or remove it with one entry in INBOX_REVIEW_SKILL_NAMES. A skill's instructions ride only the reply that names it, in its "Skills referenced" block. A skill of the person's own with the same name wins.
  • Review card: shown with Start review. Start review opens a full-window review:
    • a chapters rail with a Walkthrough | All files switch;
    • the real diff, with line comments and Viewed ticks;
    • DecisionControl (Approve / Send Feedback) in the header.
  • Verdict: sent as the person's reply, with the comments in the review app's export. review_verdict is stored on the reply, and the card shows the outcome.
  • Phone (390 px): the rail becomes the switch plus a native list at the top of the review.

Off or unset

tools/list, both agent-tool builders, the skill catalog and --help are byte-equal to the base. Measured: 23,537 / 10,050 / 10,050 / 20,720 / 59,179 bytes. The pinned INBOX_DEFAULT_TOOLS is unchanged. With everything on, the tool description is 2,031 characters, the same as with Code review off.

Left out (follow-ups)

  • Round 2 inside one review (review_id): /review-recheck sends a new review of only the changes instead.
  • Ask about selected lines: the Inbox's Ask AI is off by default, and the diff's Ask needs the review server.
  • Pull requests and the discovery offer.

Tests

  • packages/server/inbox-code-review.test.ts: the switch, the capabilities frame, tools/list off and on, the refusals, the verdict, Viewed, the catalog, the same-name skill winning, byte-equality off, and 2,048 with everything on.
  • apps/hook/server/inbox-help-code-review.test.ts
  • packages/inbox/reviewSkills.test.ts: recheck visibility and skill blocks.
  • packages/inbox/settingsSections.test.tsx: the Capabilities row.
  • tests/e2e/inbox-code-review.spec.ts: compiled binary, desktop and phone.

Behind Settings -> Capabilities -> Code review (config.json inboxCodeReview,
off unless the person turns it on; window-synced through event: capabilities).

- submit_guide gains `review: true` while the switch is on (absent and
  refused while off); the message's guide carries `review` and its chapters.
- The reply box's "/" list offers Plannotator's review skills: /review-curate,
  and /review-recheck only in a thread where a review already happened.
  /review-guide is written and not offered. Instructions ride only the reply
  that names one; a person's own skill with the same name wins.
- A review shows as a review card with Start review, which opens a
  full-window review: chapters rail with Walkthrough | All files, the real
  diff with line comments and Viewed ticks, and DecisionControl in the
  header. The verdict is the person's reply (verdict words, note, comments in
  the review app's export) with review_verdict on it; the card shows the
  outcome.
- Off, tools/list, --help and the skill catalog are byte-equal to before.

Round 2 inside one review (review_id) and Ask about selected lines are left
for a follow-up.
# Conflicts:
#	packages/inbox/components/ComposerField.tsx
- The store marks a reply carrying a review's comments (review_comments_of),
  whichever message it answers, so /review-recheck shows after comments sent
  from the reply box.
- The verdict note is held by the pane (DecisionControl drafts seam), kept per
  review across a failed send, a close and a reload, cleared once it went.
- One idempotency key per verdict; a late answer no longer navigates; App
  closes the review relative to the current route.
- Open composers reload the skill catalog when the switch changes.
- Viewed tooltip without "(V)" where the key is off; dotfile paths in the rail.
- Agent titles collapsed to one line and capped (verdict words, chapters).
- Ended review session: the thread's ended note and route choice.
- Tests: owner-only switch, verdict mapping, ReviewPane DOM, catalog reload.
@backnotprop
backnotprop marked this pull request as ready for review November 4, 2026 00:59
@backnotprop backnotprop added the ci:full Run the heavy CI tier on this PR (added by the merge script) label Nov 4, 2026
…ox-review subpath

- softType: the phone review's chapter/file select used a bare 16px; it now
  uses the Inbox's phone-input token var(--ib-fs-16-in, 16px).
- smoke:package: the core source manifest gained ./inbox-review, which the
  published core 0.25.18 lacks. core is 0.25.19 and ui pins it exactly;
  bun.lock changes only the two core version lines. Publish core first.
@backnotprop
backnotprop merged commit ea36d25 into main Nov 4, 2026
69 checks passed
backnotprop added a commit that referenced this pull request Nov 4, 2026
# Conflicts:
#	tests/dom-test-list.txt
backnotprop added a commit that referenced this pull request Nov 4, 2026
Both sides kept. Core goes to 0.25.20: main published 0.25.19 (#2582)
without the stack's three subpaths. bun.lock is main's plus that bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the heavy CI tier on this PR (added by the merge script)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant