diff --git a/docs/opencode-parity.md b/docs/opencode-parity.md index 299caf60..90620217 100644 --- a/docs/opencode-parity.md +++ b/docs/opencode-parity.md @@ -140,18 +140,25 @@ Each phase is independently shippable. Nothing here is a big-bang rewrite. and never forwarded. A control that lies is worse than an absent one. Hide the selector first; the dead plumbing under it (`types.ts:46`, `types.ts:69`, `websocket.ts:262`, the `thinkingLevel` thread through `useChat`/`useEmbeddableChat`) can go in the same change or a follow-up. -2. **Fix the session-list filter (B1).** Decide the tag-or-don't-filter question: either write - `metadata.officer` at session creation from the runner, or drop the cwd filter and derive the - directory from `location.directory`. The second is smaller and matches where sessions actually come - from. **Until this lands, nothing else in the OpenCode UI is reachable.** +2. ~~**Fix the session-list filter (B1).**~~ **DONE — `22bcd7d`.** 3. **Pass the model through on resume (B2).** Add `model` to `NewChatProps` and thread `selected.model` → `useChat`. One prop, and it stops `ses_…` ids reaching `claude --resume`. -4. **Return a real cwd on OpenCode session detail (B3).** `location.directory`, the same source the list - uses. -5. **Stop advertising images on OpenCode models (B4)** — flip `list-models.ts:44` to `false` — _or_ plumb - images through `OpenCodeRunParams`. Flipping the flag is the honest one-liner; plumbing is Phase 3. -6. **Guard the OpenCode subscription like the Claude one (B5)**, and call `clearOpenCodeSession` on - disconnect (B6). +4. ~~**Return a real cwd on OpenCode session detail (B3).**~~ **DONE — `22bcd7d`.** + +> **Correction, and read this before trusting any field name below.** This document told you to derive +> the directory from `location.directory`. **That field does not exist.** opencode 1.17.9's `GET /session` +> returns `directory` at the top level, with no `location` object and no `metadata` at all — so the type +> declared two fields the server never sends, which is the single cause of both B1 and B3. `22bcd7d` +> found this by reading the live server rather than the type, and deleted `officerMeta` and the metadata +> tag outright rather than fixing them: the only writer of that tag has no callers, and tagging would +> have been a second source of truth for something `directory` already answers. +> +> Two lessons for whoever picks up the rest. The surveys behind this document read types and call sites, +> not a running server, so **every field name here is a hypothesis** — the "check the installed version" +> warning was not boilerplate. And the confirmation that matters is the empirical one: 7 sessions present, +> 0 returned, badge unreachable; now 1 listed under the default dir and 6 filtered to their own. 5. **Stop advertising images on OpenCode models (B4)** — flip `list-models.ts:44` to `false` — _or_ plumb +> images through `OpenCodeRunParams`. Flipping the flag is the honest one-liner; plumbing is Phase 3. 6. **Guard the OpenCode subscription like the Claude one (B5)**, and call `clearOpenCodeSession` on +> disconnect (B6). ### Phase 1 — delete what is dead