Skip to content

feat(#7): concurrent sidecar session management#20

Merged
wpm merged 1 commit intomainfrom
7-concurrent-sidecars
Mar 1, 2026
Merged

feat(#7): concurrent sidecar session management#20
wpm merged 1 commit intomainfrom
7-concurrent-sidecars

Conversation

@wpm
Copy link
Contributor

@wpm wpm commented Mar 1, 2026

Summary

  • Rust backend extended with BuildSidecarState (map of session ID → child process), three new Tauri commands (sidecar_start_build, sidecar_stop_build, sidecar_list_builds), and a MAX_CONCURRENT_BUILDS = 3 constant; each build sidecar emits events on session-scoped channels (sidecar://token/<sessionId>, sidecar://complete/<sessionId>)
  • New useBuildSessions hook manages concurrent build sessions with startBuild(org, repo), stopBuild(sessionId), and selectSession(sessionId) operations; subscribes to sidecar://build/status events for automatic status updates
  • useBuildStream updated to accept an optional sessionId parameter for scoped event channels (falls back to global channels when omitted)
  • BuildStreamPanel updated with a session tab bar (shown when multiple sessions are active), backed by SessionStream sub-component that scopes useBuildStream to the selected session
  • WaveSidebar updated with ActiveBuildSelector tab bar at the top of the content area (shown when sessions.length > 1 and onSelectSession is provided)
  • BuildSession and BuildSessions types added to src/lib/build.ts

Test plan

  • All 258 tests pass (pnpm test)
  • ESLint passes with --max-warnings 0 (pnpm lint)
  • Prettier formatting clean (pnpm format:check)
  • Start two builds and verify both sessions appear as tabs in BuildStreamPanel and WaveSidebar
  • Switch between session tabs and verify each shows independent output
  • Attempting a 4th concurrent build is rejected with "Maximum concurrent builds (3) already reached"
  • Stopping a build marks it as cancelled and switches the active session to another running one

Closes #7

🤖 Generated with Claude Code

- Add BuildSession and BuildSessions types to src/lib/build.ts
- Extend Rust backend with BuildSidecarState (map of session ID → process),
  sidecar_start_build, sidecar_stop_build, sidecar_list_builds commands, and
  MAX_CONCURRENT_BUILDS = 3 constant; each build session emits events on
  sidecar://token/<sessionId> and sidecar://complete/<sessionId> channels
- Add useBuildSessions hook with startBuild/stopBuild/selectSession operations
  and automatic status updates via sidecar://build/status Tauri events
- Update useBuildStream to accept optional sessionId param for scoped channels
- Update BuildStreamPanel to render session tab bar when multiple builds active
- Update WaveSidebar to render ActiveBuildSelector when multiple builds active
- 18 new tests across useBuildSessions, useBuildStream, BuildStreamPanel, and
  WaveSidebar; all 258 tests pass with ESLint --max-warnings 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@wpm wpm merged commit 228da11 into main Mar 1, 2026
6 checks passed
@wpm wpm deleted the 7-concurrent-sidecars branch March 1, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Concurrent sidecar session management

1 participant