Skip to content

feat(opencode): migrate CodeNomad to native V2 - #647

Open
pascalandr wants to merge 136 commits into
devfrom
DEV-v2
Open

feat(opencode): migrate CodeNomad to native V2#647
pascalandr wants to merge 136 commits into
devfrom
DEV-v2

Conversation

@pascalandr

@pascalandr pascalandr commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

OpenCode V2 Migration and Desktop Restructuring

Summary

This branch replaces CodeNomad's OpenCode V1 SDK, custom plugin, and per-workspace runtime architecture with the native OpenCode V2 client and one shared OpenCode service. It intentionally ships no V1 runtime fallback.

The scope includes native location ownership, Forms and Shell resources, project-wide cursor pagination, bounded resident message windows, streaming reconciliation, duplicate-folder instances, multi-window Electron/Tauri behavior, content-addressed restore, worktree mutation fencing, and reproducible desktop packaging.

The reviewed CodeNomad build resolves @opencode-ai/client@beta; the runtime CLI is managed independently; the official comparison baseline is upstream/beta at eb1ac54d73.

Full details: MIGRATION_V2.md and DESKTOP_V2_COMPARISON.md.

Stabilization Fixes

  • Preserve manual scroll escape across older-page positioning and remote updates; only a local prompt submission forces the bottom.
  • Keep all pending inbox prompts after delivered transcript messages in native inbox admission order.
  • Add a persisted steer/queue follow-up preference; the alternate shortcut uses the inverse while idle sends remain steer.
  • Expose native session.background through the ownership-checked proxy, a prompt action, and Ctrl/Cmd+B.
  • Remove the duplicate model-selector "show all" action and make the favorites toggle label reflect its current action.
  • Restore permission/Form synchronization plus skill, reference, MCP-resource, and websearch-provider reads in the reviewed proxy allowlist.
  • Validate and preserve native location workspace identities for root/worktree requests, session moves/imports, cursors, and global Forms.

Capability Decisions

