fix: prompt panel height and esc key forwarding - #6
Merged
Merged
Conversation
Greptile OverviewGreptile SummaryThis PR fixes two UI issues and improves paste handling reliability. The prompt panel height calculation now uses the textarea's configured height property instead of recalculating from newline count, preventing unbounded growth. The esc key is now forwarded to Claude sessions when they're in Urgent, Active, or Thinking states, allowing users to cancel operations. The multi-line paste timing has been improved with longer delays (50ms + 30ms vs 10ms) and the double-Enter threshold lowered from 3+ lines to 2+ lines. Key Changes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant TUI as TUI Model
participant Textarea
participant Tmux as Tmux Client
participant Claude as Claude Session
Note over User,Claude: Esc Key Forwarding Flow
User->>TUI: Press 'esc' key
TUI->>TUI: Check if session selected
TUI->>TUI: Check session state<br/>(Urgent/Active/Thinking)
TUI->>Tmux: SendKeysToPaneRaw("Escape")
Tmux->>Claude: Forward Escape key
TUI->>TUI: addActivity("Sent Escape")
Note over User,Claude: Prompt Panel Height Fix
User->>TUI: Enter prompt mode
TUI->>Textarea: SetHeight(calculated)
TUI->>TUI: View() renders UI
TUI->>Textarea: Height() - get configured height
Note right of TUI: Uses textarea's actual<br/>configured height instead<br/>of recalculating from content
TUI->>User: Display bounded panel
Note over User,Claude: Multi-line Paste Flow
User->>TUI: Submit multi-line prompt
TUI->>Tmux: SendKeysToPane(session, pane, text)
Tmux->>Claude: send-keys -l {text}
Tmux->>Tmux: Sleep 50ms
Tmux->>Claude: send-keys Enter
alt 2+ lines (newline count >= 1)
Tmux->>Tmux: Sleep 30ms
Tmux->>Claude: send-keys Enter (2nd)
end
Tmux-->>TUI: Return success
|
MartianGreed
force-pushed
the
fix/prompt-and-esc
branch
2 times, most recently
from
January 28, 2026 09:13
be29e4c to
0ccdd20
Compare
…nd preview line wrapping
MartianGreed
force-pushed
the
fix/prompt-and-esc
branch
from
January 28, 2026 09:16
0ccdd20 to
48a5626
Compare
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.
Summary
esckey to Claude sessions when in Urgent, Active, or Thinking stateTest plan
make buildmake testescwhen session is Urgent/Active/Thinking, verify it forwards to Claude🤖 Generated with Claude Code