feat: /fork and /move slash commands (#297, #298) #310

Merged
dries merged 3 commits from feat/fork-move-slash-commands into main 2026-07-13 13:02:38 +02:00
Owner

Implements #297 (/fork) and #298 (/move) as OpenCode command parity, proxied through the OpenCode SDK.

/fork (#297)

Branches a session via POST /session/{id}/fork. /fork opens a searchable picker with “Full session” plus timestamped user messages. Selecting a prompt sends its messageID; selecting “Full session” forks from HEAD. The UI navigates to the new session on success.

/move (#298)

Relocates a session via POST /experimental/control-plane/move-session. /move opens a searchable picker grouped into the current directory, other known same-host project/worktree directories, and a “Choose another directory…” path-entry dialog. Cross-host destinations are excluded. On success the active session and sidebar update immediately and the projects index refreshes.

Layers

  • platforms: interface methods, request types, and Fork/Move capability flags
  • OpenCode adapter: HTTP proxy for both endpoints
  • sessionsvc: validated Fork/Move mutations
  • server: REST handlers and routes
  • remote gRPC: new RPCs and regenerated proto
  • frontend: commands, API client, capabilities, fork-point picker, move-destination picker, and action dispatch

Verification

  • 1,535 frontend tests pass
  • TypeScript and ESLint/stylelint pass (existing warnings only)
  • Frontend coverage run passes
  • Production frontend build passes
  • Go tests and production build passed for the backend changes
Implements #297 (`/fork`) and #298 (`/move`) as OpenCode command parity, proxied through the OpenCode SDK. ## `/fork` (#297) Branches a session via `POST /session/{id}/fork`. `/fork` opens a searchable picker with “Full session” plus timestamped user messages. Selecting a prompt sends its `messageID`; selecting “Full session” forks from HEAD. The UI navigates to the new session on success. ## `/move` (#298) Relocates a session via `POST /experimental/control-plane/move-session`. `/move` opens a searchable picker grouped into the current directory, other known same-host project/worktree directories, and a “Choose another directory…” path-entry dialog. Cross-host destinations are excluded. On success the active session and sidebar update immediately and the projects index refreshes. ## Layers - `platforms`: interface methods, request types, and `Fork`/`Move` capability flags - OpenCode adapter: HTTP proxy for both endpoints - `sessionsvc`: validated Fork/Move mutations - server: REST handlers and routes - remote gRPC: new RPCs and regenerated proto - frontend: commands, API client, capabilities, fork-point picker, move-destination picker, and action dispatch ## Verification - 1,535 frontend tests pass - TypeScript and ESLint/stylelint pass (existing warnings only) - Frontend coverage run passes - Production frontend build passes - Go tests and production build passed for the backend changes
feat: /fork and /move slash commands (#297, #298)
Some checks failed
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m26s
CI / Frontend (pull_request) Successful in 5m31s
CI / Backend (pull_request) Successful in 7m22s
CI / Coverage Ratchet (pull_request) Failing after 8m32s
CI / Build (pull_request) Successful in 3m20s
CI / Playwright E2E (pull_request) Failing after 5m40s
CI / Semantic Tag (pull_request) Has been skipped
b5b75a5f67
Add OpenCode command-parity for forking a session into a new child
session (/fork) and moving a session to another project directory
(/move), proxied through the OpenCode SDK per the transparent-layer
goal.

- platforms: ForkSession/MoveSession interface methods, request types,
  and Fork/Move capability flags.
- opencode adapter: proxy POST /session/{id}/fork and
  POST /experimental/control-plane/move-session.
- sessionsvc: Fork/Move mutations with validation; both fire the
  SessionCreated hook so the projects index refreshes.
- server: POST /api/session/{id}/fork and /move handlers + routes.
- remote: new Fork/MoveSession gRPC RPCs (proto regenerated),
  remotePlatform + server wiring.
- frontend: /fork and /move built-in commands, api client methods,
  capability flags, and useSessionActions dispatch. /fork forks from
  HEAD and navigates to the new session; /move takes a target dir as
  its argument (a directory picker mirroring DialogMoveSession is a
  follow-up).

Also folds in the pending /worktree-vs-/wt command alias split.

Coverage ratchet: pass

Suite Baseline This PR Δ
go 72.40% 72.50% +0.10
frontend 62.70% 62.85% +0.15

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

<!-- coverage-ratchet --> ### Coverage ratchet: ✅ pass | Suite | Baseline | This PR | Δ | | |---|---|---|---|---| | go | 72.40% | 72.50% | +0.10 | ✅ | | frontend | 62.70% | 62.85% | +0.15 | ✅ | _Tolerance: -0.1%. Baseline stored on `gh-pages`._
dries force-pushed feat/fork-move-slash-commands from b5b75a5f67
Some checks failed
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m26s
CI / Frontend (pull_request) Successful in 5m31s
CI / Backend (pull_request) Successful in 7m22s
CI / Coverage Ratchet (pull_request) Failing after 8m32s
CI / Build (pull_request) Successful in 3m20s
CI / Playwright E2E (pull_request) Failing after 5m40s
CI / Semantic Tag (pull_request) Has been skipped
to c0559f798d
All checks were successful
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m32s
CI / Frontend (pull_request) Successful in 5m27s
CI / Backend (pull_request) Successful in 6m49s
CI / Coverage Ratchet (pull_request) Successful in 8m43s
CI / Build (pull_request) Successful in 3m21s
CI / Playwright E2E (pull_request) Successful in 5m32s
CI / Semantic Tag (pull_request) Has been skipped
2026-07-13 12:11:21 +02:00
Compare
feat(fork): select a message to fork from
Some checks failed
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m50s
CI / Backend (pull_request) Successful in 2m59s
CI / Frontend (pull_request) Successful in 4m47s
CI / Coverage Ratchet (pull_request) Successful in 8m15s
CI / Build (pull_request) Has been cancelled
CI / Playwright E2E (pull_request) Has been cancelled
CI / Semantic Tag (pull_request) Has been cancelled
aa46dc9ba3
feat(move): select a destination directory
Some checks failed
CI / Build Desktop (macOS arm64) (pull_request) Successful in 1m31s
CI / Backend (pull_request) Successful in 4m6s
CI / Frontend (pull_request) Successful in 4m30s
CI / Coverage Ratchet (pull_request) Successful in 7m33s
CI / Build (pull_request) Successful in 4m7s
CI / Playwright E2E (pull_request) Successful in 5m54s
CI / Semantic Tag (pull_request) Has been skipped
CI / Frontend (push) Has been cancelled
CI / Backend (push) Has been cancelled
CI / Coverage Ratchet (push) Has been cancelled
CI / Build Desktop (macOS arm64) (push) Has been cancelled
CI / Playwright E2E (push) Has been cancelled
CI / Build (push) Has been cancelled
CI / Semantic Tag (push) Has been cancelled
b9a13d64da
dries merged commit b9a13d64da into main 2026-07-13 13:02:38 +02:00
dries deleted branch feat/fork-move-slash-commands 2026-07-13 13:02:39 +02:00
Sign in to join this conversation.
No description provided.