Capability Native V2 availability CodeNomad DEV-v2 decision Revisit or complete when
Assistant content mutation session.messageUpdate authoritatively replaces the text, reasoning, and tool content of a completed assistant message. There is still no generic deletion of a complete delivered message or mutation of user messages. Restores individual tool/reasoning deletion through the native update route. Arbitrary whole-message deletion remains absent rather than locally simulated. Add broader deletion only if V2 exposes an authoritative operation for the required message type.
Bulk tool and reasoning cleanup No native bulk operation, but session.messageUpdate can safely compose cleanup one assistant message at a time. Restores selected-group and full-session technical-part cleanup through authoritative per-message updates. A native bulk operation is only needed if per-message updates become a measured performance problem.
Delete-to-boundary / undo session.revert.stage and session.revert.clear use V2 staged-revert semantics instead of arbitrary deletion. Undo uses revert.stage. Redo/clear remains a CodeNomad UI gap, not a reason to restore V1 deletion. Expose revert.clear through the existing native contract.
Compaction Native checkpoint compaction summarizes the older head and retains a server-selected recent tail controlled by compaction.keep.tokens. Uses session.compact; there is no message-level selective compaction. CodeNomad displays the partial summary through the same reactive streaming path as text and reasoning, then replaces it with the terminal summary. Add scoped controls only if V2 defines scoped compaction semantics.
Transcript pagination authority Message pages expose only opaque previous/next cursors. They provide no transcript revision, total, absolute range, position, or random seek target. Uses bounded cursor traversal and a 200-message resident window, with defensive reconciliation after destructive events. It cannot prove that pages loaded across compaction or revert belong to one snapshot. V2 adds snapshot revision authority (#43766) and navigable position metadata (#44660).
Full-session search session.list(search) filters session titles only. There is no server transcript-search endpoint returning message identity, excerpt, navigable position, and transcript revision. Retained through exhaustive message-cursor traversal while keeping only the 200-message resident window and collected matches. Large searches still fetch every page. V2 exposes transcript search (#45801) with a target that composes with transcript revision and seek metadata.
Queued prompt management Native inbox list, cancel, steer, and queue operations cover authoritative follow-up delivery. The TUI's edit action removes a locally queued prompt before restoring it to the composer; it is not an atomic inbox update. Implements a persisted primary steer/queue preference, inverse alternate shortcut, delivery switching, cancellation, and native-order timeline projection. Earlier automatic replacement and reorder experiments were removed because they could change identity and position, duplicate prompts, or race with a concurrent drain. Match the TUI correction workflow by restoring a prompt to the composer only after confirmed cancellation. Revisit atomic editing or reordering only if a concrete product need is established.
Background execution Native session.background moves blocking tools out of the foreground; Shell resources separately support listing, bounded output, and removal. Exposes session.background through the proxy and UI with Ctrl/Cmd+B, and replaces the custom process manager with native Shells. Unsupported controls such as rename remain removed. Add controls only when the native session or Shell APIs support them.
Service lifecycle V2 uses one shared externally owned service rather than one runtime per workspace. CodeNomad discovers or starts the service but never exposes workspace stop or stops the daemon on shutdown. No parity work planned unless V2 changes service ownership semantics.

Validation

  • UI and server TypeScript typechecks.
  • 86 focused UI tests covering follow, pagination, queue ordering, bottom pinning, shortcuts, delivery resolution, and model visibility.
  • 64 focused server tests covering proxy ownership/location enforcement and shared-service workspace identity.
  • Production UI/server build.
  • Tauri cargo check (existing dead-code warnings only) and 121 Rust tests.
  • git diff --check.

Remaining Gaps

  • Native session.revert.clear redo UI.
  • Active-session-location authority for MCP/plugin status.
  • Optional interactive PTY, session export, and reference/MCP-resource attachment UI.
  • Desktop release signing/notarization hardening.

Replace the V1 SDK, custom plugin, and per-workspace runtimes with the pinned OpenCode V2 client and one shared service. Model workspaces through native locations and route sessions, messages, events, files, VCS, permissions, questions, providers, commands, and MCP directly through V2 APIs.

Remove the legacy plugin and background-process layers, use native Shell and PTY support, preserve server-side Git mutations where V2 lacks parity, and update the UI, packaging, CI, architecture documentation, and translations for the new model.

Add focused coverage for shared-service ownership, Windows and WSL startup, proxy boundaries, worktree event routing, native event normalization, provider authentication, voice instructions, and location-scoped requests. Server and UI typechecks pass; remaining security review items and the real opencode2 smoke test are documented in MIGRATION_V2.md and will be completed before the draft PR is marked ready.
Remove the duplicate Tauri native event transport and use the server EventSource stream consistently across web, Electron, and Tauri clients. Align the generated client and required opencode2 CLI on next-17353.

Restrict workspace proxying to the required V2 API surface, enforce session and directory ownership, validate local file URIs, strip routing headers, and tighten provider, Yolo, worktree, and session event state handling.

Protect the shared service lifecycle with private registration state, process-identity leases, safe ownership transfer, bounded shutdown, Windows executable resolution, and WSL namespace-aware PID verification. Unknown wrappers now fail closed rather than leaving an unowned service.

Validated with server and UI typechecks, 433 UI tests, focused server lifecycle and proxy suites, 67 Rust tests, server and UI builds, and a real next-17353 service lifecycle smoke test.
Treat the persisted V1 default command 'opencode' as 'opencode2' so restored and newly selected workspaces use the required V2 service instead of waiting for the obsolete binary to time out.

Keep the folder selection view mounted while startup restore is active and feed it the existing loading state, preventing the renderer from appearing blank while saved workspaces are recreated.

Cover the legacy binary setting and restore loading gate with regression tests. Server/UI typechecks, targeted restore tests, the UI production build, and a real lifecycle smoke from an 'opencode' configuration pass.
Load sessions from each logical root and worktree using the native V2 directory filter, preserve locally known sessions when a combined response may be incomplete, and resolve locationless events through their session IDs. This restores worktree sessions, prompt activity, and deletion updates without reintroducing the removed transport.

Require the bundled OpenCode prerelease for shared-service discovery and surface structured prompt errors. Move Electron and Tauri restore state and election files under the V2 namespace, copying V1 state once without mutating or deleting the legacy files.

Cover multi-directory loading, locationless event routing, version-constrained discovery, and cross-host state isolation. Validated UI, server, Electron, and Tauri tests and built the Tauri release executable and NSIS installer.
Restore reliable V2 catalogs, agent identifiers, cursor pagination, prompts, variants, attachments, forms, native event reconciliation, Yolo persistence, and location-aware PTY controls. Prevent completed control records from appearing as streaming placeholders and keep live output refreshing during sustained token streams.

Harden the shared service and workspace proxy with explicit OPENCODE_DB isolation, launch-signature validation, traversal protection, WSL namespace translation, ownership-scoped routes, bounded SSE backpressure, reconnect recovery, and safe process-proof transfer and shutdown semantics.

Align provider, VCS, LSP, update, documentation, and CI behavior with the experimental next-17353 contract. Validation includes server/UI/Electron typechecks, 252 workflow UI tests, focused server suites, production UI/server builds, 68 Tauri tests, and a real V2 workspace/session/prompt smoke.
Merge upstream dev into the OpenCode V2 foundation while preserving native V2 session, provider, proxy, PTY, and explicit database behavior.

Resolve desktop workspace-open and provider visibility conflicts across Electron and Tauri, bound local API requests, refresh standalone dependency locks, and keep grouped integration preferences keyed by native provider IDs.

Validated with desktop typechecks, 267 UI tests, 308 server tests, 122 Electron tests, 74 Tauri tests, packaged builds, and an exact OpenCode 0.0.0-next-17353 Tauri smoke covering prompt, reload, agent fallback, and PTY lifecycle.
@pascalandr

pascalandr commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Updated validation after commits 9a53e2f, e996196, and 04cb287.

The V2 runtime now uses @opencode-ai/client, protocol, and schema 0.0.0-next-17444, accepts the discovered current opencode2 CLI instead of enforcing an exact runtime version, and uses ~/.local/share/opencode2/opencode.db. Targeted manager/service tests, server/UI typechecks, packaged resources, and the Tauri 0.19.0 release build passed.

Real desktop smoke reused three existing sessions from the copied V2 database and received V2_EXISTING_SESSION_ONE_OK, V2_EXISTING_SESSION_TWO_OK, and V2_EXISTING_SESSION_THREE_OK. Windows V1 and V2 now use distinct WebView2 profiles; with both applications running, the final V2 build opened D:\CodeNomad and D:\openchamber sequentially without dialogs, toasts, CDP exceptions, or server errors. Nine native shutdown tests also passed.

The PR remains open until V2 is out of beta.

Force the V2 service to use the opencode2 database under the current user's data directory so parallel V1 launches cannot redirect it through shared environment settings.

Keep the bare opencode and opencode2 commands out of custom binary history while preserving real executable paths, and document the parallel desktop smoke procedure. Existing history entries are intentionally left untouched for manual cleanup.

The server manager test and typecheck passed, and the Tauri package built successfully before the final UI-only simplification. No additional compilation was run per request.
Update the experimental OpenCode client, protocol, and schema dependencies to the latest reviewed next release while removing the exact CLI version gate from shared-service discovery. This lets CodeNomad use current opencode2 releases instead of timing out solely because the runtime advanced.

Refresh migration, contributor, architecture, and skill guidance to require release-note, documentation, declaration, and proxy-parity review on each upgrade. The isolated opencode2 database behavior is documented consistently.

Validated with server and UI typechecks, 36 passing targeted service/workspace tests, a release Tauri build, and a packaged desktop smoke. The smoke opened D:\CodeNomad, reused three existing sessions, and received three distinct exact prompt responses from opencode2 next-17444.
Give the V2 desktop runtime its own WebView2 user-data folder so it cannot reuse V1 service workers, browser caches, or locked profile state. Preserve an explicitly supplied WEBVIEW2_USER_DATA_FOLDER for debugging and custom launches.

Defer installation of the Windows session-end subclass until the main thread can provide a native window handle, preventing startup from aborting during slower WebView creation.

Validated with nine shutdown tests, a release build, simultaneous V1/V2 WebView processes using distinct data folders, and sequential CodeNomad/openchamber workspace launches without UI or runtime exceptions.
Keep established conversations mounted while V2 performs authoritative message refreshes. Background loads no longer insert the initial loader or clear timeline segments, preventing the measured prompt displacement and timeline flicker during native streaming.

Restore saved sessions directly before the expensive all-worktree session scan, while preserving every referenced draft, attachment, scroll, expansion, idle, and generation record. Make workspace readiness follow newer reconnect loads without leaking waits after cancellation, and exclude synthetic views from native session hydration.

Harden question interruption races by rebinding requests when authoritative tool parts arrive late or replace optimistic parts, and clear inline question state immediately after reply or rejection. Isolate PTY loading reads from Solid effects to prevent recursive reload storms.

Add focused regressions to the PR workflow. Validated with 223 standard UI tests, 58 browser-condition tests, full TypeScript checks, 307 server tests, 74 Rust tests, 28 Windows spawn tests, a production Tauri build, and real cold-start state restoration.
Apply OpenCode V2 text and reasoning delta events directly to the normalized message store so assistant responses appear as they are generated instead of waiting for periodic HTTP snapshots.

Deduplicate replayed events, preserve ordinal part ordering, reconcile stale or superseded snapshots, settle terminal messages, retry failed terminal refreshes, and clear streaming state when sessions or workspaces are removed. This keeps snapshot refreshes as authoritative recovery without erasing visible streamed content or recreating removed stores.

Add focused streaming regression coverage and extend native event tests for immediate text, reasoning, periodic refresh behavior, replay handling, deletion cleanup, and terminal reconciliation. Validated with 223 standard UI tests, 64 browser/integration tests, full workspace typechecks, a production Tauri build, and a live CDP smoke covering progressive rendering and reload restoration.
Align the V2 delta reducer with the live OpenCode contract, where many unique events append to the same message, content type, and ordinal. Keep one provisional part per source part instead of treating ordinals as fragment sequence numbers.

Render the first fragment immediately, then coalesce subsequent store and Markdown updates to one 16 ms window. Flush pending content before terminal reconciliation, preserve authoritative snapshot IDs and error states, cancel timers on session or workspace cleanup, and retain bounded replay protection.

Validated against a live 1,485-event response that streamed 100 lines and 6,387 characters continuously to completion. Added repeated-ordinal, timer, snapshot, tool-boundary, cleanup, terminal, and error regressions; all 223 standard UI tests, 72 browser/integration tests, and workspace typechecks pass.
Keep follow ownership tied to explicit user intent so Virtua measurement corrections cannot silently escape an actively followed response. Large key jumps now land immediately, while explicit timeline and top navigation cancel submit pinning without confusing programmatic movement for user scrolling.

Rebuild timeline segments from cached V2 structural signatures instead of part-count and same-length replacement heuristics. This handles provisional-to-authoritative part replacement, type and renderability changes, terminal status updates, locale changes, duplicate part IDs, and the V2 time.completed contract without rebuilding streamed text on every token.

Add follow-state, timeline projection, and duplicate-part regression coverage to the PR workflow. Validated with 264 standard UI tests, 72 browser/integration tests, full UI and Electron typechecks, production UI build, and live Tauri WebView navigation/follow scenarios.
@pascalandr
pascalandr marked this pull request as ready for review August 17, 2026 08:28
Preserve the last authoritative non-empty tab snapshot through native shutdown, make shutdown capture terminal, and restore the exact saved active tab. Seed scroll snapshots before session selection and wait for usable Virtua measurements so project, tab, session, and anchor position survive A/B restarts.

Render native runtime forms inline only when their active-session tool target is resolved, retain the floating fallback for unresolved requests, share form schema visibility and URL validation with provider auth, and remove the unused session form-list proxy route and obsolete V1 request wrapper.

Return the native V2 session.active map without a legacy data envelope, avoid full-history refreshes for deltas already applied locally, and bound timeline projection refreshes during streaming. Coverage includes UI restoration, form targeting, proxy contracts, native streaming, and CI test registration.

Validated with root typecheck, 529 UI tests, 305 passing server tests with 3 skips, 74 Tauri tests, 122 Electron native tests, production A/B builds, a no-seed native handoff, and runtime verification of the active-session proxy shape.
Attempt configured WSL host-to-service translation before treating POSIX paths as already service-native. This preserves real Windows behavior while allowing Linux CI to exercise Windows workspace ownership with temporary git worktrees.

Remove the environment-dependent assertion that a bare opencode2 command resolves to a packaged executable. Deterministic shim coverage remains in buildServiceLaunchSpec and the Windows PATH/PATHEXT tests.

Validated with full typecheck, 27 spawn tests, 9 workspace manager tests, and the complete server suite with 304 passing tests and 3 skips.
Stop deleting OPENCODE_DB from legacy CodeNomad environment preferences during settings layout migration. Environment variables now migrate uniformly without a database-specific exception.

The OpenCode V2 service destination remains unchanged and continues to use ~/.local/share/opencode2/opencode.db through the launch-time service environment override.

Validated with the settings migration test, root typecheck, the complete server suite, and git diff --check.
When a native V2 form resolves to a tool call, render it as the sole interactive surface and suppress the legacy QuestionToolBlock for that call. Legacy questions remain available when no native form is pending, while unresolved and cross-session forms continue to use the existing floating fallback.

Improve the native form hierarchy with token-based panel and field surfaces, explicit required and focus states, consistent checkbox controls, square action buttons, and responsive stacked actions on narrow screens.

Validated with UI typecheck, 530 UI tests, a production desktop build, git diff checks, and desktop/mobile inspection in the deployed WebView.
Render native V2 string option lists with up to four answers as visible radio cards, including each option description, so question-style forms retain the scannable V1 interaction. Lists with five or more answers continue to use a compact select control.

Apply the same selected-card treatment to multiselect answers, preserve custom-value entry, validate required inline strings, and keep grouped controls accessibly labelled. Option styling lives in a focused component stylesheet and uses existing square-corner design tokens.

Validated with UI typecheck, 531 UI tests, a production desktop build, git diff checks, and visual inspection in the deployed WebView.
Electron and Tauri can each publish a legacy running marker immediately before publishing their shared cross-host participant. On a simultaneous Windows startup, both hosts could observe that transient gap and yield ownership, leaving no primary.

When legacy detection initially blocks a primary candidate, wait for one bounded 50ms participant grace period and reconcile once before yielding. Apply the same protocol on both Node and Rust hosts; genuine legacy clients still block ownership after the grace period.

Validated with root typecheck, 50 repeated cross-host election runs, 122 Electron native tests, 74 Tauri tests, and git diff checks.
A session can mount from startup discovery before native workspace restoration seeds its saved scroll snapshot. The message stream previously marked that no-snapshot pass complete and ignored the authoritative seed when it arrived, leaving Virtua at the top despite a valid anchor.

Track no-snapshot completion as provisional and permit exactly one later restore when the reactive seed appears. Normal completed restores remain terminal, and session changes reset the provisional authority.

Validated with UI typecheck, 48 targeted restoration tests, 532 complete UI tests, and git diff checks.
The Tauri client-state tests exercise process-global file locks and invoke PowerShell/CIM for process identity. Running them concurrently on the shared Windows runner can starve those probes, causing both cross-host election and bounded registration timing assertions to fail together despite passing independently.

Run the 74-test Windows Tauri suite with one test thread. Linux coverage remains parallel, and product-side participant reconciliation remains covered by repeated cross-host tests.

Validated with the exact serial Windows cargo command: 74 passed, 0 failed.
The Tauri macOS ARM prebuild combines DOM and Node timer declarations, so injected and global setTimeout implementations can return either a numeric browser handle or a Node Timeout. The previous inferred alias accepted only the Node variant and failed server compilation on that matrix leg.

Represent the manager timer handle as the actual portable union and avoid Array.prototype.at in a server test because the server TypeScript target predates ES2022.

Validated with the complete server build, 304 passing server tests with 3 platform skips, 11 targeted workspace tests, and git diff checks.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/32124483864

Artifacts expire in 7 days.
Artifacts:

  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-tauri-macos
  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-electron-macos
  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-tauri-windows
  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-tauri-linux
  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-electron-linux
  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-tauri-macos-arm64
  • pr-647-3c98f45ae7116ee51f8d1b7712f3583f22094163-electron-windows

Real question-backed V2 forms set custom=true. The long-option branch therefore bypassed the intended select and rendered a text input with a datalist, so the tested 4/5 threshold did not hold for actual native requests.

Render every long option list as a select regardless of custom-value support, and preserve free-form answers in a separate custom input. Short lists remain visible cards.

Validated against a live four-option V2 form, targeted form tests, the UI typecheck, 532 UI tests, and git diff checks.
OpenCode SDK location responses expose workspaceID, while generated request inputs require workspace. Passing a response LocationRef directly was structurally accepted by TypeScript but caused the generated client to omit the workspace selector from catalog requests.

Centralize the output-to-request conversion and apply it to agent, provider, model, default-model, and command catalog calls. Internal session state continues using the SDK response shape.

Validated with 21 targeted request-authority tests, the UI typecheck, 533 UI tests, and git diff checks.
Volatile V2 events previously refreshed every catalog, metadata, and filesystem domain. Even an agent or command update therefore caused unrelated API requests and cache invalidation, with a trailing full rerun when events overlapped.

Map each native event to the state domains it can affect and merge pending domains in one coordinator. Reconnects retain a complete refresh, while agent, command, integration, metadata, filesystem, and VCS events now update only their relevant stores.

Validated with 21 targeted invalidation and request-authority tests, the UI typecheck, 535 UI tests, and git diff checks.
The instance bridge duplicated every OpenCode event payload into a synthetic properties field because server-side auto-accept still consumed the V1-style envelope. This expanded the SSE contract and left UI deletion handling with legacy fallbacks.

Move auto-accept and session deletion to native event.data, publish OpenCode events unchanged, type the shared stream as OpenCodeEvent, and guard PTY consumers before narrowing their event union. Internal CodeNomad worktree events remain separate.

Validated with server and UI typechecks, 51 targeted server tests, 21 targeted UI tests, 304 passing server tests with 3 platform skips, 535 UI tests, and git diff checks.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/32909505904

Artifacts expire in 7 days.
Artifacts:

  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-tauri-windows
  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-electron-macos
  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-tauri-macos
  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-tauri-macos-arm64
  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-electron-linux
  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-tauri-linux
  • pr-647-a2e203754d2856ad8811ec121236be3feb10f088-electron-windows

Keep queued prompts at the transcript tail in native admission order, preserve escaped scroll state across history pagination, and pin every locally submitted prompt. Add a persisted steer/queue preference with inverse alternate delivery and expose native session backgrounding from the prompt controls.

Preserve only ownership-validated native workspace selectors through the proxy, restore required V2 catalog and pending-state routes, and verify workspace/directory pairs against published or inventoried locations. Simplify the model selector and synchronize migration documentation with the shipped behavior and remaining gaps.

Validated with UI, server, and Electron typechecks; 86 focused UI tests; 64 proxy/workspace tests; 121 Tauri tests; cargo check; production UI/server build; and git diff --check.
Render partial compaction summaries while the operation is still running so users no longer wait for one final block.

Coalesce native compaction delta projections to one update every 250 ms, preserving the reducer stream without rebuilding the visible message window for every token. Cancel delayed projections when terminal session state, client replacement, reconnect, or instance removal makes them stale.

Cover throttled projection and terminal-summary authority in the native session event test. Validated with the 422-test UI matrices, focused browser test, UI typecheck, production UI and Tauri builds, and a real compact operation in the packaged executable.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/32949001800

Artifacts expire in 7 days.
Artifacts:

  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-tauri-windows
  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-electron-macos
  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-tauri-macos
  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-tauri-macos-arm64
  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-tauri-linux
  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-electron-linux
  • pr-647-d3e4274b5987b00b79b71572c63830c3f4bb1b63-electron-windows

Route text, reasoning, tool-input, and compaction deltas through one per-session 250 ms projection boundary while preserving immediate terminal updates. This removes compaction-only scheduling and the timeline's separate character-bucket throttle so every progressive content type follows the same renderer path.

Extend native-event and timeline tests to cover shared text/compaction batching and terminal summary authority. Update the V2 migration notes, and validate with focused tests, UI typecheck, UI build, and the rebuilt Tauri executable.
Translate the OpenCode V2 client's InvalidRequestError during workspace session ownership hydration into a client-facing 400 response. Double-encoded or otherwise invalid session identifiers no longer escape the proxy boundary as Fastify 500 errors, while not-found, foreign, and infrastructure failures retain their existing handling.

Cover the double-encoded GET path alongside the existing foreign DELETE alias test, asserting one decode, no upstream proxy request, and the expected client error. Validated with server typecheck and all 339 server tests.
Project native text, reasoning, tool, and compaction deltas immediately instead of delaying renderer updates behind the new 250 ms scheduler. Keep expensive text timeline reconstruction bounded by the established 128-character signature buckets while preserving immediate tool structure and terminal authority.

Prevent busy-session action controls from stretching or narrowing the prompt field when the background action appears or disappears. The desktop action row now reserves a stable width while narrow layouts retain their responsive sizing, eliminating the corresponding message viewport reflow.

Validated with targeted native-event and timeline tests, UI typecheck and production build, packaged-resource prebuild, release Tauri build, and CDP measurements across a real busy-to-idle transition in the rebuilt executable.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/32965890165

Artifacts expire in 7 days.
Artifacts:

  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-tauri-windows
  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-tauri-macos
  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-electron-macos
  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-tauri-linux
  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-electron-linux
  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-tauri-macos-arm64
  • pr-647-514c5c56ebf98c16ddc0472bc8e668d7a93c7d86-electron-windows

Add native OpenCode message content cleanup at part, response, and session scope. Completed assistant messages are re-read before mutation, active responses are skipped, final text is preserved, and destructive response/session operations require confirmation.

Project consecutive reasoning into one expandable summary and group consecutive read, glob, and grep calls as exploration, matching the V2 TUI model. Pending permissions and forms stay individually visible, while expanded groups retain each underlying part ID and its delete action.

Remove the superseded timeline selection and x-ray controls, update all supported locales, and align the experimental OpenCode client lockfile to beta-18311.

Validated with UI, server, and Electron typechecks, the UI production build, 610 UI tests, and git diff checks.
Let native message update events remain authoritative after technical-part deletion instead of removing synthetic local part IDs that may already have been reindexed by an SSE projection.

Keep pending permission and form tools in their original exploration order, splitting grouped runs around them, and expose cleanup actions for completed assistant error responses.

Validated with 611 UI tests, UI/server/Electron typechecks, the UI production build, and git diff checks.
Project consecutive reasoning and read/glob/grep calls across assistant-message boundaries within the loaded turn. The first fragment owns the aggregate header while every underlying part stays in its original virtualized message row with its own ID, state, search target, and actions.

Share expansion state across fragments, open continuation rows for active search matches, and preserve visible boundaries from user text, other tools, usage rows, permissions, and forms. Hidden tools and invisible lifecycle markers do not split groups.

Add projection tests for cross-message boundaries, pending exploration tools, lifecycle visibility, group identity, and completion state.

Validated with 613 UI tests, UI/server/Electron typechecks, the UI production build, final code review, and git diff checks.
Measure the session center and progressively compact connection, context, timeline, and header actions only when they collide. Keep both drawers usable with a 480px center minimum and align the closed-panel controls and title row with the sidebar header.

Expose message and tool actions at normal widths, retain compact overflow menus for narrow layouts, distinguish technical cleanup with the eraser icon, and use mobile fullscreen instead of preview on mobile hosts.

Validated with the UI typecheck, drawer layout node tests, production UI build, diff checks, and live WebView measurements for the 63px header and drawer button hit targets.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33125412024

Artifacts expire in 7 days.
Artifacts:

  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-tauri-macos
  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-tauri-windows
  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-electron-macos
  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-tauri-macos-arm64
  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-tauri-linux
  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-electron-linux
  • pr-647-1d5cd7e00f587b29b9d9176d2d855b9923600ced-electron-windows

Keep single actions directly accessible while moving action groups into compact overflow menus only when at least two actions are available. Recreate responsive measurements after instance and fullscreen transitions and ignore transient zero-width layouts.

Coalesce only compaction transcript projections to 250 ms while preserving immediate text and terminal updates. Use one fuchsia compaction accent and reconcile virtual-list measurements by message key so capped windows continue following their new end item.

Cover coalesced compaction projection, authoritative terminal state, and same-length virtual window slides with focused regression tests. Typecheck, targeted tests, UI build, diff checks, and deployed bundle verification passed.
Update the generated lockfile from OpenCode beta 18311 to beta 18414, including the matching protocol and schema packages. Refresh the transitive msgpackr resolution produced by npm.
Clarify that the client lock is refreshed explicitly while the runtime CLI remains independently managed through compatibility checks. Document authoritative assistant content mutation, transcript pagination limits, and the safe cancel-first direction for queued prompt correction.
Allow owned assistant message updates through the workspace proxy and use the native messageUpdate response to refresh the local projection. Support deleting selected tool and reasoning ranges, including groups spanning multiple assistant messages, without touching later content.

Group consecutive shell tools alongside reasoning and exploration groups, expose direct group cleanup controls with hover previews, and remove obsolete destructive overflow styling. Cover route authorization, grouping boundaries, selected deletion, multi-message updates, and projection refreshes with focused tests.
Replace the composer side rails and expand control with a resizable five-row field, compact primary controls, and one overflow menu for secondary actions. Keep the new controls square and reduce timeline, message-border, and scroll-control visual weight.

Expose the command palette through native Electron and Tauri menus. Default keyboard hints and timeline tool segments off while retaining unseen subagent idle status until viewed.
Observe message-list and timeline viewport height changes and compensate their virtual offsets. Keep following views pinned to the end while preserving the bottom-relative position for users who have left follow mode.

Cover the bottom-anchor offset calculation alongside the existing virtual follow behavior tests.
Use the V2 read tool state's output field for display and copy text instead of the stale metadata preview. Add a focused renderer test that distinguishes the authoritative output from metadata.
@github-actions

Copy link
Copy Markdown

PR builds are available as GitHub Actions artifacts:

https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/33134580907

Artifacts expire in 7 days.
Artifacts:

  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-tauri-macos
  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-tauri-windows
  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-electron-macos
  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-tauri-linux
  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-tauri-macos-arm64
  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-electron-windows
  • pr-647-3f79e1a59527168aa1dbe50925041cbbbcbdfd35-electron-linux

Make DEV-v2 releases idempotent and fail closed by binding publication checks and reusable release execution to the target SHA.

Align session pagination, invalidation, prompt editing, worktree lifecycle, WSL path translation, and desktop shutdown behavior with native OpenCode V2 semantics. Preserve structured prompt payloads across edits and failures, serialize destructive operations, and keep remote navigation and proxy cleanup safe.

Cover the corrected UI, server, and Rust edge cases with focused regression tests. Validated with UI and server typechecks, the UI and Tauri release builds, 118 targeted UI tests, 74 server tests, 124 Rust tests, workflow YAML parsing, and git diff checks.
Persist explicit composer heights through client-state layout storage, restore them across remounts and failed sends, clamp them to the viewport, and return to automatic sizing after successful sends.

Open session previews directly with folder-scoped URL and mode persistence. Proxy isolated preview capabilities through dedicated loopback hostnames when safe and path-scoped URLs otherwise, including rewritten runtime APIs, streamed request bodies, WebSockets, SPA navigation, redirects, and source-checked element comments.

Handle malformed upgrades, SideCar route overlap, HTTPS and LAN fallback, opaque-origin sandboxing, large uploads, and unsupported Expect headers. Add focused manager, rewrite, security, composer-height, and preview-persistence coverage plus the CI test entries.

Validated with 13 focused tests, UI and server typechecks, git diff checks, a Tauri release build, and release-runtime smoke tests for CSS, API, POST, a 2.47 MB upload, WebSocket, SPA location sync, sandbox isolation, and folder restoration.
Document the measured DEV-v2 code growth, test contribution, reduction candidates, and runtime launch workflow. Link the analysis from the developer documentation index.

Add the standalone work-trace workspace prototype and its scoped styling for design exploration. Preserve the existing prompt control radius adjustments alongside the prototype work.

Validated the staged content with git diff --cached --check. These files are intentionally separate from the functional preview and composer commit.
Add Developer Automation to Advanced Settings for Electron and Windows Tauri. Each run uses an isolated profile and automatic loopback CDP port, reports bounded launch logs and target metadata, and is stopped with its full process tree during explicit stop or host shutdown.

Expose inspect, act, screenshot, and restart feedback to CodeNomad-owned OpenCode sessions through a token-authenticated loopback automation adapter. Session ownership, exact CDP target identity, navigation-safe accessibility refs, bounded diagnostics, and screenshot limits prevent cross-session or stale-target control.

Keep autonomous browser previews out of DEV-v2: no browser controller, child webview, browser IPC, browser permissions, or codenomad.browser tool is included. Cover the native protocol, launch managers, CDP lifecycle, adapter authentication, ownership fencing, UI integration, and cross-platform launch arguments with focused tests.
Start an internal loopback HTTP listener for native Developer Automation while preserving the configured user-facing HTTPS URL. Register the inert tool definitions independently of workspace restoration timing and keep every operation fenced by current session location ownership.

Reject non-loopback CDP WebSocket targets, invalidate accessibility refs and pending commands on socket errors, and serialize UI polling while fencing delayed start and stop responses. Add focused coverage for listener selection, socket failures, redirect rejection, and session-gated registration.
Document the current OpenCode one-shot plugin setup limitation: Developer Automation definitions are visible globally, while every operation remains inert until the authenticated bridge verifies session location ownership. Mark the dynamic location-scoped registration upgrade path explicitly.
Keep the workspace directory and list limit on every OpenCode session pagination request. Cursor-only follow-up requests fail location scoping and broke the full server suite after the V2 client migration.

Validated with the Yolo metadata regression, the server typecheck, and the complete server test suite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant