Skip to content

fix(app): restore review line comments#33481

Merged
Hona merged 2 commits into
anomalyco:devfrom
Hona:fix/app-review-line-comment
Jun 23, 2026
Merged

fix(app): restore review line comments#33481
Hona merged 2 commits into
anomalyco:devfrom
Hona:fix/app-review-line-comment

Conversation

@Hona

@Hona Hona commented Jun 23, 2026

Copy link
Copy Markdown
Member

Summary

  • open a comment draft whenever a diff line selection completes
  • wire the custom comment button through Pierre's gutter utility API
  • remove the redundant line-number-specific comment completion path
  • cover code clicks, gutter clicks, gutter range selection, and hover comments in Chromium

Closes #32835.

Rationale

Comment creation is a policy of the line-comment controller, so all completed selections follow one path: onLineSelectionEnd opens the draft. The file viewer remains responsible only for reporting selections. Pierre requires enableGutterUtility and renderGutterUtility for the hover action, so the internal naming now matches that API.

Verification

  • exact upstream/dev: all four new Playwright cases fail
  • fixed branch: all four cases pass twice without changes
  • bun typecheck in packages/ui
  • bun typecheck in packages/app
  • pre-push full monorepo typecheck: 23/23 tasks passed
  • Prettier and git diff --check

@Hona Hona requested a review from Brendonovich as a code owner June 23, 2026 07:33
Copilot AI review requested due to automatic review settings June 23, 2026 07:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores inline review line-comment creation in the app’s diff viewer by aligning the UI integration with Pierre’s gutter-utility API, ensuring completed line selections consistently open a comment draft, and adding regression coverage for the previously broken interactions.

Changes:

  • Switch diff viewers from the old hover-utility API to Pierre’s gutter-utility API (enableGutterUtility / renderGutterUtility).
  • Simplify line-comment controller flow so all completed selections open drafts via onLineSelectionEnd, removing the separate line-number completion path.
  • Add Playwright regression coverage (click code, click gutter, drag gutter range, hover gutter “Comment” button) and extend the e2e mock server to serve /vcs/diff.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/ui/src/components/session-review.tsx Updates review diff viewer wiring to use gutter utility props and renderer.
packages/ui/src/components/line-comment-annotations.tsx Refactors line-comment controller to open drafts on selection end and renames hover renderer to gutter renderer.
packages/app/src/pages/session/file-tabs.tsx Updates the file tab diff/text viewer wiring to use gutter utility props and renderer.
packages/app/e2e/utils/mock-server.ts Adds optional /vcs/diff response support for e2e tests.
packages/app/e2e/regression/review-line-comment.spec.ts Adds Chromium regression tests covering restored inline comment interactions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/app/e2e/regression/review-line-comment.spec.ts Outdated
@Hona Hona enabled auto-merge (squash) June 23, 2026 07:50
@Hona Hona merged commit d111812 into anomalyco:dev Jun 23, 2026
10 checks passed
markjaquith pushed a commit to markjaquith/opencode that referenced this pull request Jun 23, 2026
@max-wittig

max-wittig commented Jun 24, 2026

Copy link
Copy Markdown

Thanks for the fix here! I just wanted to make an MR to bring inline comments back

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.

[BUG] Review panel: cannot add inline comments on diffs after v1.17.8 (Web UI + Desktop)

3 participants