Repository navigation
fix(app): keep the mobile drawer open while a session loads - #59427
Conversation
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.