Skip to content

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

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

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