Skip to content

fix(app): keep the mobile drawer open while a session loads - #59427

Merged
kitlangton merged 1 commit into
devfrom
beta-e2e
Oct 30, 2026
Merged

kitlangton merged 1 commit into
devfrom
beta-e2e

Conversation

@kitlangton

@kitlangton kitlangton commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Before: On mobile, the tabs drawer closed on its own when it was reopened while a session was still loading, because the composer grabbed focus from the tab link inside the drawer dialog.

After: The composer leaves focus alone when the tab link sits in a dialog, so the drawer stays open.

The rest of this PR was dev's #59160, which dev already has.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The change looks sound from reading the code. I couldn't run the Playwright specs here because there are no browsers in this environment. tsc -b in packages/app passes, and the unit tests under src/session pass (122). The new autofocus guard in session/composer/controller.ts only affects the mobile tabs drawer: the desktop vertical tabs sidebar has no role="dialog" above it, so clicking a tab there still focuses the composer. On mobile, picking a tab closes the drawer anyway, so not focusing the composer from inside it changes nothing users rely on. CI on Windows remains the proof for the drawer race.

Public API: unchanged.

No concerns.

@thdxr
thdxr changed the base branch from beta to dev October 27, 2026 16:37
@kitlangton kitlangton changed the title fix(app): get beta's e2e green fix(app): keep the mobile drawer open while a session loads Oct 27, 2026

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This push only rebases the PR onto dev and drops the #59160 cherry-pick. The autofocus guard in session/composer/controller.ts is unchanged from the version I reviewed before. On the new base it still only applies inside the mobile drawers, so tab clicks on desktop still focus the composer. tsc -b in packages/app printed no errors and the src/session unit tests pass (126). I couldn't run the Windows-only mobile-session e2e test here, so CI remains the proof for the race.

Public API: unchanged.

No concerns.

@kitlangton
kitlangton merged commit 50ea8d5 into dev Oct 30, 2026
22 checks passed
@kitlangton
kitlangton deleted the beta-e2e branch October 30, 2026 02:39
@amrkmn amrkmn mentioned this pull request Oct 30, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant