Remove superseded MVP/UI/tool-rendering specifications, duplicate implementation and index summaries, completed attachment planning, incident readouts and redundant CI/pruning/native-backport reports at the user's explicit request. Trim the worktree validation diary while retaining placement, ownership and native-instruction contracts.
Preserve public extension contracts, attribution/licenses, private RPC safety, runtime capability policy and vendor patch provenance/removal criteria. Redirect native-backport instructions to the existing vendor README and remove dangling deployment links and a stale architecture dependency snapshot.
Validation: Markdown-only diff, whitespace checks and repository-wide checks for removed-file references. No runtime source, tests, build dependencies, installed application or shared OpenCode service is changed.
Batch branch and HEAD annotations from one Git worktree snapshot while retaining native inventory authority, physical local-repository identity and configured effective-root validation. Preserve fresh family transaction scans, mutation fencing and rollback without spawning three Git processes per checkout.\n\nKeep pending worktree selections in the store by instance and family so the target and busy state survive navigation, simultaneous moves and selector remounts. Independent gatekeeper review found two P2 issues; both were fixed and round two reported zero findings on f971419a.\n\nValidation includes 40 focused server tests, 13 real-component browser tests, UI/server typechecks, UI build, and isolated official OpenCode 2.0.11 native worktree/family integration. CI platform/native/runtime checks pass. Admin merge is user-authorized despite two system-message-search browser failures reproduced identically on the clean dev base; evidence and the review loop are published on the PR.
## Summary
Follow-up to merged #649. Search/filter mode now displays independent,
flat session results. A localized **Show subsessions** switch (off by
default) includes matching children without requiring their parents.
Each result uses its own native worktree, activity timestamp, name,
badge and selection identity. Closing search restores normal hierarchy.
Native search results no longer hydrate ancestors just to render a
child. Request-authority/deletion fences remain covered, and unqueried
flat filters exhaust normal pagination. This supersedes the temporary
root-only filter adjustment published on the former PR branch after #649
merged.
## Validation
- UI typecheck and production build passed.
- 14 session-tree and 65 request-authority cases passed.
- Real Solid/browser regression passed: toggle, activity/name/worktree
sorts, combined text/directory filters, child badges, bulk selection,
navigation, missing parents, and hierarchy restoration.
- Rebuilt UI loaded in installed Windows Tauri: an existing child in
D:\CodeNomad appeared alone under Workspace while its parent remained in
pr649-final. Disabling subsessions or selecting the parent checkout hid
it; closing search restored hierarchy and kept the current conversation
active. No native locations changed.
- One 30-second desktop search wait expired; the repeat completed within
the extended 90-second bound. Search still traverses the local worktree
catalogue; no latency guarantee is claimed.
- Follow-up commit tree exactly matches the tested tree on the original
worktree branch; it is based directly on the #649 squash merge in dev.
## Maintenance note
Existing touched oversized files: session-list.tsx (~1022 lines),
session-api.ts (~1732), session-state.ts (~1307),
session-request-authority.test.ts (~2016). No size-only refactor
included.
## Summary
Manage complete session families across the opened local repository's
native OpenCode worktrees. This supersedes #642 with the V2
implementation and addresses #319.
- OpenCode owns `worktree.refresh/list/create/remove`; CodeNomad
supplies the default directory, named-branch policy, local repository
scope and verified family transactions.
- A project is the opened local checkout and its registered worktrees,
identified through the physical Git common directory. Independent clones
sharing an OpenCode project ID stay separate.
- Session rows, composer selection, search and the Git panel follow
native `SessionInfo.location.directory`. Durable metadata is preserved,
but old `worktreeSlug` metadata does not override native placement.
- Creation uses the selected checkout's revision and the main local
checkout's `.codenomad/worktrees` parent. Uncommitted edits stay in the
source checkout. External registered worktrees remain discoverable.
- Keep copy/open/delete actions in the accessible selector, remove the
redundant action bar, hide root-workspace badges, and explain “Create
and use” in all ten locales.
## Current base and native contract
This branch includes merged `dev@e47e01c6`, including #697's separately
reviewed discovery/status compatibility fix. UI/server pin
`@opencode/client@2.0.4`; the independently managed daemon has no
exact-version startup gate.
- Complete bounded inventories use opaque native cursors; continuations
send only the cursor.
- Moves are serialized across complete families, block active sessions,
verify authoritative native locations and roll back partial failures.
- Native move events refresh placement and the catalogue without
speculative cross-project transfers.
- Opaque worktree identifiers are separate from mutable branch labels.
The main checkout cannot be removed.
- Native detached creation is followed by ordinary Git branch selection,
preserving Git's refusal to reuse a checked-out branch;
branch-attachment failure cleans up through the native API.
- Agent placement instructions distinguish creating a checkout, one-off
commands and moving the conversation's execution context. Explicit
attachment choices are preserved.
## Deletion safety
- Physical checkout reservations cover published and in-flight logical
workspaces.
- Project serialization and deletion fences cover all family
source/destination checkouts.
- Complete inventories and cross-project checks run inside the deletion
fence, including nested workspaces and owned Shell/PTY resources.
- Canonical path, filesystem identity, registration, branch, HEAD and
active sessions are rechecked before removal. Replacement checkouts fail
closed; rollback requires the original identity.
## Recovery and Git-panel corrections
Validation on the real repository exposed serial enumeration of 162
worktrees and concurrent ownership misses launching overlapping
inventories. Git annotations now run with bounded concurrency, pending
catalogue reads are shared, and negative ownership results are
snapshot-cached. A regression exercises 40 concurrent misses.
The Git panel now treats its complete local staged/unstaged inventory as
authoritative instead of resurrecting native-only stale rows. It also
rechecks the selected worktree/request after waiting for native VCS
status.
## Validation
Latest integration validation:
- Isolated official **OpenCode 2.0.0 and 2.0.7**: production
discovery/status, native worktree discovery/create/remove, selected
HEAD/default parent/named branches, independent-clone scope, stable IDs,
nested paths, checked-out/dirty guards, complete family moves and
rollback.
- Real Solid selector browser tests: mouse, keyboard, touch, actions
without session movement, creation source and returned stable ID.
- Targeted server ownership/cache/manager/proxy/route/location tests; UI
session projection/request-authority/lifecycle tests; family
evacuation/rollback and Git model regressions.
- UI/server typechecks and production server build including the UI.
- Installed Windows Tauri application on the actual repository:
dedicated session creation/use, native location and row/composer badges,
Git marker visibility, move back, and agent `session_move` reflected in
both badges.
- Rebuilt UI/server resources installed; full Developer Mode restart
restored the original conversation. Disposable sessions, marker,
worktrees and branches cleaned up. The original conversation remained
attached to `pr649-final`.
- `git diff --check`.
An immediate post-restart desktop run exceeded a 30-second
refresh-button wait; the subsequent completed run passed. These checks
validate the workflows, not a startup latency bound or exhaustive
compatibility of every OpenCode payload.
Earlier branch validation also covered Electron/Tauri native actions,
packaging and desktop parity; those results remain in the PR's
historical validation comments. Detailed contract and latest evidence:
`dev-docs/WORKTREE_SESSION_PLACEMENT.md`.
## Residual limit
OpenCode and Git expose no shared snapshot/CAS transaction. CodeNomad
narrows races with reservations, locks, fences and repeated
authoritative checks; unrelated processes can still mutate state outside
those controls.