feat(cli): support replies to review comments - #1012
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
benvinegar
marked this pull request as ready for review
September 6, 2026 23:06
Contributor
Greptile SummaryThis PR adds reply support to the session comment CLI and carries reply relationships through parsing, daemon and broker protocols, shared review state, snapshots, and JSON listings.
Confidence Score: 5/5The PR appears safe to merge; reply targeting, anchor inheritance, listing propagation, and batch atomicity are consistently implemented and tested. No actionable correctness, security, protocol, or repository-rule failure remained after tracing the reply flow across CLI parsing, daemon validation, broker dispatch, review-state mutation, and listing projections. Important Files Changed
Sequence DiagramsequenceDiagram
participant CLI as Session CLI
participant Daemon as Session daemon
participant Broker as Command broker
participant Review as Live review state
CLI->>Daemon: comment add/apply with replyTo
Daemon->>Daemon: Validate reply/root exclusivity
Daemon->>Broker: Forward typed comment command
Broker->>Review: Resolve existing parent note
Review->>Review: Inherit file and semantic anchor
Review->>Review: Add reply with parentId
Review-->>Broker: Applied comment result
Broker-->>CLI: Result and updated listing
Reviews (1): Last reviewed commit: "feat(cli): support replies to review com..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #964.
hunk session comment add --reply-to <note-id>for replying to an existing inline review notereplyToon eachcomment applybatch entryparentIdthrough default and typed JSON comment listingsApproach
Reply targets are mutually exclusive with explicit file/line targets at the CLI, type, HTTP, and broker boundaries. The live-session adapter resolves the parent from shared review state and reuses the shared reply-parent validation and semantic anchor derivations rather than introducing a CLI-specific threading model.
This only adds the CLI write surface. It does not route replies back to connected agents, edit existing notes, or change TUI interactions.
Validation
bun run typecheckbun run lintbun run deps:checkbun run testbun run test:integrationoxfmt --checkgit diff --checkManual check
On Linux in a real Hunk TUI launched from source, created a root comment and multiple nested replies through
hunk session comment add --reply-to. Confirmed that:hunk session comment list --jsonincluded each reply'sparentIdNo TUI behavior was changed.
This PR description was generated by Pi using GPT-5.6 Sol