feat(cli): warn users that rewind is disabled in IDE mode - #4122
Conversation
There was a problem hiding this comment.
Pull request overview
Adds clearer UX around the fact that rewind is not available when IDE mode is enabled, by surfacing warnings at startup and providing inline feedback when users attempt to rewind.
Changes:
- Add a settings-based startup warning when
ide.enabled: trueindicating/rewindis disabled. - When
/rewindis invoked in IDE mode, add an inline info history item explaining rewind is disabled. - Disable the double-ESC rewind trigger path entirely in IDE mode to avoid contradictory prompts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/cli/src/ui/AppContainer.tsx | Adds IDE-mode guardrails for /rewind and double-ESC rewind behavior. |
| packages/cli/src/config/settings.ts | Emits a startup warning when IDE mode is enabled to explain rewind limitations. |
| packages/cli/src/config/settings.test.ts | Adds tests asserting the new IDE-mode startup warning behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
wenshao
left a comment
There was a problem hiding this comment.
Previously, when IDE mode was enabled, /rewind and double-ESC silently did nothing. This was confusing for users who didn't know why rewind was unavailable. - Add a startup warning when ide.enabled is true - Show an inline info message when user invokes /rewind in IDE mode - Skip double-ESC rewind flow entirely in IDE mode to avoid the contradictory "Press Esc again to rewind" → "Rewind is disabled" UX 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
Cover the two UI code paths: - openRewindSelector shows info message and does not open selector when IDE mode is enabled - openRewindSelector opens selector normally when IDE mode is disabled 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
The startup warning is unnecessary noise for IDE mode users who don't use rewind. The inline info message on /rewind attempt is sufficient feedback at the right moment. 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
Adds a complementary assertion verifying that addItem is NOT called when IDE mode is disabled (i.e., the IDE guard branch is not taken), alongside the existing isRewindSelectorOpen check. 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
ink-testing-library does not synchronously re-render React state transitions triggered by UIActions callbacks, causing isRewindSelectorOpen to remain false in CI. Use the addItem not-called assertion instead to verify the IDE guard was not taken. 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
- Move dialogsVisibleRef check before IDE mode guard so info message is not injected while a dialog is open - Add comment explaining why the IDE guard in openRewindSelector is not redundant with the keyboard handler guard 🤖 Generated with [Qwen Code](https://github.com/QwenLM/qwen-code)
3622b08 to
fa836f1
Compare
wenshao
left a comment
There was a problem hiding this comment.
No issues found. LGTM! ✅ — DeepSeek/deepseek-v4-pro via Qwen Code /review
Summary
ide.enabled: true), rewind (/rewindand double-ESC) was silently disabled, confusing users/rewindis explicitly invoked in IDE modeTest plan
Test 1:
/rewindcommand in IDE modeide.enabled: truein~/.qwen/settings.json, launch CLI, send a message (hi), wait for response, then type/rewindTest 2: Double-ESC in IDE mode
Test 3: Normal behavior with IDE mode disabled
ide.enabled: false, launch CLI, send a message (hello), wait for response, then type/rewindBonus: No startup warning
ide.enabled: true, CLI launches cleanly with no warning banner — the feedback is only shown at the point of use (/rewind)🤖 Generated with Qwen Code