Package CodeNomad OpenCode plugin#433
Conversation
Replace the copied opencode config template with a versioned npm-packable CodeNomad OpenCode plugin package. The server now builds and packs the plugin artifact, and desktop bundles carry the packaged plugin through the existing server resources. Workspace launches now merge any user or system OPENCODE_CONFIG_CONTENT JSONC with CodeNomad's plugin entry, preserving existing plugin config while ensuring the managed bridge is available. Production uses an explicit npm file alias for the packaged tarball, while dev keeps loading the TypeScript plugin source directly. Validated with plugin build, server and Electron typechecks, targeted plugin config tests, and WSL spawn environment tests.
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25678633369 Artifacts expire in 7 days. |
|
Gatekeeper review for the latest PR state. Understood request: review this PR ruthlessly for regressions and implementation quality, not to make code changes. Assumption: the PR should preserve existing desktop packaging behavior across Electron, Tauri, Windows/WSL, Linux, and macOS. Findings:
Validation performed:
Decision: changes requested. I would not merge this PR until the accidental platform dependency is removed and WSL production plugin loading is proven with a real path translation/accessibility test. -- |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25678732783 Artifacts expire in 7 days. |
Remove the accidental darwin-arm64 Tauri CLI root dependency so installs remain cross-platform. For WSL OpenCode launches, rewrite packaged CodeNomad plugin file specs through a WSLENV-translated helper path before exec so the Linux process receives a reachable file path inside OPENCODE_CONFIG_CONTENT. Ensure Tauri prebuild installs the OpenCode plugin workspace build dependencies before invoking the server build, since server packaging now builds the plugin package. Validated with plugin build, server typecheck, targeted OpenCode plugin config and WSL spawn tests, and diff whitespace checks.
|
Check again now |
|
Gatekeeper re-check for the updated PR state. Understood request: re-review the latest pushed state and verify whether the prior blockers were addressed. Assumption: this PR must be mergeable with the validation commands listed in the PR body, especially the plugin build/package path. Findings:
Because Resolved from prior review:
Validation performed:
Decision: changes still requested. The prior architecture blockers are mostly addressed, but this PR is still not mergeable until the plugin package build and -- |
Disable declaration output for the packaged OpenCode plugin and clean dist before builds so stale .d.ts files are not packed. The plugin is consumed as runtime JavaScript by OpenCode, and declaration generation can infer non-portable nested zod paths from @opencode-ai/plugin. Add explicit hook return annotations on the plugin entry to keep exported runtime shapes clear while avoiding declaration generation in CI builds. Validated with plugin build, server prepare-plugin packaging, server typecheck, and targeted plugin/WSL tests.
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/25679251910 Artifacts expire in 7 days. |
|
Now? |
|
Gatekeeper re-check for the latest pushed state. Understood request: verify whether the remaining blocker is resolved now. Assumption: this pass should focus on the previously failing plugin build/package path and any obvious regressions in the touched code. Findings:
Previously requested fixes now verified:
Validation performed:
Decision: no changes requested from this gatekeeper pass. The prior blocker I could reproduce is fixed. CI or a clean dependency install should still be used as the final authority for the broader typecheck/test commands that this local worktree could not execute cleanly. -- |
|
@pascalandr - Would you be able to test this on Windows and see if it still works in packaged binaries? |
|
Tested locally on Windows: Tauri packaged build passes, Electron packaged build passes after the small Windows quoting fix in #436, and both packaged resources include the OpenCode plugin tarball. |
## Summary - Avoid routing the Electron resource-prep Node invocation through the Windows shell. - Fix local `build:win` when Node is installed under `C:\Program Files\nodejs\node.exe`. ## Validation - `npm run build:win --workspace @neuralnomads/codenomad-electron-app` ## Notes - This targets `opencode-config-merge` so it can be merged into #433.
|
Thanks for testing and the PR @pascalandr |
…cloning, chat search and more (#443) ## Thanks for contributions - [@pascalandr](https://github.com/pascalandr): [#394](#394), [#397](#397), [#405](#405), [#410](#410), [#411](#411), [#423](#423), [#424](#424), [#425](#425), [#426](#426), [#428](#428), [#436](#436) - [@jollyxenon](https://github.com/jollyxenon): [#381](#381), [#409](#409) - [@OfflinePing](https://github.com/OfflinePing): [#415](#415) ## Highlights - **Web previews create a much tighter fix loop**: Open a live preview from a session, highlight the exact part of the page that needs work, and tell the model what to change right from the webpage. CodeNomad sends that page and element context back into chat so the LLM can act on specific visual feedback instead of vague descriptions. - **Bringing repositories into CodeNomad is much easier**: You can now clone a Git repository directly from the workspace picker, making it faster to start work on a fresh project without leaving the app. - **Searching inside long conversations is finally practical**: Session history search can now find matches across messages, tool output, and related content, helping you jump straight to the part of a conversation you need. - **Sessions are easier to manage at a glance**: Parent sessions now show aggregated token and cost totals across subagents, the message timeline can be hidden when you want more room, and tabs can be reordered. - **Mobile views and narrow screens feel much better**: Prompt controls, message actions, timeline behavior, and other session UI pieces adapt more cleanly when space gets tight. ## What’s Improved - **Smoother workspace startup**: The home screen, empty states, and startup flow are clearer, and returning between active projects and the home view feels more natural. - **More useful browsing and previewing**: Markdown now supports math rendering, web previews are integrated into the session flow, and unrestricted browsing respects the selected workspace root more reliably. - **Cleaner model and agent selection**: Models are grouped by provider, and primary agent selection now follows OpenCode’s visibility rules more closely. - **Better prompt and attachment handling**: File attachment picking is more consistent with drag-and-drop behavior, and prompt controls are laid out more clearly in compact layouts. - **More self-contained packaging**: Desktop builds do a better job bundling the runtime, shipping the CodeNomad OpenCode plugin, and producing more consistent release artifacts. ## Fixes - **Permission flows are more reliable**: Stale permission events are ignored after a reply, permission metadata is preserved more safely, and attachment context survives more consistently. - **Idle/session indicators behave more predictably**: Idle badges now stay visible until they are actually seen, and session status behavior is easier to understand across parent and child sessions. - **Desktop and packaged builds are more dependable**: Bundled resources refresh more reliably, packaged session storage is isolated correctly, remote window titles are preserved, and Windows resource preparation avoids a brittle shell path. - **Compact layouts are less frustrating**: Message actions, tool-call controls, timeline spacing, and prompt controls behave better in narrow center panes and smaller screens. - **Release/update navigation is clearer**: Update links stay visible more reliably, making it easier to see and open release information when an update is available. ### Contributors - [@pascalandr](https://github.com/pascalandr) - [@jollyxenon](https://github.com/jollyxenon) - [@OfflinePing](https://github.com/OfflinePing) ## Merged Pull Requests ### @shantur - PR [#397](#397) “Add clone repository workspace flow” - PR [#399](#399) “feat(ui): allow tab reordering” - PR [#400](#400) “feat(ui): add chat history search” - PR [#430](#430) “Add session web preview mode” - PR [#432](#432) “fix(ui): align prompt attachment picker with drop behavior” - PR [#433](#433) “Package CodeNomad OpenCode plugin” - PR [#434](#434) “Refactor workspace startup and empty session states” - PR [#437](#437) “Improve prompt layout for narrow session panes” - PR [#438](#438) “Improve messages layouts on narrow screens” ### @pascalandr - PR [#394](#394) “fix(tauri): refresh bundled resources on rebuild” - PR [#405](#405) “fix(tauri): prefer bundled server entry in release” - PR [#410](#410) “fix(ui): keep update release link visible” - PR [#411](#411) “fix(ui): return to active projects from home” - PR [#423](#423) “fix(ui): follow up idle badge behavior” - PR [#424](#424) “fix(ui): drain yolo permissions outside shell render” - PR [#425](#425) “fix(ui): ignore stale permission events after reply” - PR [#426](#426) “fix(ui): reconcile permission tool attachments” - PR [#428](#428) “feat(ui): make message timeline hideable” - PR [#436](#436) “fix(electron): avoid shell for resource prep” ### @OfflinePing - PR [#415](#415) “feat(ui): show aggregated total tokens and cost for parent sessions including subagents” ### @jollyxenon - PR [#381](#381) “Fix(ui): Support Markdown Math Rendering” - PR [#409](#409) “fix(ui): align primary agent selection with OpenCode”
Summary
Validation
Notes