Repository navigation
Conversation
|
V2 review against the current The server-owned read-only RPC + separate
Leaving the PR open pending those checks; this is not a rejection of the sidebar idea. |
a835c6f to
791f08b
Compare
|
Rebased onto current
"peerDependencies": {
"@opencode-ai/plugin": ">=1.4.0 <2",
"@opentui/core": ">=0.5.14 <0.6",
"@opentui/solid": ">=0.5.14 <0.6",
"solid-js": ">=1.9.0 <2"
}
One change you may want to overrule: I replaced the |
Add a native OpenCode 2 sidebar that renders Loop status into `sidebar.content` over a read-only `bybrawe-opencode-loop-status/read` RPC, mirroring the dedicated Goal panel.
…refuse foreign reads
791f08b to
aac4a93
Compare
|
Rebased again: Now rebased onto The short hashes from my previous comment are stale:
The workflows are still at |
|
Maintainer triage 2026-10-27: this is a valuable read-only TUI status projection (native |
|
@zhek, thank you for this thoughtful contribution! 🙌 The native OpenCode 2 Loop sidebar is a genuinely useful improvement alongside the dedicated Goal status panel. In particular, the separate We want to include this feature, not leave it indefinitely unreviewed. Main has moved through Loop 0.6.9 release preparations and native OpenCode 2.1.4 canaries since this branch was last rebased. I'm integrating the sidebar against the current code while preserving the critical release, corrupt-state and scheduler ownership safeguards; the generated 2.0-era bundles and peer assumptions cannot simply be merged wholesale. I will keep your authorship and link to this PR in the integration work. We also need real native OpenTUI render/teardown on Windows, Linux and the current 2.1.x API, plus a clean consumer package test. Thank you again for putting the implementation and tests together! |
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…s sidebar (#165) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…165) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…165) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…solation (#165) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…cross Win/Linux (#165) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…separately testing 0.7 (#165) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…nd dispose independently (#165 #284) Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
…3.49 on Windows/Linux (#165 #284)
…3.49 on Windows/Linux (#165 #284)
|
Progress update — the integration is real now: maintainer integration PR #190 ports your sidebar source, read-only location-scoped RPC, formatter/controller, real OpenTUI render smoke and clean consumer tests onto current Loop |
…pecting module import failure (#165)
…efer to real rendering CI (#165)
Integrate the contributor's read-only server RPC, separate native TUI slot, status formatting, bounded polling, safe disposal and shared Loop+Goal rendering. Preserve the current Loop 0.6.9 runtime, with 9/9 CI workflow suites green including pinned OpenCode 2.1.4 on Linux/macOS and OpenTUI 0.5/0.7 on Windows/Linux. Fix disk amplification from repeated corrupt-state polling using a read-only peekState, correctly count stopped jobs, sanitize job names/watch paths/pause reasons, and show native pauseReason. Add regressions for every automated review finding. Credit for original design and implementation: zhek, PR #165. Co-authored-by: zhek <35113171+zhek@users.noreply.github.com>
|
@zhek — thank you again for the original native Loop sidebar design, implementation and tests! 🎉 The integration is now merged into Closing this original PR as superseded by the merged contribution, not because the idea was rejected. The feature will be published in a future version after 0.6.9 (which has already shipped). Remote/split-cache TUI auto-discovery remains tracked in #191 / upstream #55084. We appreciate the contribution and would welcome follow-up improvements. |
All four clean strict npm installs and real Bun OpenTUI co-render lanes passed: Windows/Linux on exact OpenCode 2.0.18+OpenTUI 0.5.14 and 2.1.4+0.7.0, with both independent Loop/Goal candidate tarballs. No --legacy-peer-deps or source node_modules links. Keeps current published versions unchanged; #191 real CLI plugin auto-discovery and Goal npm peer-compatible release remain open before announcing 0.6.10. Credit original Loop sidebar feature to @zhek (#165 #190).
What
Adds a native OpenCode 2 sidebar that renders Loop status into
sidebar.content, mirroring the dedicated Goal panel. Scheduling stays server-owned; the TUI process only paints the text it is handed.Why a separate
./tuientryui.slotexists only in the TUI plugin context, not the server one, so this needs its own entry point. Status reaches the panel through a read-onlybybrawe-opencode-loop-status/readRPC rather than shared state.Design notes
Rpc.define, because Loop ships committed single-file bundles and importing@opencode/plugin/rpcwould inline@opencode/schemawith its effect/zod/ai-sdk graph. The host types registration structurally, so a plain object satisfies it.loop.log. No completion percentage, throughput estimate or dispatch promise — Loop has no completion metric of its own.v2-status-rpc-unavailableand keeps scheduling. Losing the scheduler to a missing cosmetic surface is the wrong trade.Tests
scripts/tui-status-test.mjs— formatter semantics, bounded panel size, request coalescing, cross-session and oversized response rejection, RPC input validation, location binding, idempotent disposal.scripts/native-tui-render-smoke.mjs— renders the published./tuientry through real OpenTUI primitives and asserts visible characters plus reactive session switching. Requires Bun, because OpenTUI's native FFI is unreachable from plain Node..github/workflows/native-sidebar.ymlruns it on Linux and Windows.npm test,npm run checkandnpm run test:tui-nativepass locally.Reviewer note
Committed
src/server.jsandsrc/native.jswere regenerated withnpm run build:plugin(Bun 1.4.2). A different bundle diff produced by another Bun version is expected and is not a source change.