anomalyco / anomalyco/opencode
Web UI: Home is empty and "New session" flow crashes with generic app error (v1.18.31)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Web UI: Home is empty and "New session" flow fails with generic app error
Version: opencode 1.18.31 (latest release, 2026-09-14)
Platform: Windows 11 Pro x64, web server started via start-web.ps1 (opencode serve), accessed both locally (http://127.0.0.1:4096) and over a proxy domain with HTTP basic auth.
Symptom 1 — Home never lists sessions
The sidebar's Session list / "Home" page always shows the empty state:
Здесь пока ничего нет / Создайте сессию, чтобы начать
even though the database contains 30 sessions (verified in opencode.db, project table row global with worktree set to the project dir, vcs=git, 30 rows in session, project_directory table empty).
API side works correctly: GET /api/session?limit=5000&order=desc returns all 30 sessions with the project directory; GET /project returns the global project (worktree) with .git detected; GET /path returns correct worktree/directory.
The web client never renders a single sessions row. The Home list-query (v2.session.list) appears to be gated behind enabled: server.focusedContext() / an in-UI "current project" that is never auto-selected even though only one project exists.
Symptom 2 — "Open project" picker is unusable for real paths
The folder picker opened from the top-left "open project" icon:
- starts at the user home dir (
C:/Users/Kondratskiy/*) only — no other drives are reachable (noD:entry anywhere); - has a "search folders" input that filters only the currently displayed list, it does not search recursively;
- typing an absolute path (
D:\opencode_rcc_ipksz) and pressing Enter does nothing.
So a project located outside the home directory cannot be opened from the web UI at all.
Symptom 3 — "New session" from the picker crashes the app
Flow: open project picker -> navigate into any folder -> click "New session" -> browser navigates to /new-session?draftId=<uuid> and shows the SolidStart error boundary.
Behind the overlay the new-session editor visibly renders (title "New session", prompt input, model selector, sidebar shows the picked folder), but no session row is ever persisted (session table unchanged after several attempts). The draft creation is thus broken end-to-end.
/new-session without draftId does not error — it just redirects to the empty Home.
Repro
- Run
opencode serve --hostname 0.0.0.0(1.18.31); openhttp://127.0.0.1:4096/. - See the empty Home.
- Click the top-left open-project icon -> picker lists only
C:\Users\<user>/*. - Click any folder row, then "New session" -> error boundary at
/new-session?draftId=..., nothing saved.
Expected
- Home lists the sessions of the (single) project, or at least a visible "current project" selector once a project exists.
- The project picker can reach any drive / accept an absolute path.
- "New session" completes and creates a session row.
Workaround (works)
- Open a session directly by URL:
/global/session/<id>” renders fine. - Create sessions via
POST /api/session” works, and the created sessions open by URL.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the listed Windows opencode serve reproduction, then trace the Home list-query (v2.session.list) and its server.focusedContext() gate, followed by the /new-session?draftId=... route and project-picker flow. Done means the single project's sessions appear, folders outside the home directory can be selected or addressed by absolute path, and New session persists a row without the error boundary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100