Skip to content

fix(app): dismiss session sidebar on selection for narrow displays#37827

Open
bmpenuelas wants to merge 1 commit into
anomalyco:devfrom
bmpenuelas:mobile-sidebar-dismiss
Open

fix(app): dismiss session sidebar on selection for narrow displays#37827
bmpenuelas wants to merge 1 commit into
anomalyco:devfrom
bmpenuelas:mobile-sidebar-dismiss

Conversation

@bmpenuelas

Copy link
Copy Markdown

Issue for this PR

Fixes #37746
References #24577
Supersedes #14709

Type of change

  • Bug fix
  • [ ] New feature
  • [ ] Refactor / code improvement
  • [ ] Documentation

What does this PR do?

On mobile, selecting a session from the session sidebar can leave the sidebar fully covering the chat view. This makes it impossible for the user to click/tap the session to dismiss the sidebar, so they feel locked.

This keeps the existing behavior on wider layouts, where the user can still tap/click outside the sidebar. On narrow layouts where the sidebar is effectively full-width, selecting a session now dismisses it so the selected session becomes visible.

The fix reuses the existing mobile sidebar dismissal path and adds a regression test for narrow session selection.

How did you verify your code works?

  • bun: run app typecheck and tests for the parts affected by this PR. There are preexisting errors outside the scope of this PR which have been left untouched.
  • Manual: narrow viewport, open the session sidebar, select a session, confirm the sidebar closes and the selected session is visible.
  • Manual: wider viewport, select a session and confirm the current sidebar behavior is preserved.

Screenshots / recordings

No UI changes, only UI-behavior changed.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On mobile, session sidebar stays open after selecting a session, hiding the session

1 participant