feat(app): add shell mode toggle button to v2 composer toolbar#33609
Open
dzianisv wants to merge 3 commits into
Open
feat(app): add shell mode toggle button to v2 composer toolbar#33609dzianisv wants to merge 3 commits into
dzianisv wants to merge 3 commits into
Conversation
Adds an explicit shell mode toggle button (console icon) to the v2 composer toolbar, making shell mode discoverable without requiring users to know the '!' shortcut or Cmd+Shift+X keybind. The button sits between the attach (+) button and the agent picker. It toggles between normal and shell mode, rendering with a pressed state indicator when shell mode is active. Also adds the 'console' icon to the v2 icon sprite so it renders consistently with other v2 toolbar icons. Resolves: anomalyco#26513
Covers: - button is visible in v2 composer toolbar - button click enters shell mode (aria-pressed=true, font-mono class) - second click exits shell mode - Escape key exits shell mode entered via button - existing '!' shortcut still works and button reflects state
- Add toBeFocused() wait before keyboard.press('!') and Ctrl+Shift+X
to ensure focus is settled on the contenteditable before keydown
- Add v1 layout negative test: button must not appear when
newLayoutDesigns is false (catches accidental v1 toolbar leakage)
- Add data-state='pressed' assertion alongside aria-pressed to verify
the visual pressed state on IconButtonV2 is actually set
- Tighten font-mono class assertion to exact Tailwind class 'font-mono!'
via toHaveAttribute('class', /font-mono!/) — avoids false substring matches
- Add Ctrl+Shift+X keybind test to verify the registered mod+shift+x
shortcut still enters shell mode with button state parity
2a72ce8 to
33ae00a
Compare
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.
Issue for this PR
Closes #26513
Type of change
What does this PR do?
Adds an explicit shell mode toggle button (console icon) to the v2 composer toolbar, making shell mode discoverable without requiring users to know the
!shortcut orCmd+Shift+Xkeybind.Changes:
consoleicon to the v2 icon sprite (packages/ui/src/v2/components/icon.tsx).IconButtonV2shell mode toggle button in the v2 composer toolbar, between the attach (+) button and the agent picker.data-state="pressed"+aria-pressedwhen shell mode is active.!/Cmd+Shift+X).!, keybinds, Esc to exit).e2e/regression/prompt-shell-mode-button.spec.tswith 7 tests.Tests
aria-pressed,data-state="pressed",font-mono!class!shortcut parityCtrl+Shift+Xkeybind parityHow did you verify your code works?
bun turbo typecheck— 24/24 packages pass.Checklist