CLI: support editing an existing inline comment
Why
Today the hunk session comment CLI supports add, list, rm, and clear, but not edit. If I author a comment and notice a typo, want to tighten the wording, expand the rationale, or correct the line I anchored it to, the only path is to rm the old comment and add a new one.
That round-trip is annoying:
- I lose the original comment's ID and creation time, so anything I (or a teammate) referenced externally goes stale.
- In the TUI the "edited" comment shows up as a brand-new entry — ordering and focus shift, and it's no longer obvious it's the same thought I wrote a minute ago.
- I have to retype every field even when I only wanted to fix one word.
For something as small as fixing a typo on a review note I just wrote, this is more friction than it should be.
Proposal
Add hunk session comment edit <comment-id> that takes the same flags as add but only updates the ones passed, preserving the comment's ID and creation time. A TUI keybinding to edit the focused comment in $EDITOR would be a nice companion.
Alternatives considered
rm + add: works today but loses the ID, timestamps, and in-place position (see Why).
- TUI-only edit keybinding: helpful, but I'd still want the CLI path so I can script fixes or correct a comment without re-entering the TUI.
Notes
CLI: support editing an existing inline comment
Why
Today the
hunk session commentCLI supportsadd,list,rm, andclear, but notedit. If I author a comment and notice a typo, want to tighten the wording, expand the rationale, or correct the line I anchored it to, the only path is tormthe old comment andadda new one.That round-trip is annoying:
For something as small as fixing a typo on a review note I just wrote, this is more friction than it should be.
Proposal
Add
hunk session comment edit <comment-id>that takes the same flags asaddbut only updates the ones passed, preserving the comment's ID and creation time. A TUI keybinding to edit the focused comment in$EDITORwould be a nice companion.Alternatives considered
rm+add: works today but loses the ID, timestamps, and in-place position (see Why).Notes