Skip to content

web: cannot add a project below 768px — "Add project" control absent from DOM in mobile layout #50459

Closed as not planned

Description

@atiqrahmanx

Summary

On viewports narrower than 768px, the web UI renders no way to add a project. The "Add project" control is not merely hidden — it is absent from the DOM entirely. Because the project list is stored per-browser in localStorage, a device that has never added a project has no path to one, making the web UI a dead end on phones.

Environment

  • opencode version: v2.0.12
  • Server: Linux x64, started via opencode serve (background service)
  • Reproduced directly against http://127.0.0.1:49374 with no reverse proxy, and separately through an HTTPS proxy — same result both ways.

Reproduction

  1. Start an opencode v2 server (opencode serve).
  2. Open the web UI in a browser at a viewport narrower than 768px — a phone, or a desktop window resized.
  3. Observe the home screen: only Home and All projects are offered.
  4. Try to add a project.

Actual behavior

No add-project affordance exists. Querying the DOM for any button/[role=button]/a whose text or aria-label matches /add project/i returns 0 elements. New session is present in the DOM but renders with a 0×0 box, so it is not clickable either.

Expected behavior

Some path to add a project on mobile viewports.

Breakpoint

Measured by sweeping viewport width (height 874), counting dom/visible:

width Add project New session layout
1024 2/2 1/1 desktop
800 2/2 1/1 desktop
768 2/2 1/1 desktop
760 0/0 1/0 mobile
700 0/0 1/0 mobile
600 0/0 1/0 mobile
402 0/0 1/0 mobile

Works at ≥768px, fails at ≤760px.

Not engine-specific

Tested with Playwright against the same server at 402×874. Chromium 153, Firefox 155 and WebKit all produce identical results — same 9 buttons, same mobile layout, New session hidden in all three, and no console errors or uncaught exceptions in any of them.

engine 1440px 402px
Chromium 153 Add project 2/2 0/0
Firefox 155 Add project 2/2 0/0
WebKit Add project 2/2 0/0

Impact

Reported originally as "can't create a new project" from a phone. Since localStorage holds the project list per browser, this is not recoverable from the device itself — the user must open the same server from a ≥768px viewport first.

Activity

  1. opencodejr commented on Oct 28, 2026

    @opencodejr
    Contributor

    Thanks for the detailed report and the breakpoint sweep. I tried this on v2.0.12 (opencode serve on Linux, fresh browser profile with no projects, Playwright Chromium at 402px and 760px wide) and couldn't reproduce a missing control.

    Below 768px the sidebar is replaced by the All projects dropdown at the top of the home screen. Its contents only exist in the page while it is open, so a DOM query on the closed page finds no "Add project" control. Once you tap All projects, the list shows an Add project row. Tapping it opens the "Open project" folder picker, and the project can be added from the phone. The screenshots below show the open dropdown and the picker.

    So it works as designed, though the control is clearly easy to miss. Making these actions easier to find on mobile is part of #59069 (a dedicated mobile layout for the web app), which lists this issue as one of its examples. If you'd like a clearer entry point, that may be the better place, or this could be refiled as a feature request.

    If tapping All projects doesn't show an Add project row for you, please tell us:

    • whether you have more than one server connected, or a server that needs sign-in
    • whether you're on a newer version than 2.0.12
    • a screenshot of the open dropdown
  2. opencodejr commented on Oct 31, 2026

    @opencodejr
    Contributor

    Closing this as not planned, since we haven't heard back. On v2.0.12, below 768px, Add project is inside the All projects dropdown at the top of the home screen. It isn't in the page until the dropdown is opened, which is why the DOM query found nothing. Tapping it opens the folder picker, so a project can be added from a phone.

    If tapping All projects doesn't show Add project for you, please reply with your version, whether you have more than one server or one that needs sign-in, and a screenshot of the open dropdown, and we can reopen this. Work on making this easier to find on mobile is tracked in #59069.

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