Skip to content

feat(compose): readline keys, word wrap and a comment_width setting - #131

Merged
backnotprop merged 2 commits into
plannotator:mainfrom
sebastianst:seb/compose-box
Nov 15, 2026
Merged

backnotprop merged 2 commits into
plannotator:mainfrom
sebastianst:seb/compose-box

Conversation

@sebastianst

Copy link
Copy Markdown
Contributor

Makes the comment box comfortable for more than a line or two.

  • Editing keys: word jumps and deletes, line start and end, and Ctrl+U/Ctrl+K. Ctrl+H deletes a word because many terminals send it for Ctrl+Backspace.
  • Up and down: move by display row, so a wrapped paragraph can be navigated.
  • Discarding: Esc asks first if the text changed.
  • Wrapping: at word boundaries to the box's real width, instead of mid-word at a fixed 48 columns.
  • [ui] comment_width: sets the box width, 48 by default and 38 at least. A narrower pane still narrows it.
  • Title: one too long for the top border continues on the bottom border, so esc cancels is no longer cut off.

🤖 Co-created with Claude Opus 5.5

@sebastianst

Copy link
Copy Markdown
Contributor Author

@backnotprop this and my other 3 PRs are huge QoL improvements for comment editing. I'm using a local fork of plannotator-tui with these patches and it works flawlessly so far and makes the experience much more familiar to other TUIs, like claude code itself. Would super appreciate your reviews 🙏🏻 thanks

sebastianst and others added 2 commits November 15, 2026 16:54
Word and line editing keys that work in most TUI inputs, Up/Down by
display row so a wrapped paragraph can be navigated, and Esc asks before
throwing away a changed draft.

Ctrl+H deletes a word because many terminals send it for Ctrl+Backspace.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The box wrapped mid-word at a fixed 48 columns. It now wraps at word
boundaries to its real width, capped by `[ui] comment_width`, and keeps
one column free so the cursor can sit past a full row.

A title too long for the top border continues on the bottom border, so
`esc cancels` is no longer cut off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@backnotprop
backnotprop added this pull request to the merge queue Nov 15, 2026
Merged via the queue into plannotator:main with commit d4d867e Nov 15, 2026
3 checks passed
@sebastianst
sebastianst deleted the seb/compose-box branch November 15, 2026 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants