Skip to content

Review: batch line comments into one prompt for the session #119

Closed

Description

@omartelo

Review surfaces can hand the session a reference today, never an instruction.
InjectMenu writes @path or path:12-30 into the terminal
(frontend/src/components/diff/InjectMenu.tsx:38), and a file's header adds the
whole file as context (FileDiff.tsx:99). Anything I actually want changed I
still type by hand, re-describing where it is while looking straight at it.

The rest of the category shipped the other half: read the diff, leave line
comments, batch them, hand them to the agent as one turn. Warp calls it
Interactive Code Review; Vibe Kanban feeds inline diff comments back to the
agent; JetBrains AIR does it; Zed has it as an open request
(zed-industries/zed#59157). lich already owns every piece except the batching.

Shape

  • A comment is {path, lines, text}, anchored on the selection InjectMenu
    already resolves as lineRef.
  • Comments accumulate for the review in front of me — the working tree
    (ReviewPanel) and a PR's changed files (PullsFiles).
  • One action — Send N comments — renders them as a single markdown block and
    writes it into the PTY through the path the inject already takes
    (rpc.Terminal.Write → Service.Write, internal/terminal/terminal.go:356).
  • Sending clears them.

Ceilings to accept up front

  • It is text typed into a terminal. No structured protocol, no round trip, no
    resolved state coming back from the provider. That is the point: the harness
    types what I would have typed, in the order I read the diff.
  • Anchors are line numbers in the diff as rendered. A comment written before the
    agent edits the file can point at a line that has since moved. Sending
    promptly keeps the window small; nothing tracks drift.

Open

  • Where unsent comments live: in memory per panel, or persisted so switching
    tabs does not drop them.
  • One widget for both surfaces, or the PR view first.
  • Whether the composed prompt names files as @path and lets the provider read
    them, or pastes the hunks inline.
  • Whether a comment on a PR file can also be sent to GitHub instead of to the
    session — same gesture, two destinations. Decide together with the review
    threads issue.

Activity

  1. added
    enhancementNew capability or improvement
    needs-shapingOpen questions to settle before implementing
    on Jul 28, 2026
  2. added 2 commits that reference this issue on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvementneeds-shapingOpen questions to settle before implementing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions