Skip to content

In-TUI keystroke for authoring new inline comments on focused line #239

@dtbuchholz

Description

@dtbuchholz

Problem

Hunk supports live inline comments via the session CLI, but a human using the TUI can’t author comments directly in the UI. Today you have to drop to another terminal and run hunk session comment add, which breaks review flow and makes human comments feel second-class compared to agent comments.

Desired behavior

Provide an in-TUI keystroke (e.g. c) that opens a text input overlay for a new inline comment tied to the current focus (file + line + side of diff for split view). Submitting should route through the same code path as hunk session comment add so agents see human comments identically via hunk session comment list.

Acceptance criteria

  • A keybinding (e.g. c) opens a comment input overlay for the currently focused line.
  • The comment is bound to the active file/line and correct diff side in split view.
  • Esc cancels; Enter (or Ctrl+Enter) submits.
  • Optional: an “open in $EDITOR” affordance for longer comments.
  • Submitted comments use the same storage/data model as hunk session comment add.
  • Agent consumers of hunk session comment list see these comments exactly like agent-authored ones.

Relationship to existing issues

Related implementation touch points (from #115):

  • src/core/liveComments.ts
  • src/mcp/types.ts (LiveComment)

Notes

This is the human-authoring counterpart to the existing agent-authoring CLI. It should use the same data model and storage path to keep comment visibility and behavior consistent across TUI + agents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions