Repository navigation
fix(tui): hold a multi-line paste whole and check it on enter - #5
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Textual's
Input._on_pastekeeps 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
Promptholds 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./check(or the waiting verb's argument), keeps it out of the newline-delimited history file, and labels the run/check pasted textso headers, footer notes and log lines stay one line. A mirrored verb collapses whitespace only in its echoed line._on_paste/_on_keyin the MRO unlessprevent_default()is called, so the overrides do not callsuper(); the comment inprompt.pyrecords why.\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