Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
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
addEventListenercalls ARE attached todocumentfor event delegation - DOM elements render with correct
data-componentattributes (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:4096in 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(() => {
const btn = document.querySelector('button[aria-label="New session"]');
if (btn) {
btn.addEventListener('click', async () => {
const res = await fetch('/api/session', { method: 'POST', headers: {'Content-Type':'application/json'}, body:'{}' });
const { data } = await res.json();
window.location.href = '/?session=' + data.id;
});
}
}, 3000);Related Issues
- Edit Project dialog crashes with useDialog must be used within a DialogProvider in browser web mode (opencode web) #35132 (Edit Project dialog crashes with useDialog in browser web mode)
- Copy button on code blocks in web UI does not copy to clipboard (V2 UI) #37189 (Copy button on code blocks in web UI does not copy to clipboard - V2 UI)
Reacted by Nick and aquamoedev
Reacted by mt-22
Metadata
Metadata
Assignees
Labels
No labels
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.