Skip to content

Add composer prompt history navigation with ArrowUp and ArrowDown#1157

Open
jamesx0416 wants to merge 2 commits intopingdotgg:mainfrom
jamesx0416:t3code/composer-arrowup-prompt-recall
Open

Add composer prompt history navigation with ArrowUp and ArrowDown#1157
jamesx0416 wants to merge 2 commits intopingdotgg:mainfrom
jamesx0416:t3code/composer-arrowup-prompt-recall

Conversation

@jamesx0416
Copy link
Contributor

@jamesx0416 jamesx0416 commented Mar 17, 2026

What Changed

  • added terminal-style prompt history navigation to the chat composer for ArrowUp and ArrowDown
  • history prefers prior user prompts from the current thread, then falls back to other threads in the same repo/project when the thread is new
  • history navigation only triggers when the caret is on the top or bottom visible line of the composer, including internal composer scroll state
  • pressing ArrowDown back out of history restores the saved in-progress draft instead of dropping it
  • added focused tests for history ordering, draft restoration, and oldest-entry stop behaviour

Why

Prompt iteration in the composer should behave like terminal history. The goal was to make recalling, editing, and resending earlier prompts fast and predictable without losing the current draft. The follow-up commit fixes the edge cases so history only triggers at the real visual top/bottom of the composer and does not wrap at the oldest entry.

UI Changes

No UI changes

Video

Screen.Recording.2026-03-17.at.7.02.44.pm.mp4

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

- Recall prior user prompts in the composer when caret is on first/last visual line
- Preserve draft text while navigating history and reset state on send/thread changes
- Extract prompt history resolution/navigation utilities with coverage in new unit tests
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 20b2222b-edc9-42d0-b7a4-c8551c924eea

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can disable sequence diagrams in the walkthrough.

Disable the reviews.sequence_diagrams setting to disable sequence diagrams in the walkthrough.

@github-actions github-actions bot added size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant