Tracks #1.
Summary
Build the adaptive Repository/Worktree master-detail surface and make it consume authoritative snapshots through a single UI store.
Scope
- Add the Repository header with name/path, active/unavailable counts, local refresh freshness, Fetch freshness, operation status, Refresh, and explicit Fetch entry points.
- Add a stable Worktree navigator with Main-first ordering, name/path disambiguation, Branch or Detached HEAD, Clean/change/conflict counts, cached ahead/behind or Unpublished state, and unavailable/transitioning indicators.
- Add search across name, path, Branch, and associated Codex title.
- Implement the accepted adaptive behavior: stable master-detail for multiple Worktrees and an automatically collapsed navigator for one Worktree.
- Add selected Worktree detail with identity, path, Branch/HEAD, Upstream/freshness, applicable action placeholders, independent Commit Draft, Change Group area, and diff area.
- Preserve selection only while opaque IDs remain valid and clear stale file/diff selection after identity or Branch changes.
- Use one
RepositoryStore through useSyncExternalStore; do not optimistically invent Git state.
- Implement loading, stale, refresh-failed, non-repository, and unavailable empty states.
Acceptance criteria
- One clean Main Worktree requires no special multi-Worktree setup and still shows Branch/Upstream actions.
- A 25-Worktree snapshot remains stably sorted when status changes.
- No UI row aggregates multiple Worktree indexes into one pretend change list or Commit target.
- Current selection survives harmless refreshes and is dropped when its Worktree generation disappears.
- State is communicated by text/icons and not color alone; all controls have target-specific accessible names.
- The shell appears within 1 second and selected ordinary Worktree state within 2 seconds on the reference fixture.
Out of scope
- Final file diff rendering and working Git mutations.
Dependencies
PRD coverage
- Information architecture; AC-01–04 and the overview portions of AC-22/24.
Verification
- Component tests for one/many/unavailable Worktrees, keyboard/focus tests, and standalone/Codex end-to-end layout tests.
Tracks #1.
Summary
Build the adaptive Repository/Worktree master-detail surface and make it consume authoritative snapshots through a single UI store.
Scope
RepositoryStorethroughuseSyncExternalStore; do not optimistically invent Git state.Acceptance criteria
Out of scope
Dependencies
PRD coverage
Verification