-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat(opencode): add optional runtime overlay #3761
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Danigm-dev
wants to merge
18
commits into
simstudioai:staging
Choose a base branch
from
Danigm-dev:feat/opencode-optional-runtime
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+3,561
−13
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
568e675
feat(opencode): add custom block integration
Danigm-dev 3146562
feat(opencode): add optional runtime overlay
Danigm-dev 7014fa4
fix(opencode): harden external runtime contract
Danigm-dev 33b834b
docs(opencode): add deployment checklists
Danigm-dev cacd46a
test(opencode): cover route contracts
Danigm-dev 6160d1c
fix(opencode): address review feedback
Danigm-dev 8ec0c5a
fix(opencode): harden runtime defaults
Danigm-dev d59f7a1
fix(opencode): narrow stale session retries
Danigm-dev 1e174f7
fix(opencode): avoid redundant resolution and url leaks
Danigm-dev 35fac8d
fix(opencode): clean up low severity review notes
Danigm-dev 35949bb
fix(opencode): harden root path and retry errors
Danigm-dev 3458868
refactor(opencode): keep base url helper private
Danigm-dev a27de0d
fix(editor): avoid stale open-change fetch gating
Danigm-dev a8fb073
fix(opencode): persist fresh retry sessions
Danigm-dev 2bb744a
fix(opencode): tighten retry and entrypoint guards
Danigm-dev 5ab2b5f
fix(editor): stabilize async option refetching
Danigm-dev d246b50
docs(opencode): add branch status summary
Danigm-dev f1156e9
docs(opencode): clarify branch scope and overlap
Danigm-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,136 @@ | ||
| # PR 3761 Branch Status | ||
|
|
||
| ## Purpose | ||
|
|
||
| This note describes what each relevant branch contains and how responsibilities are split, so it is easier to see where changes overlap. | ||
|
|
||
| PR: `https://github.com/simstudioai/sim/pull/3761` | ||
|
|
||
| ## Branches | ||
|
|
||
| ### `staging` | ||
|
|
||
| Base branch for PR `#3761`. | ||
|
|
||
| What it contains: | ||
|
|
||
| - current shared integration baseline before OpenCode optional runtime lands | ||
| - current default compose and deployment behavior | ||
| - no PR-specific branch-only review fixes from this worktree | ||
|
|
||
| What it does **not** contain yet: | ||
|
|
||
| - the OpenCode branch work described below until PR `#3761` is merged | ||
|
|
||
| ### `feat/opencode-optional-runtime` | ||
|
|
||
| Feature branch for PR `#3761`. | ||
|
|
||
| Primary responsibility: | ||
|
|
||
| - add the OpenCode integration and its optional runtime overlay without changing the existing default local/prod setups | ||
|
|
||
| What it contains: | ||
|
|
||
| - OpenCode block in Sim | ||
| - OpenCode tools | ||
| - OpenCode API routes | ||
| - `apps/sim/lib/opencode` | ||
| - wiring for `@opencode-ai/sdk` in Next/Vitest | ||
| - async dropdown/combobox support needed by the integration | ||
| - optional runtime files under `docker/opencode/` | ||
| - `docker-compose.opencode.yml` | ||
| - `docker-compose.opencode.local.yml` | ||
| - deployment/runtime hardening for: | ||
| - `OPENCODE_REPOSITORY_ROOT` | ||
| - `OPENCODE_SERVER_PASSWORD` | ||
| - retry/session handling | ||
| - route error behavior | ||
| - OpenCode runtime config guards | ||
|
|
||
| What this branch intentionally preserves: | ||
|
|
||
| - `docker-compose.local.yml` stays as the default local setup | ||
| - `docker-compose.prod.yml` stays as the default production setup | ||
| - OpenCode remains hidden by default behind `NEXT_PUBLIC_OPENCODE_ENABLED` | ||
|
|
||
| ### `origin/feat/opencode-optional-runtime` | ||
|
|
||
| Remote branch backing PR `#3761`. | ||
|
|
||
| Expected relationship: | ||
|
|
||
| - should match local `feat/opencode-optional-runtime` | ||
| - if local and remote diverge, local work has not been pushed yet or remote changed externally | ||
|
|
||
| ## Overlap And Boundaries | ||
|
|
||
| ### Product / app layer | ||
|
|
||
| Owned here in `feat/opencode-optional-runtime`: | ||
|
|
||
| - OpenCode block/tool/route/lib implementation | ||
| - editor support required by the OpenCode selectors | ||
|
|
||
| Possible overlap area: | ||
|
|
||
| - shared editor components like dropdown/combobox | ||
| - these are not OpenCode-only files, but this branch touches them only where needed for OpenCode async option behavior | ||
|
|
||
| ### Runtime / deployment layer | ||
|
|
||
| Owned here in `feat/opencode-optional-runtime`: | ||
|
|
||
| - optional OpenCode container/runtime bootstrap | ||
| - optional compose overlays | ||
|
|
||
| Boundary: | ||
|
|
||
| - this branch should not replace the default local/prod compose files as the main path | ||
| - it only adds overlays and guards around the optional runtime | ||
|
|
||
| ### Review-fix layer | ||
|
|
||
| Many follow-up changes in this branch are not separate features. | ||
|
|
||
| They are: | ||
|
|
||
| - hardening fixes | ||
| - correctness fixes | ||
| - small refactors | ||
| - review-driven adjustments on top of the same OpenCode feature branch | ||
|
|
||
| That means several files now contain both: | ||
|
|
||
| - original feature work | ||
| - later review fixes | ||
|
|
||
| So if something feels like it is "overlapping", that is expected: the branch has accumulated refinement passes on top of the original OpenCode implementation rather than splitting them into separate branches. | ||
|
|
||
| ## Final Branch State | ||
|
|
||
| At the end of this session: | ||
|
|
||
| - current branch: `feat/opencode-optional-runtime` | ||
| - base branch: `staging` | ||
| - remote tracking branch: `origin/feat/opencode-optional-runtime` | ||
| - local/remote divergence: none | ||
| - worktree state: clean | ||
|
|
||
| ## Practical Reading Guide | ||
|
|
||
| If you want to understand the branch quickly, read it in this order: | ||
|
|
||
| 1. `apps/sim/lib/opencode/` | ||
| 2. `apps/sim/app/api/opencode/` | ||
| 3. `apps/sim/app/api/tools/opencode/` | ||
| 4. `apps/sim/blocks/blocks/opencode.ts` | ||
| 5. `docker/opencode/` | ||
| 6. `docker-compose.opencode.yml` | ||
| 7. `docker-compose.opencode.local.yml` | ||
|
|
||
| If you want to understand where overlap happened, check these shared files next: | ||
|
|
||
| - `apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx` | ||
| - `apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx` | ||
| - `apps/sim/app/api/tools/opencode/prompt/route.ts` | ||
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internal branch tracking document accidentally committed
Low Severity
PR-3761-BRANCH-STATUS.mdis a personal development tracking document describing branch management, worktree state, overlap boundaries, and reading guides for the PR author. It contains internal process notes like "at the end of this session" and "local/remote divergence: none" that are not relevant to the repository. This file appears to have been accidentally included in the commit.