Skip to content

Tapping a session on mobile doesn't close the sidebar #24577

Closed as not planned
Closed as not planned

Description

@dellarb

Description

roblem
On mobile viewports, tapping a session in the sidebar navigates to that session, but the sidebar remains open. You have to manually close the sidebar afterward, making session switching on mobile a two-step process (tap session → tap to close sidebar) instead of one.

Expected behavior
Tapping a session on mobile should navigate to the session and close the sidebar, so the user lands directly in the chat view.

Root cause
SessionItem (packages/app/src/pages/layout/sidebar-items.tsx) renders each session as an (SolidJS router link). The onClick handler only clears hover state on non-expanded sidebars:

// SessionRow onClick
onClick={() => {
if (props.sidebarOpened()) return
props.clearHoverProjectSoon()
}}
It never calls layout.mobileSidebar.hide(). By contrast, navigateWithSidebarReset() in layout.tsx does both:

const navigateWithSidebarReset = (href: string) => {
clearSidebarHoverState()
navigate(href)
layout.mobileSidebar.hide()
}
But since SessionItem uses declarative navigation, it bypasses that function entirely.

Suggested fix
Pass layout.mobileSidebar.hide (or a callback that includes it) down to SessionItem/SessionRow and call it in the onClick handler when on mobile (or unconditionally — mobileSidebar.hide() is a no-op on desktop). This aligns session-tap behavior with navigateWithSidebarReset and the NewSessionItem component, which also needs the same fix.

Plugins

No response

OpenCode version

OpenCode Desktop v1.14.21

Steps to reproduce

  1. Open mobile code webui on mobile
  2. Open a project with multiple sessions
  3. Click the menu to change between sessions and note that clicking on the sesison name does not close the menu which remains full screen. Must re-click the menu button to close

Screenshot and/or share link

No response

Operating System

Hosting on Debian, Mobile is Android

Terminal

No response

Activity

  1. github-actions commented on Apr 27, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. removed
    bugSomething isn't working
    webRelates to opencode on web / desktop
    on May 3, 2026
  3. github-actions commented on Jul 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions