Skip to content

Fix TUI paste editor regression - pasted text object not expanding in editor #3484

Closed as duplicate

Description

@shuv1337

Problem/Context

There's been a regression in the TUI message input functionality. Previously, when pasting a large block of text into the TUI message input, it would be replaced with a [pasted text] object. Users could then use the Ctrl+X+E command shortcut to open their default editor, where the full pasted text would be expanded and editable. After exiting the editor, the edited content would be placed back in the TUI message prompt.

Current Behavior: When opening the editor, instead of showing the expanded pasted text, it only displays the raw object name [pasted text]. When exiting the editor, only this raw text remains in the message prompt, losing the actual pasted content.

Acceptance Criteria

  • Pasting large text blocks creates a [pasted text] object in the TUI message input
  • Using Ctrl+X+E opens the default editor with the full pasted text content expanded
  • Editor shows the actual pasted content, not just the object name
  • After editing and exiting the editor, the modified content is placed back in the TUI message prompt
  • The [pasted text] object is properly replaced with the edited content

Implementation Details

This issue likely involves the TUI input handling and editor integration components. Key areas to investigate:

  • TUI input processing: How pasted text is handled and stored as objects
  • Editor integration: The Ctrl+X+E command implementation and how it passes content to the external editor
  • Content expansion: Logic that should expand the [pasted text] object when opening the editor
  • Content replacement: How edited content is returned to the TUI message prompt

Relevant Code Areas

Based on the repository structure, the issue is likely in:

  • packages/tui/input/ - TUI input handling components
  • packages/tui/internal/ - Internal TUI logic and command processing
  • Look for files related to:
    • Input handling and paste detection
    • Editor integration (Ctrl+X+E command)
    • Content object management and expansion

External References

  • Previous working behavior should be referenced for implementation comparison
  • May need to check recent changes in TUI input handling for regression source

Tasks

  • Investigate current TUI paste handling implementation
  • Locate the Ctrl+X+E editor integration code
  • Identify where the [pasted text] object expansion should occur
  • Fix the content expansion logic when opening the editor
  • Ensure proper content replacement after editor exit
  • Test the complete paste → edit → save workflow
  • Verify no regression in other TUI input functionality

Activity

  1. github-actions commented on Oct 27, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions