Skip to content

fix(coding-agent): keep Down Arrow in unfinished prompts - #1226

Merged
snimu merged 1 commit into
mainfrom
eng-5147
Aug 11, 2026
Merged

fix(coding-agent): keep Down Arrow in unfinished prompts#1226
snimu merged 1 commit into
mainfrom
eng-5147

Conversation

@snimu

@snimu snimu commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep Down Arrow in the chat prompt until the cursor reaches the end before focusing the Agents View entry below it
  • replace the old last-visual-line interception with an exact prompt-end boundary
  • remove the now-unused protected visual-line wrapper from the base editor

Testing

  • npm run check

Linear: ENG-5147


Note

Low Risk
Localized interactive prompt keybinding change with no auth, data, or API impact; behavior is covered by regression tests referenced in the PR.

Overview
Down Arrow in the chat prompt no longer jumps to the Agents View entry (subagent summary below the prompt) until the cursor is at the end of the prompt text on the last line.

CustomEditor now gates onMoveBelowPrompt on a new isCursorAtEnd() check instead of only being on the last visual (wrapped) line. The first Down press still moves within the editor (e.g. to line end); focus moves below only when the cursor is already at the true end. Empty prompts behave as before: Down can focus below immediately.

The unused isCursorOnLastVisualLine() bridge on the base Editor in pi-tui was removed.

Reviewed by Cursor Bugbot for commit 55ae068. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix Down Arrow in CustomEditor to stay in nonempty prompts until cursor reaches end

Previously, pressing Down Arrow on any wrapped last visual line would immediately move focus to the Agents View. Now, CustomEditor.handleInput only calls onMoveBelowPrompt() when the cursor is at the end of the last line, using a new isCursorAtEnd() helper. The old isCursorOnLastVisualLine() method on Editor is removed.

Macroscope summarized 55ae068.

@snimu
snimu merged commit 795a21d into main Aug 11, 2026
17 checks passed
@snimu
snimu deleted the eng-5147 branch August 11, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants