Skip to content

CLI: support editing an existing inline comment #380

@vxio

Description

@vxio

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions