Description
In the TUI (v0.9.5), the context-menu action "Copy message" (right-click on a transcript cell → Copy message) copies the message including UI decorations: the first line carries the role glyph ●, and every wrapped continuation line is prefixed with the rail character ▏ (U+258F + space). Example of what lands on the clipboard:
● Готово. Эпопея закрыта.
▏
▏ Навык обновлён — урок про «живой тест после каждого патча» зафиксирован в search-files-windows-fix.
▏
▏ MEMORY обновлён — правило: «похожее место ≠ нужное место».
This makes pasting the copied text into another document/chat/editor noisy — the user has to strip ●/▏ manually.
Use Case
"Copy message" is the natural way to grab a whole assistant reply for reuse outside CodeWhale. The user expects clean text, exactly like the in-app selection copy already provides (rail-clean since #4208 — "In-app selection copy is rail-clean and now regression-tested: copied transcript text excludes the ▎ ╎ │ ● decorations via cache metadata").
Today there is a mismatch: selection copy is clean, "Copy message" is not. There is also no config option to change the copy-message behavior ([tui] has no copy-related keys; mouse_capture only affects who owns mouse selection).
Suggested Fix
Make the context-menu "Copy message" path rail-clean the same way selection copy is:
copy_cell_to_clipboard currently renders via history_cell_to_text → transcript_lines → line_to_string, which keeps the role glyph and rail spans.
- Selection copy (
selection_to_text) already strips them using cache metadata (rail_prefix_width + copy_prefix_width).
- Reuse that same metadata-based stripping for the cell-copy path, so "Copy message" exports only the plain message text (including code blocks, markdown source as-is, without the
●/▏ decorations).
An opt-in config flag (e.g. [tui] copy_cell_plain = true, default true) would be a nice escape hatch if anyone actually wants the decorated copy, but the clean text should be the default.
Environment
Description
In the TUI (v0.9.5), the context-menu action "Copy message" (right-click on a transcript cell → Copy message) copies the message including UI decorations: the first line carries the role glyph
●, and every wrapped continuation line is prefixed with the rail character▏(U+258F + space). Example of what lands on the clipboard:This makes pasting the copied text into another document/chat/editor noisy — the user has to strip
●/▏manually.Use Case
"Copy message" is the natural way to grab a whole assistant reply for reuse outside CodeWhale. The user expects clean text, exactly like the in-app selection copy already provides (rail-clean since #4208 — "In-app selection copy is rail-clean and now regression-tested: copied transcript text excludes the ▎ ╎ │ ● decorations via cache metadata").
Today there is a mismatch: selection copy is clean, "Copy message" is not. There is also no config option to change the copy-message behavior (
[tui]has no copy-related keys;mouse_captureonly affects who owns mouse selection).Suggested Fix
Make the context-menu "Copy message" path rail-clean the same way selection copy is:
copy_cell_to_clipboardcurrently renders viahistory_cell_to_text→transcript_lines→line_to_string, which keeps the role glyph and rail spans.selection_to_text) already strips them using cache metadata (rail_prefix_width+copy_prefix_width).●/▏decorations).An opt-in config flag (e.g.
[tui] copy_cell_plain = true, defaulttrue) would be a nice escape hatch if anyone actually wants the decorated copy, but the clean text should be the default.Environment
mouse_capture = true— with mouse capture off the issue is even worse (raw terminal grid copy), but that's the documented TUI copy-paste polluted with box-drawing Unicode decorations (╎ ▎ ● │ ┃) #4208 product-decision path, not this report.