fix(tui): keep sidebar reactive while mounted (fixes #7438) - #7460
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b447aab60
ℹ️ 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".
| ```text | ||
| Before fix: expected "runtime-agent"; mounted frame remained on Models. | ||
|
|
||
| Sidebar suite: 60 pass, 0 fail, 121 assertions |
There was a problem hiding this comment.
Add paths to captured QA outputs
This evidence directory contains only this summarized README, with no exact command/output artifacts and no paths to such artifacts. Because the change touches the OpenCode TUI, the recorded pass counts and transition markers cannot be independently audited, and the repository's mandatory QA evidence gate is not satisfied until the captured outputs are stored and referenced here.
AGENTS.md reference: AGENTS.md:L38-L42
Useful? React with 👍 / 👎.
|
I have read the CLA Document and I hereby sign the CLA |
Summary
Keep the OpenCode sidebar live while its slot remains mounted. Mirror changes now update a Solid signal consumed by a reactive child accessor, so active and idle views reconcile without reopening or resizing the TUI.
Root Cause
OpenCode invokes a slot renderer once and retains its returned node tree. The poller updated a plain closure variable and called
requestRender(), but that only requested a frame; it did not rebuild the static sidebar tree.Changes
packages/omo-opencode/src/tui.tsinsertaccessor.packages/omo-opencode/src/tui.test.tsscript/build.tssolid-jsexternal so OpenTUI and the plugin share one runtime.package.json,bun.lock.omo/evidence/20260828-issue-7438-tui-sidebar-reactivity/README.mdReproduction Before Fix
The poll consumed the changed snapshot, but the already-mounted tree stayed unchanged.
Verification After Fix
Real OpenCode 1.18.23 TUI under isolated tmux:
The mounted sidebar showed the live agent, removed it on the idle snapshot, and the real OpenCode DB session count remained unchanged.
Risk
Low. The mirror schema, polling cadence, slot order, and rendered view model are unchanged. The patch changes only how the existing view reaches the mounted OpenTUI tree.
Fixes #7438
Summary by cubic
Fixes the TUI sidebar so it stays live while mounted instead of freezing on the originally rendered frame. Mirror snapshot changes now flow through a Solid signal into a reactive child accessor, so active and idle views reconcile without reopening or resizing the TUI. Fixes #7438.
Dependencies
solid-js1.9.12 as a direct runtime dependency, pinned to match OpenTUI's peer.solid-jsexternal in the bundle so the plugin and OpenTUI share one Solid runtime.Written for commit 0b447aa. Summary will update on new commits.