Skip to content

Make the side panel on phones a proper dialog - #399

Merged
abhishekgahlot2 merged 1 commit into
useagenthq:mainfrom
coolestnick:fix/phone-side-panel-dialog
Nov 2, 2026
Merged

abhishekgahlot2 merged 1 commit into
useagenthq:mainfrom
coolestnick:fix/phone-side-panel-dialog

Conversation

@coolestnick

@coolestnick coolestnick commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #347

What changed

  • On phones the side panel is now a real modal dialog. Focus moves in on open, Tab stays inside, screen readers can't reach the conversation, and closing returns focus to the open button.
  • The new useSheetDialog hook follows the WAI-ARIA modal pattern on the existing panel. A portalled Modal or Drawer would remount the terminal, browser and editors, and showModal() would sit above the command palette.
  • The same applies to the sheet on wider screens when the split is too narrow.
  • "Ask agent to redo" now closes the sheet so the reply box can take focus.
  • aria-hidden is now a direct dependency, at the version already installed through Radix.

Testing

Real Chrome at 390px, production build:

Check Before After
Focus on open Page body Inside the panel
Tab presses leaving the panel 15 of 28 0 of 148
Items a screen reader can reach behind the panel 30 0
Focus on close Lost Open button

Desktop is unchanged. bun run test (1795 pass), bun run typecheck, bun run lint, bun run build and bun test scripts/agent-docs.test.ts all pass.

Not tested: VoiceOver on a real iPhone, and "Ask agent to redo" in a browser (unit tests only).

Screenshots

The layout doesn't change, so these look alike.
after-panel-closed
after-panel-open
before-panel-open


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

On a phone the side panel is a bottom sheet, but it behaved like a plain
panel: focus stayed behind it, Tab walked the conversation and VoiceOver
could swipe into it.

Add useSheetDialog, which applies the WAI-ARIA modal dialog pattern to the
always-mounted rail. Portalled primitives would remount the terminal,
browser and editors, and showModal() would sit above the command palette.
The same behaviour covers the too-narrow split on wider screens.
@coolestnick
coolestnick force-pushed the fix/phone-side-panel-dialog branch from ae06e4f to 7349fba Compare October 31, 2026 19:45
@abhishekgahlot2
abhishekgahlot2 merged commit c8f5652 into useagenthq:main Nov 2, 2026
21 checks passed
@abhishekgahlot2

Copy link
Copy Markdown
Contributor

Merged, thanks @coolestnick! The phone panel finally behaves like a real dialog.

@github-actions github-actions Bot locked and limited conversation to collaborators Nov 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the side panel on phones a proper dialog

2 participants