Repository navigation
Conversation
Co-authored-by: LukeParkerDev <10430890+Hona@users.noreply.github.com>
This reverts commit 428ae6d.
This reverts commit e0ff4fd.
Add the session_move TUI keybind and map it to the existing session.move command. Keep it unbound by default and document the new configuration option. Closes anomalyco#33239
Signed-off-by: ReStranger <restranger@disroot.org> Co-authored-by: dbeley <6568955+dbeley@users.noreply.github.com>
Co-authored-by: Test <test@opencode.test>
Co-authored-by: Jay V <air@live.ca> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Cherry-picks the packages/core changes from the v2 branch onto dev: - combined ordered stdout/stderr in AppProcess + bash structured output - edit/apply-patch return FileDiff info with status and line stats - ignore no-op model switches; record reasoning timestamps - return unexpected local tool defects to the model and continue - keep OAuth account metadata out of request bodies - nest OpenAI reasoning effort/summary options - load OpenCode provider config asynchronously; batch plugin boot - export latest public event manifest Includes the supporting schema reasoning time field and regenerated client/SDK types.
Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
…20260603 # Conflicts: # AGENTS.md # packages/app/index.html # packages/app/src/app.tsx # packages/app/src/components/prompt-input/submit.ts # packages/app/src/components/titlebar.tsx # packages/app/src/context/directory-sync.ts # packages/app/src/pages/session.tsx # packages/core/src/model-request.ts # packages/core/src/session/runner/model.ts # packages/core/src/v1/permission.ts # packages/opencode/src/background/job.ts # packages/opencode/src/permission/index.ts # packages/opencode/src/question/index.ts # packages/opencode/src/server/routes/instance/httpapi/api.ts # packages/opencode/src/server/routes/instance/httpapi/server.ts # packages/opencode/src/server/tui-event.ts # packages/opencode/src/session/system.ts # packages/opencode/src/session/todo.ts # packages/opencode/src/tool/registry.ts # packages/opencode/test/session/system.test.ts # packages/sdk/js/src/v2/gen/types.gen.ts # packages/server/src/handlers/session.ts
chore(sync): merge upstream dev into fork (2026-06-27)
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Important Review skippedToo many files! This PR contains 1193 files, which is 1043 over the limit of 150. To get a review, narrow the scope: Upgrade to a paid plan to raise the limit. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (19)
📒 Files selected for processing (1193)
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 |
|
The following comment was made by an LLM, it may be inaccurate: |
There was a problem hiding this comment.
Code Review
This pull request introduces a new generated @opencode-ai/client package, refactors session state and synchronization into a centralized ServerSession store, and implements a redesigned tab navigation system with drag-and-drop reordering. It also adds an api command to the CLI and updates various UI components to support mobile bottom navigation. Feedback on the changes highlights a critical runtime crash in useTabShortcut due to an incorrect number of arguments passed to command.register, and a SolidJS anti-pattern where createComputed is used for side effects instead of createEffect. Additionally, the CLI's recursive port search should be restricted to avoid infinite loops on persistent errors, and the new api command handler should check response.ok to ensure proper exit codes on HTTP failures.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| function useTabShortcut(index: () => number, onSelect: () => void) { | ||
| const command = useCommand() | ||
|
|
||
| command.register(() => { | ||
| const number = index() + 1 | ||
| if (number > 9) return [] | ||
| return [ | ||
| { | ||
| id: `tab.${number}`, | ||
| category: "tab", | ||
| title: "", | ||
| keybind: `mod+${number}`, | ||
| hidden: true, | ||
| onSelect, | ||
| }, | ||
| ] | ||
| }) |
There was a problem hiding this comment.
The command.register function expects two arguments: a unique key: string and a commands: () => Command[] factory function. Currently, useTabShortcut calls command.register with only a single argument (the factory function), which will cause a runtime crash when the command registry attempts to invoke the undefined second argument.
To fix this, update useTabShortcut to accept the unique tab id and pass it as the first argument to command.register.
| function useTabShortcut(index: () => number, onSelect: () => void) { | |
| const command = useCommand() | |
| command.register(() => { | |
| const number = index() + 1 | |
| if (number > 9) return [] | |
| return [ | |
| { | |
| id: `tab.${number}`, | |
| category: "tab", | |
| title: "", | |
| keybind: `mod+${number}`, | |
| hidden: true, | |
| onSelect, | |
| }, | |
| ] | |
| }) | |
| function useTabShortcut(id: string, index: () => number, onSelect: () => void) { | |
| const command = useCommand() | |
| command.register(id, () => { | |
| const number = index() + 1 | |
| if (number > 9) return [] | |
| return [ | |
| { | |
| id: `tab.${number}`, | |
| category: "tab", | |
| title: "", | |
| keybind: `mod+${number}`, | |
| hidden: true, | |
| onSelect, | |
| }, | |
| ] | |
| }) | |
| } |
There was a problem hiding this comment.
Fixed on dev in 2779de3. Re-ran bun turbo typecheck successfully before push.
| {(tab, index) => { | ||
| const id = tabKey(tab) | ||
| let ref!: HTMLDivElement | ||
| useTabShortcut(index, () => props.onNavigate(tab, ref)) |
There was a problem hiding this comment.
Fixed on dev in 2779de3. Re-ran bun turbo typecheck successfully before push.
| variantOpen: false, | ||
| }) | ||
|
|
||
| createComputed(on(identity, () => resetPromptInputTransientState(setStore), { defer: true })) |
There was a problem hiding this comment.
In SolidJS, createComputed is intended for synchronous, pure derivations. Performing side effects—such as writing to a store via setStore—inside createComputed can lead to cascading reactive updates, warnings, or infinite loops if those store values are read during the same reactive phase. It is highly recommended to use createEffect or createRenderEffect for side effects like resetting the transient state (and remember to import it from solid-js).
| createComputed(on(identity, () => resetPromptInputTransientState(setStore), { defer: true })) | |
| createEffect(on(identity, () => resetPromptInputTransientState(setStore), { defer: true })) |
There was a problem hiding this comment.
Fixed on dev in 2779de3. Re-ran bun turbo typecheck successfully before push.
| const next = (port: number): ReturnType<typeof bind> => | ||
| bind(hostname, port, password).pipe( | ||
| Effect.catch((error) => (port === 65_535 ? Effect.fail(error) : next(port + 1))), | ||
| ) |
There was a problem hiding this comment.
The recursive port search catches any error and tries the next port up to 65535. If a persistent error occurs (such as EADDRNOTAVAIL due to an invalid hostname, or EACCES due to permission restrictions), this loop will execute over 61,000 times, causing a significant CPU spike and delay before finally failing.
Consider either checking the error code (e.g., only retrying on EADDRINUSE) or limiting the maximum number of port search attempts (e.g., a maximum of 100 ports).
There was a problem hiding this comment.
Fixed on dev in 2779de3. Re-ran bun turbo typecheck successfully before push.
| const response = yield* Effect.tryPromise(() => | ||
| fetch(new URL(request.path, transport.url), { | ||
| method: request.method, | ||
| headers, | ||
| body, | ||
| }), | ||
| ) | ||
| const output = yield* Effect.promise(() => response.text()) | ||
| if (output) process.stdout.write(output + (output.endsWith(EOL) ? "" : EOL)) |
There was a problem hiding this comment.
The handler performs a fetch request but does not check if the response was successful (response.ok). If the server returns a 4xx or 5xx error, fetch will resolve successfully, and the CLI will print the error payload to stdout and exit with code 0.
For better scripting integration and error visibility, consider checking response.ok and failing the Effect (or printing to stderr and exiting with a non-zero code) when the server returns an error status.
There was a problem hiding this comment.
Fixed on dev in 2779de3. Re-ran bun turbo typecheck successfully before push.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 494a66f1d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const output = Stream.unwrap( | ||
| Effect.gen(function* () { | ||
| // Acquiring the bounded stream installs its listener before readiness is observable. | ||
| const live = yield* EventV2.allBounded(events, subscriberCapacity) |
There was a problem hiding this comment.
Scope event streams to the requested location
For a server hosting more than one directory/workspace, this now subscribes to the global EventV2 bus without the location middleware/filter that previously scoped /api/event to the caller's location. A client connected for workspace A can receive workspace B's session, permission, and file events, leaking cross-project activity and causing unrelated UI updates; please restore per-location filtering or a location-scoped subscription before concatenating the live stream.
Useful? React with 👍 / 👎.
|
|
||
| return ( | ||
| <Show when={requireServerKey(params.serverKey)} keyed> | ||
| <ServerSDKProvider server={conn}> |
There was a problem hiding this comment.
Reject missing server keys before resolving sessions
When a /server/:serverKey/session/:id URL contains a validly encoded key that is no longer present in global.servers.list(), conn() is undefined, and ServerSDKProvider treats that as no override and falls back to the currently selected server. The route then resolves the session and updates tabs under the stale key while making API calls to the selected server, so a stale deep link can display the wrong server's session if IDs overlap; please fail the route when the decoded key is not found instead of passing undefined.
Useful? React with 👍 / 👎.
|
|
||
| function TargetServerScopedProviders(props: ServerScopedShellProps) { | ||
| return ( | ||
| <PermissionProvider directory={props.directory}> |
There was a problem hiding this comment.
Avoid double permission auto-responses in the new layout
When the new layout is active, NewAppLayout already mounts a selected-server PermissionProvider; for a session route whose target server is that same selected server, this nested provider registers a second listener on the same event stream. With persisted directory/session auto-accept enabled, both providers handle the same permission.asked event and each calls permission.respond, causing duplicate approval/rejection requests for one permission; please reuse the outer provider in this case or make the auto-response listener singleton.
Useful? React with 👍 / 👎.
| if (server.key === key) navigate("/") | ||
| }, | ||
| removeSessions: (input: SessionTabsRemovedDetail) => { | ||
| const targetServer = input.server ?? server.key |
There was a problem hiding this comment.
Use the route server for session-tab removals
When a session is archived/deleted from a /server/:serverKey/session/:id page, the notifications emitted by the session timeline do not include input.server, so this fallback uses the globally selected server rather than the route's target server. If the user is viewing a non-selected server, the deleted session tab on the target server is left open (or a same-ID tab on the selected server is removed); please derive the server from the current route or require callers to pass it.
Useful? React with 👍 / 👎.
| }, | ||
| retarget(next: PromptTarget) { | ||
| input.context.forEach(next.context.add) | ||
| target = next |
There was a problem hiding this comment.
Clear the original prompt when retargeting first submits
For the legacy new-session composer, retarget() switches the submission to the newly created session before clear() runs, so a successful first submit resets only the new session prompt and leaves the original workspace/new-session prompt persisted. Reopening /:dir/session can show the just-submitted text/context again; please clear the original target as part of retargeting or keep clear() applied to the captured source after success.
Useful? React with 👍 / 👎.
Summary
Promotes the scheduled upstream sync from
devtomainafter PR #46 merged upstreamanomalyco/opencode:devinto the fork.Included sync work
dev: 356 pending upstream commits plus ULM conflict-resolution commitsValidation before promotion
bun installbun run --cwd packages/sdk/js script/build.tsbun turbo typecheckbun turbo typecheckbun run --cwd packages/opencode test:ulm-rebuild-auditEngagement artifact guard
git ls-files 'packages/opencode/engagements/**'returns onlypackages/opencode/engagements/.gitkeep.