feat(ui): launch session from locked composer #156

Merged
dries merged 1 commit from feat/launch-session-from-locked-composer into main 2026-06-24 23:25:15 +02:00
Owner

When no live OpenCode instance is available, the composer is locked and previously only showed a passive "No live connection" hint. The only ways to launch were the sidebar/header button, clicking the locked area (undiscoverable), or the disconnected toast.

This adds a green Launch session button directly in the locked composer bar. It calls the existing handleLaunchOpencode (spawns opencode --port 0 in tmux) directly, shows "Launching…" while in flight, and skips the intermediate disconnected toast. Clicking the disabled area still works as a fallback.

Changes

  • Composer.tsx — new launching prop; the disabled-state hint becomes a real Launch button when onLaunchRequest is wired.
  • SessionDetail.tsxonLaunchRequest now calls the real launcher directly; removed the now-dead handleLaunchHintClick.
  • Composer.css.oc-bar-launch styling.
When no live OpenCode instance is available, the composer is locked and previously only showed a passive "No live connection" hint. The only ways to launch were the sidebar/header button, clicking the locked area (undiscoverable), or the disconnected toast. This adds a green **Launch session** button directly in the locked composer bar. It calls the existing `handleLaunchOpencode` (spawns `opencode --port 0` in tmux) directly, shows "Launching…" while in flight, and skips the intermediate disconnected toast. Clicking the disabled area still works as a fallback. ## Changes - `Composer.tsx` — new `launching` prop; the disabled-state hint becomes a real Launch button when `onLaunchRequest` is wired. - `SessionDetail.tsx` — `onLaunchRequest` now calls the real launcher directly; removed the now-dead `handleLaunchHintClick`. - `Composer.css` — `.oc-bar-launch` styling.
feat(ui): launch session from locked composer
All checks were successful
CI / Frontend (pull_request) Successful in 3m58s
CI / Backend (pull_request) Successful in 4m58s
CI / Build Desktop (macOS arm64) (pull_request) Successful in 51s
CI / Playwright E2E (pull_request) Successful in 6m23s
CI / Build (pull_request) Successful in 3m11s
CI / Semantic Tag (pull_request) Has been skipped
CI / Coverage Ratchet (pull_request) Successful in 6m48s
f85b57faa4
Replace the passive "No live connection" hint in the disabled composer
with a "Launch session" button that starts opencode --port 0 in tmux
directly, instead of routing through the disconnected toast.

Coverage ratchet: pass

Suite Baseline This PR Δ
go 68.90% 68.90% +0.00
frontend 54.21% 54.20% -0.01

Tolerance: -0.1%. Baseline stored on gh-pages.

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 68.90% | 68.90% | +0.00 | ✅ | | frontend | 54.21% | 54.20% | -0.01 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
dries merged commit f282023761 into main 2026-06-24 23:25:15 +02:00
Sign in to join this conversation.
No description provided.