Skip to content

fix(tui): hold a multi-line paste whole and check it on enter - #5

Merged
Yigtwxx merged 1 commit into
mainfrom
feat/tui-multiline-paste
Sep 17, 2026
Merged

Yigtwxx merged 1 commit into
mainfrom
feat/tui-multiline-paste

Conversation

@Yigtwxx

@Yigtwxx Yigtwxx commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Why

Textual's Input._on_paste keeps the first line of a bracketed paste and drops the rest, so a multi-paragraph post pasted into the bar was checked as its first sentence, silently. The pipeline already reads pasted text whole (proofpath check - proves it); only the bar lost it.

What

  • Prompt holds a paste of two or more lines behind a one-line summary — pasted · 3 lines · 118 chars · enter to check, esc to drop (theme separator) — and hands the whole text over on Enter (take()); a printable key, backspace, escape, a history step or a completion drops it (drop()). A one-line paste is text in the bar as before.
  • The app submits the held text as an implicit /check (or the waiting verb's argument), keeps it out of the newline-delimited history file, and labels the run /check pasted text so headers, footer notes and log lines stay one line. A mirrored verb collapses whitespace only in its echoed line.
  • Textual 8.2.8 dispatches every _on_paste/_on_key in the MRO unless prevent_default() is called, so the overrides do not call super(); the comment in prompt.py records why.
  • 13 new pilot tests (incl. a \r-separated paste, as terminals send); README, CHANGELOG and spec §13.1 updated.

Spec: docs/superpowers/specs/2026-09-17-multiline-paste-design.md.

Not in this PR

A one-line paste onto a held summary drops both (spec-conforming: any edit of the summary drops it). A drop()-first in that branch would keep the new paste; small follow-up.

🤖 Generated with Claude Code

https://claude.ai/code/session_012cDuGjsQS1Ei8eoxDrak8Z

Textual's Input keeps the first line of a bracketed paste and drops the
rest, so a post pasted into the bar was checked as its first sentence
and nobody was told. The bar now holds a paste of two or more lines
behind a one-line summary; enter checks the whole text (as an implicit
/check or as the waiting verb's argument), any edit, escape or a history
step drops it, and it stays out of the line-based history file. The run
is labelled "/check pasted text" so headers and log lines stay one line.

Spec: docs/superpowers/specs/2026-09-17-multiline-paste-design.md

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012cDuGjsQS1Ei8eoxDrak8Z
@Yigtwxx
Yigtwxx merged commit 9ff6011 into main Sep 17, 2026
7 checks passed
@Yigtwxx
Yigtwxx deleted the feat/tui-multiline-paste branch September 18, 2026 13:02
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.

1 participant