GeezerVison is showing github.com — fix(cli-rs): bring the Rust client level with the TUI by simonklee · Pull Request #66470 · anomalyco/opencode
Conversation
simonklee
commented
Nov 25, 2026
•
edited by opencodejr
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
What it does
Brings the Rust client level with dev's TypeScript TUI after #65903, #65906, #63669, #65982, #65980, #66041, #66107,
#66130, #66035, #66201, #66207, #65136, #66378, #66363, #66370, #65505 and the OpenTUI 0.9.9 bump (#66424 needs no port:
Rust's Local::connected and sidebar_footer already read the session location).
- Message Actions filters again (fix(tui): re-enable type-to-filter in message actions #65903). The search box sits in the title row as "Search actions", and typing
filters the actions, as in TS. New P-APP scenario E.6b/message-actions.
- The goal dialog scrolls (fix(tui): make goal dialog content scrollable #65906). Plugin panels take a
fit_screen flag that keeps their body within the screen.
New P-APP scenario E.14/goal-scroll.
- Dialogs honour
scroll.speed. Every dialog scroll area (selects, error details, execute, panels including goal
and /btw, permission, sidebar) now uses the setting through one shared opencode_ui::scroll, default 3 rows per
wheel step as in TS.
- Variants stay saved per model speed (fix(tui,app): keep variants saved for a model speed #65982, fix(models): honor legacy variants at the selected speed #66107). Switching speed picks the variant saved for that speed,
including legacy variants written before speeds shared one variant.
- Aborted plugin calls reject (fix(plugin): honor abort signals in Promise plugin API calls #65980, fix(plugin): reject aborted Promise plugin calls with the signal's reason #66041). The JS plugin host's client
fetch now honours signal, rejecting
with the signal's reason instead of completing the request.
- Loaded transcript history stays across head refreshes (fix(app): keep loaded history when the transcript is read again #66035). Re-reading the newest message page keeps anchored
older pages, bridges up to three pages ([20, 40, 140]), and refreshes unsettled kept messages.
- MCP skills and 502
SkillLoadError (feat(core): load skills from MCP servers #66201, fix(core): report skills that fail to load instead of crashing #66207). Regenerated compat.js carries 502 and
experimental.skill.file, and a TUI test checks that SkillLoadError shows its message and restores the draft.
- Added ACP patches keep a final empty
+ line (fix(util): keep a final empty + line in an added file #66378). Patch.parse keeps trailing blank added lines and drops
the old workaround in ACP permission previews.
- Connecting an integration lists all of its providers (fix(tui): list every provider of a just-connected integration #66363). The post-connect model picker filters by
integrationID rather than a single provider ID, so integrations serving multiple providers (such as OpenCode and
OpenCode Go) list all of them.
- Model picker stays responsive with large catalogs (fix(tui): keep the model picker responsive with large catalogs #66370). Caches a per-catalog model index in
Local, indexes
provider and favorite lookups in dialogs/model, and reuses select rows across grouped-to-flat search transitions.
- Undo on early interrupt (feat: undo when interrupting before the model answers #65505). Double-Escape on an empty composer with no pending inbox items takes back the
last user prompt when the model has not yet produced a visible answer, restoring it to the prompt. New P-APP scenario
E.2/interrupt-undo.
- Config-only providers count as connected (fix(tui): count config-only providers as connected #65793). A provider set up in config without credentials counts as
connected, as in TS, and plugin provider lists are scoped to the session's location.
- LaTeX control spaces in math (fix(latex): support the LaTeX control space in math #64156).
\ , \t, \r and \n render as spaces in math, as in TS.
- A resize keeps the scroll position. Since the transcript window was bounded (fix(cli-rs): bound the transcript window so scrolling stops growing memory #65826), widening or growing the
terminal in the middle of a long session jumped the view up: OpenTUI clamps the scroll before the transcript's resize
handler runs, and the handler then applied relative corrections on top. The top visible row is now the anchor, and
the view scrolls to its settled position after layout. Four navigate::resize_* tests cover width, height, the
sidebar breakpoint, following at the bottom, streaming, and a resize after Page Up. perf compare shows no
regression.
- Pins OpenTUI 0.9.9 and regenerates generated files (feat(core): add agent instructions and use them for Plan mode #63669, feat(core): add push notifications for the mobile apps #66130, feat(core): preserve subagent session IDs across compaction #65136). Pins
opentui / opentui-sys 0.9.9
(all eight native platform zips checked), re-records the TS parity fixtures on 0.9.9, and regenerates types,
compat.js, plugin.luau and F.7/folds.json for agent instructions, push notifications, and compaction_jobs.
Checks
fmt, clippy, check:drift, and the API, store, plugin (including compat.test.ts) and TUI suites pass on dev
6e01a86973; packages/cli-rs matches native-next (9a015698c9), where the full suites (P-APP, P-TUI, P-CLI, P-PTY,
ACP) passed at each step.
Added by the opencode bot (AI-generated).
Public API: plugin ABI: providers read takes an optional location, Panel gains fit_screen (wire-compatible; Rust callers or implementers of Read::providers must pass a location)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Port of #65903: Message Actions puts its search box in the title row ("Search actions") and typing filters the actions again. The P-APP scenario E.6b/message-actions records the dialog from the timeline, a filtered list, and escape. Tests and the E.10b P-TUI scenario now wait for the title-row search, since the search box covers the title.
Upstream moved the TS TUI to @OpenTui 0.9.9. Every fixture writer ran again; the frames are unchanged. Two P-APP scenarios wait longer: P.1/p0a-composer types once the plugin's box shows, as keys typed before TS loaded the plugin were lost, and E.13b/child-permission waits for the root session's tab, which TS now draws after the prompt. C.13/prompt-continue records TS's reads of the placeholder session.
Upstream #65906 makes the goal dialog's body a scroll of at most min(60%, rows - ceil(rows / 4) - 8) rows, at least 3, scrolled by the arrows, j/k, page up and down, home and end. The host's panels already scroll with those keys, but at most 60% of the screen and at least 8 rows, so on a short terminal the dialog ran past the bottom. A panel's new fit_screen flag takes the goal dialog's limit, and the goal plugin sets it. New P-APP scenario E.14/goal-scroll.
Port of f176d3b (#65982). Preferences saved before a model's speeds shared its variant may name a speed; the lookup now tries the standard model, the model itself, then each of its speeds.
Counterpart of 57f83d6 (#65980) and 883c871 (#66041), which fixed the server's Promise plugin adapter. The JS host's client fetch ignored init.signal: an aborted call still reached the server and resolved. It now rejects at once when already aborted, and with the signal's reason on an abort mid-call, as fetch does; the client wraps that as a Transport error, as in the TS TUI.
Counterpart of 4bb997e (#66107). A model.json written before speeds shared their model's variant may hold one per speed. The variant lookup tried the standard model, the model as passed, then every speed in catalog order, so switching to fast took flex's saved variant. It now tries the speed the model runs at before its siblings, and checks the variant against that speed's model, as TS does.
Anchor the top visible transcript row by absolute position through a terminal resize and re-anchor after layout and deferred refit, instead of applying relative scroll_by deltas on each row above.
In OpenTUI's layout pass, ScrollBox's content.on_resize runs before its child row resize handlers and clamps scroll_y to the new max_y. Widening or enlarging the terminal dropped max_y below scroll_y—exposed throughout the middle of long sessions once #65826 (0089ba9) bounded the window below the view, and also across sidebar breakpoint crossings and near-bottom resizes—so the subsequent relative scroll_by deltas double-subtracted and jumped upward by turns.
The resize pin now stores the top overlapping row (adjusted for same-frame drops above), sets scroll_to(0, target) directly from the anchor's settled y (scaling mid-row scroll proportionally on rewrap), mounts newer rows if enlargement hits the artificial window end, avoids premature sticky(true) re-sticking on pre-layout max_y, and clears on explicit user scroll.
Keeping the scroll position across a resize made every newly mounted
row's first resize ask the transcript model whether it was at the end,
which scans the row specs. That cost scroll_all 6.8%, scroll 3.2% and
jump_home_end 11.5% more instructions. The pin's checks now return early
when no resize is pending, and Model::at_end returns early with no end
set; perf compare against the parent reports no regression.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't run this one, so this is a code-only review. There's no Rust toolchain in the review sandbox, so I couldn't build the Rust crates or run their tests, clippy, check:drift or the parity suites. What did run: compat.test.ts (76 pass) and typecheck:tsc (clean). I compared the ports with the TypeScript TUI: undo-on-interrupt, config-only providers, the plugin fetch abort handling, Patch.parse and the model picker filtering by integration all match. I found nothing blocking. The resize anchoring in messages/list.rs and the head-page bridging in the store are the most complex parts, and I'm relying on your navigate::resize_* and store tests for them.
Public API (plugin ABI):
- The
providers read gains an optional location (HostRequest::Providers → Providers { location }). Older plugins that send { "type": "providers" } still work. Rust code that implements or calls Read::providers() against opencode-plugin-abi now has to pass a location, e.g. providers(None), so that change breaks existing Rust code at compile time.
Panel gains an optional fit_screen field, default false (backwards compatible).
- In the JS compat layer,
data.location.provider.list and sync accept a location (additive).
- Luau types are regenerated to match, and pick up
compaction_jobs in the config types.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|