GeezerVison is showing github.com — desktop: model picker stutters on hover and scroll · Issue #64570 · anomalyco/opencode
desktop: model picker stutters on hover and scroll #64570DescriptionDescription
The model picker in the desktop app stutters: it drops a frame when it opens, hovering rows feels sticky, and fast scrolling of the list janks. The data is tiny (41 models across 3 providers) and GET /api/model answers in ~8 ms median, so this looks like client-side layout work rather than data.
Suspected causes in the dialog, from the 2.3.2 desktop bundle:
- each row dispatches on
mousemove, and measure() runs querySelector + getBoundingClientRect(); the variant flyout also adds a 100 ms open delay and a 300 ms safe-triangle aim delay, which reads as sticky
- the scroll handler calls
fadeHeaders(), which reads getBoundingClientRect() for every group header and then writes style.opacity / data-stuck — rect reads interleaved with style writes force a layout
follow() calls elementFromPoint() + closest() + a state dispatch on every scroll event
SearchList renders with <For> and is not virtualized
- opening the dialog mounts
useProviders(), which fires provider.sync() + model.sync() and re-renders the whole list when the sync lands
Expected: the list follows the pointer and the arrow keys without visible stutter.
Actual: opening stutters once; hover response lags because the flyout waits before it opens; fast wheel scrolling drops frames.
Plugins
-opencode.fork-notice, @tarquinen/opencode-dcp
OpenCode version
2.3.2
Steps to reproduce
- Open the desktop app on macOS with a few providers configured (here: 41 models over 3 providers)
- Open the model picker
- Move the pointer across several rows, then wheel-scroll the list quickly, then hold ArrowDown
- Repeat across sessions
Screenshot
No response
Operating System
macOS 27.2 (arm64, Darwin 27.2.0)
Terminal
desktop app (not a terminal) Activityopencodejr commented on Nov 18, 2026 Thanks for the detailed report. I couldn't try to reproduce this: it needs the macOS desktop app on real hardware to measure dropped frames, and that isn't available in my environment. A maintainer with that setup will need to check it.
A few notes from reading the dialog code:
- The header fade on scroll already reads every header position before it writes any styles, so it should not force a layout for each header in the way the report describes.
- The delays before the variant flyout opens are there on purpose, so the "sticky" hover may be how it was designed rather than a performance problem.
It would help a lot to have a recording from the desktop app's DevTools Performance panel: open the picker, sweep the pointer over the rows, then scroll fast. It would also help to know whether it still happens with your plugins (@tarquinen/opencode-dcp, opencode.fork-notice) turned off.
xun082 commented on Nov 19, 2026 I'd like to look into this on macOS. I'll start by capturing a DevTools Performance trace with plugins disabled, covering opening the picker, hovering rows, scrolling, and keyboard navigation. That should help identify which operations are actually causing the dropped frames.
Could you assign this to me if no one else is working on it? IgTriguero commented on Nov 20, 2026 Same desktop app version here (2.3.2 installed build), and I can add one detail that makes it much worse: native macOS fullscreen.
Environment: macOS 27.2.1 (arm64, Darwin 27.2.0), Electron 44.9.1, OpenCode Desktop 2.3.2.
For me it is not only stutter; hover often does not respond at all:
- The row under the pointer frequently does not highlight, or the highlight stays on the previous row and then jumps.
- The variant flyout often does not open; when it does, it can close while moving diagonally toward it, or stay attached to the first model it opened for and never move to another row.
- The model tooltip can stay stuck after the pointer leaves, or not appear at all.
In native fullscreen (⌃⌘F) this becomes constant. Windowed it still happens, just less often; leaving fullscreen reduces it but does not remove it.
Reproduction:
- Desktop 2.3.2 on macOS 27.2.1. Open the model picker with ⌘' (or the model name in the composer).
- Sweep the pointer over several rows: the highlight lags or does not follow, and the flyout does not open reliably.
- Enter native fullscreen (⌃⌘F), reopen the picker, and repeat. Failures are much more frequent; often the row never highlights and the flyout never opens until the pointer leaves and re-enters.
- Leave fullscreen: it improves, but still glitches.
Plugin check: I unloaded every non-builtin plugin through config hot reload and confirmed with GET /api/plugin that zero non-builtin plugins were active, then retested in fullscreen. The row highlight seemed slightly better, but the flyout still stayed stuck on one model and never moved to another. Plugins do not explain the flyout behaviour.
One possible lead, not confirmed: the flyout is dismissed on every window resize in select-dialog.tsx (createEventListener(window, "resize", () => dispatch({ type: "dismissed" }))), and native fullscreen emits a stream of resize events. Hover also depends on pointermove plus elementFromPoint() while rows scroll under a still cursor. I have not profiled it, so this is only a suspicion. zr988888 commented on Nov 21, 2026 I reproduced the scroll and hover lag on OpenCode Desktop 2.3.2 for macOS with 125 real catalog model names, then verified a local placement-loop patch. The lag was not just a slow model API or a long conversation: repeated flyout placement work blocks the renderer main thread.
I used two separate full Electron development processes (Electron 44.9.1, v2.3.2, stock CLI, isolated HOME/config/database) to avoid hot-reload contamination. One fixed the original component and the other fixed the patched component. The fake Console returned local budgets only; no real credentials or generation calls were used.
| Interaction |
Unpatched |
Patched |
| Four hover switches to the correct model flyout |
289.926–301.413 ms |
33.872–154.463 ms |
Main-thread mousemove dispatch for those hovers |
177.305–183.678 ms |
0.904–1.518 ms |
| Six successive wheel events, largest single dispatch |
219.782 ms |
0.218 ms |
| Three reverse-direction hover switches |
not separately measured |
38.825–54.449 ms |
Reverse-hover main-thread mousemove |
not separately measured |
1.139–1.996 ms |
The unpatched hover sequence raised 11 Maximum call stack size exceeded errors; the patched sequence had zero.
The six-wheel sequence produced matching scroll/thumb positions at the end on both builds (scrollTop = 290.909 px, thumb translateY = 68.4515 px), but the unpatched build blocks the thumb updates behind placement work. The patched build retains the original hover-open/safe-triangle delays, but no longer adds thousands of layouts from self-triggered placement updates.
This is directly related to the placement loop in #65138 and the existing fix in #65240. These are isolated development-shell measurements, not a claim that the production installed app has already been updated. neriousy commented on Nov 23, 2026 This was fixed in #65635, which removes the forced layouts on open, scroll and select (together with #65189 for hover). If the fullscreen flyout dismiss problem on macOS still happens, please open a separate issue for it. If you still see this on the latest version, comment here and we'll reopen.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|