Fix shell_and_cli command backstack test: clear history with @clear, keeping prior-session commands in the up-arrow back stack#2455
Merged
robgruen merged 4 commits intoJun 7, 2026
Conversation
Copilot created this pull request from a session on behalf of
robgruen
June 6, 2026 19:57
View session
robgruen
requested changes
Jun 7, 2026
Collaborator
robgruen
left a comment
There was a problem hiding this comment.
previous session commands should be in the back-stack of commands
Contributor
Author
Agreed — reverted the change that excluded prior-session commands from the back stack, so replayed history is seeded into the up-arrow stack again (the base branch already does this). To keep the shared-session |
Copilot
AI
changed the title
Fix shell_and_cli command backstack test: exclude prior-session history from the up-arrow back stack
Fix shell_and_cli command backstack test: clear history with @clear, keeping prior-session commands in the up-arrow back stack
Jun 7, 2026
robgruen
approved these changes
Jun 7, 2026
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.
The
shell_and_cli (windows-latest, 22)job failed on thecommand backstackshell test — ArrowUp past the startup greeting surfaced@shell setWindowZoomLevel 100(a command persisted by an earlier serial test) instead of clamping at the expected command.Root cause — the serial shell tests share one session, so the dispatcher's persisted display history (every prior run's commands) is replayed into the ArrowUp back stack on startup via
ChatPanel.replayHistory(). Thecommand backstacktest was asserting against a clean stack and tripped over the leaked prior-session commands.Per review feedback, prior-session commands should remain in the back stack — replaying them is the intended behavior. So instead of excluding them, the affected test starts from a clean slate by issuing
@clear.Changes
chatPanel.ts—clear(): also reset the up-arrow back stack (commandHistory/historyIndex).@clear("reset the chat") now clears the command recall history as well, so it can be used to start from an empty stack.hostWindow.spec.ts—command backstacktest: issue@clearat the start of the test so the shared-session back stack begins empty, then assert against this test's current-session commands (@history,@help,@config agent). The startup-greeting expectation was removed since@clearclears it along with the prior-session history.The earlier exclusion-based commits on this branch (skipping replayed entries,
@exitfiltering, ArrowUp/ArrowDown delta swap) were reverted back to the base branch behavior, which keeps prior-session commands in the back stack.Net effect: prior-session commands stay recallable in normal use, and the test deterministically walks
[@config agent, @help, @history], clamping at@history.