You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Web UI (V2) buttons unresponsive in browser mode (opencode serve) #37227
Bug: Web UI (V2) buttons unresponsive in browser mode (opencode serve)
Environment
Version: 1.18.2
OS: Linux (WSL2), accessing from Windows Chrome
Command: opencode web --hostname=0.0.0.0
Platform: Web (browser), NOT Tauri desktop app
Description
When running opencode serve (web server mode), the web UI loads and renders correctly (session list, header, icons all display), but all interactive buttons do nothing when clicked. Specifically:
The "New session" (+) button renders but clicking has no effect (no API call, no navigation)
Settings, Help, and other buttons similarly unresponsive
No console errors or warnings
No failed network requests
Root Cause Analysis
After extensive debugging with Playwright:
The JS bundle loads correctly (200, Content-Type: text/javascript, correct CORS headers)
125 addEventListener calls ARE attached to document for event delegation
DOM elements render with correct data-component attributes (e.g., icon-button-v2, tooltip-v2-trigger)
Click events reach the button element (confirmed by intercepting click events)
However, the framework's event delegation handler does NOT process these clicks
The button's onclick property is null — the framework relies on document-level delegation but the delegation path fails to match and trigger actions. All UI components use -v2 suffix (icon-button-v2, tooltip-v2-trigger, etc.).
The JS bundle references window.__TAURI__ (function yw=()=>window.__TAURI__), suggesting the V2 UI was designed for the Tauri desktop app and some initialization path differs in pure browser mode.
Steps to Reproduce
Run opencode web --hostname=0.0.0.0
Open http://localhost:4096 in a browser
Observe the session list / empty state renders
Click the "+" button (New session) — nothing happens
Click Settings — nothing happens
Open DevTools console — no errors shown
Workaround
setTimeout(()=>{constbtn=document.querySelector('button[aria-label="New session"]');if(btn){btn.addEventListener('click',async()=>{constres=awaitfetch('/api/session',{method: 'POST',headers: {'Content-Type':'application/json'},body:'{}'});const{ data }=awaitres.json();window.location.href='/?session='+data.id;});}},3000);
If your issue is distinct from these (e.g., specifically about event delegation failing for all buttons rather than individual feature bugs), please add a note clarifying the difference.
Activity
github-actions commentedon Jul 16, 2026
This issue might be a duplicate of existing issues. Please check:
opencode servebrowser mode, interactive elements not workingIf your issue is distinct from these (e.g., specifically about event delegation failing for all buttons rather than individual feature bugs), please add a note clarifying the difference.
github-actions commentedon Sep 15, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.