GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — desktop: model selector flyout causes infinite recursion / freeze when zoomLevel != 1 (v2.3.2 regression) · Issue #65138 · anomalyco/opencode

desktop: model selector flyout causes infinite recursion / freeze when zoomLevel != 1 (v2.3.2 regression) #65138

New issue
Copy link
New issue
Copy link
Closed
#65240
#65195
Closed
desktop: model selector flyout causes infinite recursion / freeze when zoomLevel != 1 (v2.3.2 regression)#65138
#65240
#65195
Copy link
Labels
area/desktopDesktop appplatform/windowsWindowstype/bugSomething is brokenversion/v2OpenCode 2.x

Description

@googlchicken123
googlchicken123
opened on Nov 20, 2026
Issue body actions

Description

After updating from v2.3.0 to v2.3.2, opening the model selector and moving the pointer over models causes severe 1–2s UI freezes/stuttering.

`renderer.log` repeatedly logs on every hover/open:
```text
[error] Uncaught RangeError: Maximum call stack size exceeded
[error] Uncaught (in promise) RangeError: Maximum call stack size exceeded

Cause
With non-100% app zoom (e.g. "zoomLevel": 1.1 in opencode.settings), the model dialog flyout positioning code recalculates an offset using:

const a = n.getBoundingClientRect()
const o = a.left - parseFloat(n.style.left)
const s = a.top - parseFloat(n.style.top)
return o || s ? { left: i.left - o, top: i.top - s } : i

At zoomLevel: 1.1, Chromium quantizes getBoundingClientRect() to device pixels (1/1.1 increments), so a.left - parseFloat(n.style.left) produces a non-zero sub-pixel rounding residual (~0.09px). Because the o || s check has no epsilon tolerance, the reactive effect re-dispatches { type: "placed", position } continuously in an oscillation loop until the call stack overflows.

Workaround / Regression info
v2.3.0: Worked smoothly at 110% zoom (0 errors).
v2.3.2: Reproducible 100% of the time at 110% zoom (Ctrl +).
Workaround: Pressing Ctrl + 0 (resetting zoomLevel to 1) immediately resolves the freeze and eliminates all RangeError logs.

Suggested fix: ignore sub-pixel deltas (e.g. Math.abs(o) > 0.5 || Math.abs(s) > 0.5) or guard the placed effect against insignificant position deltas.

Plugins

None

OpenCode version

2.3.2 (Desktop app, Windows)

Steps to reproduce

  1. Open OpenCode Desktop v2.3.2 on Windows.
  2. Zoom in once (Ctrl +, setting "zoomLevel": 1.1 in opencode.settings).
  3. Click the model selector at the bottom of the chat composer.
  4. Hover the mouse pointer up and down over the model list so the right-side variant flyout opens.
  5. Observe 1–2s freeze/stutter on hover and Uncaught RangeError: Maximum call stack size exceeded spamming in renderer.log.
  6. Press Ctrl + 0 (100% zoom) and repeat step 3–4 — the freeze disappears immediately.

Screenshot

Screenshot_7

Operating System

Windows 11 (Windows_NT 10.0.26300, x64)

Terminal

OpenCode Desktop app (Electron)

Activity

  1. opencodejr
    added
    area/desktopDesktop app
    platform/windowsWindows
    type/bugSomething is broken
    version/v2OpenCode 2.x
    on Nov 20, 2026
  2. opencodejr commented on Nov 20, 2026

    @opencodejr
    opencodejrBot
    on Nov 20, 2026
    Contributor
    More actions

    Thanks for the detailed report and the analysis. I couldn't reproduce this here: it needs the desktop app (or a Chromium browser) running at a non-100% zoom, and my sandbox can't provide that. The code you quote is in packages/app/src/providers/models/select-dialog.tsx in v2.3.2 but not in v2.3.0, which fits your account of a regression. A maintainer with a desktop or browser setup will need to confirm it. Until then, your workaround is to reset the zoom with Ctrl + 0.

    Reacted by googlchicken123
  3. r266-tech commented on Nov 20, 2026

    @r266-tech
    r266-tech
    on Nov 20, 2026
    Contributor
    More actions

    I reproduced this on dev@8b36735 in Chromium 156 on macOS, using actual browser zoom and the model picker with a local server fixture. The open, hover, and variant-selection sequence made 10 flyout rectangle reads at 100% and 12,185 at 110%, where it raised four stack-overflow errors.

    The placement effect reacts to each coordinate update. The patch measures again when the visible model row changes and preserves the rendered height and containing-block adjustment. Patch on the fork

    The same sequence selected the second model's max variant at 90%, 100%, 110%, and 125%, with seven rectangle reads and zero page errors per run. The existing model-picker browser suite (18 cases), placement state tests (30), and repository checks passed. Native Windows Desktop remains unverified. AI-assisted implementation and verification.

    Reacted by googlchicken123
  4. zr988888 commented on Nov 21, 2026

    @zr988888
    zr988888
    on Nov 21, 2026
    More actions

    I reproduced the same placement-loop signature on OpenCode Desktop 2.3.2 for macOS (Apple Silicon, macOS 27.0.1, Electron 44.9.1). Opening the picker stalls for 1–2 s from either the composer model button or ⌘ + ', including in an empty session. This can happen on initial open, without hovering a different row or selecting a model. I did not verify the zoom factor of that production recording.

    In one Performance capture of the initial click, Event Timing reported 2,029.4 ms total interaction latency. The renderer's click dispatch took 1,975.5 ms, containing 3,254 UpdateLayoutTree events and 3,254 Layout events. CPU samples point to DialogSelectModel's measure() → getBoundingClientRect() and the flyout's inline left/top writes. The local /api/model call returned 125 catalog entries in 48–50 ms including CLI startup; the renderer was doing synchronous layout work, not waiting for that list. The original trace stays local because it can include private UI data.

    This looks like the same feedback loop described here: the post-render effect introduced in #64409 observes the full flyout() signal, so a new placed coordinate can trigger another measurement before paint. I independently verified a local v2.3.2 patch that keeps the second measurement, but makes it react to a new placement attempt or changed flyout content instead of its own coordinates. This is similar to #65240's approach to bounding remeasurement.

    I also completed an isolated full Electron desktop A/B (Electron 44.9.1, the same v2.3.2 source tree, the stock 2.3.2 CLI, separate HOME/config/database, no real account). It uses 125 test models, each with 10 variants, and a local fake Console budget. Each scenario warms up once, then opens the picker by the composer button and ⌘ + ', with a paid test row's budget-bearing flyout visible.

    Native desktop zoom Unpatched mouse / shortcut Patched mouse / shortcut Unpatched layouts Patched layouts
    100% 21.945 / 21.127 ms 20.514 / 21.889 ms 3 / 3 3 / 3
    90% 190.347 / 224.292 ms 21.534 / 22.376 ms 2,674 / 3,081 3 / 3
    110% 191.231 / 196.901 ms 22.538 / 20.448 ms 2,674 / 2,679 3 / 3

    These are renderer EventDispatch times and Layout counts inside that dispatch. The unpatched runs had 6 Maximum call stack size exceeded page errors per zoom case; the patched runs had zero. At 100% both were fast, so fractional zoom is a useful reproducer, not a prerequisite shown by my original recording. This is a development-shell test, not a claim that a patched packaged build has been installed.

    The isolated Chrome 157 regression case performed 22 flyout rectangle reads before the change (failed its read limit) and 1 after (passed, including the 6px bottom clearance check). The 19 model-picker browser tests and 30 placement-state tests passed locally.

    Related scrolling/hover reproduction is in #64570; independent verification of the existing fix PR is in #65240.

  5. r266-tech commented on Nov 23, 2026

    @r266-tech
    r266-tech
    on Nov 23, 2026
    Contributor
    More actions

    I reran the browser zoom probe on dev at b705c446f, which includes #65635, using Chromium 156 on macOS with a local model fixture. At 90%, 100%, 110%, and 125% browser zoom, opening the picker, hovering both model rows, and choosing the second model’s variant completed. Each run recorded two flyout rectangle reads and zero page errors. Desktop release confirmation remains open.

    AI-assisted validation.

  6. neriousy commented on Nov 23, 2026

    @neriousy
    neriousy
    on Nov 23, 2026
    Member
    More actions

    This was fixed in #65635, which replaces the reactive flyout placement that looped at non-100% zoom. If you still see this on the latest version, comment here and we'll reopen.

  7. neriousy
    closed this as completedon Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/desktopDesktop appplatform/windowsWindowstype/bugSomething is brokenversion/v2OpenCode 2.x

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.