Skip to content

fix(cli): show newest-first history for Ctrl+R command search#2425

Merged
tanzhenxin merged 1 commit intoQwenLM:mainfrom
kkhomej33-netizen:fix/ctrl-r-command-search-order
Mar 18, 2026
Merged

fix(cli): show newest-first history for Ctrl+R command search#2425
tanzhenxin merged 1 commit intoQwenLM:mainfrom
kkhomej33-netizen:fix/ctrl-r-command-search-order

Conversation

@kkhomej33-netizen
Copy link
Contributor

@kkhomej33-netizen kkhomej33-netizen commented Mar 16, 2026

Summary

  • make non-shell command search show the most recent user inputs first
  • keep the existing input history navigation behavior unchanged
  • add a test to lock the command-search ordering

Why

Shell-mode already surfaces history in newest-first order, but non-shell command search was using in oldest-first order. That made the two reverse-search experiences inconsistent and pushed recent entries below older ones.

Testing

✓ |@qwen-code/qwen-code| src/ui/components/InputPrompt.test.tsx (97 tests | 1 skipped) 12537ms
✓ InputPrompt > paste auto-submission protection > should allow submission after paste protection timeout 760ms
✓ InputPrompt > large paste placeholder > should expand placeholder to full content on submit 762ms
✓ InputPrompt > large paste placeholder > should expand same-size placeholders correctly when #2 appears first 817ms
✓ InputPrompt > large paste placeholder > should write expanded placeholder content to shell history 761ms

Test Files 1 passed (1)
Tests 96 passed | 1 skipped (97)
Start at 14:16:59
Duration 17.44s (transform 2.14s, setup 40ms, collect 4.10s, tests 12.54s, environment 381ms, prepare 99ms)

Copy link
Collaborator

@tanzhenxin tanzhenxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tanzhenxin tanzhenxin merged commit d1b761a into QwenLM:main Mar 18, 2026
14 of 15 checks passed
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