Skip to content

tuiapp_v2.py: Copy and paste do not work in the TUI #351

@liuyuyan6100

Description

@liuyuyan6100

Description

I found that the new Textual-based TUI interface tuiapp_v2.py does not support normal copy and paste behavior in local testing.

This affects basic terminal interaction, especially when using the TUI for long prompts, multi-line command input, or copying generated output.

Affected File

  • frontends/tuiapp_v2.py

Steps to Reproduce

  1. Pull the latest code:

    git pull
  2. Install Textual if needed:

    pip install textual
  3. Run the new TUI from the project root:

    python frontends/tuiapp_v2.py
  4. Try the following operations:

    • Paste text into the input area
    • Paste multi-line text into the input area
    • Select text from the TUI output area and copy it
    • Use common terminal copy/paste shortcuts

Expected Behavior

Copy and paste should work normally:

  • Users should be able to paste single-line text into the input box
  • Users should be able to paste multi-line text into the input box
  • Users should be able to select and copy text from the TUI output area
  • Existing TUI shortcuts should not block basic terminal copy/paste behavior

Actual Behavior

Copy and paste do not work as expected in tuiapp_v2.py.

In my testing, basic copy/paste behavior appears to be blocked or unavailable in the new TUI interface.

Impact

This significantly affects the usability of the new TUI, especially for:

  • Long prompt input
  • Multi-line text editing
  • Copying generated responses
  • Reusing command outputs
  • Daily terminal-based workflows

Environment

  • OS: Ubuntu 24.04.4 LTS
  • Python: Python 3.12.3
  • Textual: 8.2.5
  • Shell: /bin/bash
  • TERM: xterm
  • SSH: yes
  • tmux: no
  • Local commit tested: 5b50eac

Additional Notes

The previous tuiapp.py does not appear to be affected in the same way.

Since tuiapp_v2.py was recently introduced as the new Textual-based interface, it would be great to ensure that copy/paste remains compatible with common terminal workflows.

I am reporting this after local verification and would be happy to help test a fix or submit a PR if the expected behavior is confirmed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions