Repository navigation
[codex] Wire OpenCode into thread item fork - #7
Closed
samdickson22 wants to merge 1 commit into
Closed
samdickson22 wants to merge 1 commit into
samdickson22 wants to merge 1 commit into
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
OpenCode can now use the shared threadListItem().fork seam from the core PR, so its package no longer needs a separate public fork escape hatch on runtime extras or the thread controller. Constraint: This PR is intentionally stacked on codex/thread-list-item-fork-api and depends on the core thread-list-item fork method. Constraint: OpenCode breaking cleanup is allowed for this change so consumers migrate to the shared assistant-ui API. Rejected: Keep OpenCodeThreadController.fork as a public helper | it keeps a second public fork path that bypasses assistant-ui lifecycle state Confidence: high Scope-risk: narrow Tested: pnpm --filter @assistant-ui/react-opencode exec vitest run src/openCodeThreadListAdapter.test.ts src/hooks.test.tsx src/OpenCodeThreadController.test.ts Tested: pnpm --filter @assistant-ui/react-opencode build; pnpm --filter @assistant-ui/react-opencode exec tsc --noEmit Tested: pnpm exec oxlint touched OpenCode files; pnpm exec oxfmt --check touched OpenCode/API files; git diff --check
samdickson22
force-pushed
the
codex/opencode-thread-list-item-fork
branch
from
July 14, 2026 20:57
91d5784 to
1e199db
Compare
Owner
Author
|
Moved upstream to assistant-ui#4914 now that the stacked base branch is available there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client.session.forkinto the corethreadListItem().fork({ fromMessageId })seam from Add thread list item fork API seam assistant-ui/assistant-ui#4666.openCodeExtras.forkhelper andOpenCodeThreadController.fork()so consumers use the shared assistant-ui lifecycle path.Stacking
Stacked on assistant-ui#4666 (
codex/thread-list-item-fork-api). Review this PR as the OpenCode adapter integration only.GitHub cannot open this as an upstream stacked PR until the base branch exists in
assistant-ui/assistant-ui, so this fork PR preserves the small diff. After assistant-ui#4666 merges, this branch can be retargeted/opened against upstreammain.OpenCode Compatibility Note
This PR deliberately breaks the previous OpenCode-specific fork escape hatch.
@assistant-ui/react-opencodeconsumers should migrate fromuseOpenCodeRuntimeExtras().fork(messageId)/OpenCodeThreadController.fork(messageId)to:The OpenCode adapter still uses OpenCode native
session.forkunder the hood; the public entrypoint is now the core thread-list-item API.Verification
pnpm --filter @assistant-ui/react-opencode exec vitest run src/openCodeThreadListAdapter.test.ts src/hooks.test.tsx src/OpenCodeThreadController.test.ts- 3 files, 18 tests passedpnpm --filter @assistant-ui/react-opencode build- passedpnpm --filter @assistant-ui/react-opencode exec tsc --noEmit- passedpnpm exec oxlint <touched OpenCode files>- passedpnpm exec oxfmt --check <touched OpenCode/API files>- passedgit diff --check- passedDiff Shape
Against assistant-ui#4666: 9 files, +67/-21.