Skip to content

fix(desktop): OpenCode Go mimo vision + Windows DPI repaint / 会话切模型读图与 Windows 缩放修复 - #7822

Open
SivanCola wants to merge 1 commit into
esengine:main-v2from
SivanCola:fix/dpi-and-session-vision
Open

fix(desktop): OpenCode Go mimo vision + Windows DPI repaint / 会话切模型读图与 Windows 缩放修复#7822
SivanCola wants to merge 1 commit into
esengine:main-v2from
SivanCola:fix/dpi-and-session-vision

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

Addresses two high-signal items from the 48h bug triage:

  1. [Bug]: 会话内切换模型后读图能力不生效,需新开对话才恢复 #7798 — mid-session switch to mimo-v2.5 did not attach vision image payloads when the model is selected under OpenCode Go.
  2. [Bug]: UI界面异常 #7794 / [Bug]: UI界面异常 #7799 — Windows UI scale/blur after minimise-restore (and related restart scale oddities).

Vision (#7798)

  • opencode-go listed mimo-v2.5 as a chat model but not in VisionModels (only kimi-k3).
  • Mid-session switch stayed on opencode-go/mimo-v2.5imageInputEnabled false → path text only.
  • New sessions with bare mimo-v2.5 default often hit the official MiMo provider (vision OK), which made the gap look session-scoped.

Fix: add mimo-v2.5 to the OpenCode Go vision catalog; migrate stock vision_models = ["kimi-k3"] lists on load (preserve explicit empty/custom lists).

Windows DPI (#7794 / #7799)

Test plan

  • go test ./internal/config/ ./internal/control/
  • tsx desktop/frontend/src/__tests__/dpi-repaint.test.tsx
  • Manual: default opencode-go/deepseek-v4-flash, switch to opencode-go/mimo-v2.5, paste image → model describes image
  • Manual (Windows): minimise → restore; UI scale and text sharpness match system DPI

Related

中文摘要

修复 OpenCode Go 下会话内切到 mimo-v2.5 读图失效,并在 Windows 最小化恢复时强制重绘以缓解缩放/模糊。

Problem
1. Mid-session switches from a text-only default (e.g. opencode-go/
   deepseek-v4-flash) to opencode-go/mimo-v2.5 still treated images as
   path-only text (esengine#7798). New sessions with mimo as default often worked
   because they resolved a different vision-capable provider.
2. Windows minimise/restore and restart can leave a stale WebView2 scale
   layer, showing blown-up or blurry UI (esengine#7794, esengine#7799).

Root cause
- OpenCode Go stock VisionModels listed only kimi-k3, so EffectiveVision
  stayed false for mimo-v2.5 and inputImages skipped payloads.
- Existing installs kept the old vision list; no migration added mimo.
- WebView2 compositor layers were not forced to re-rasterize on restore.

Fix
- Add mimo-v2.5 to opencode-go vision catalog; migrate stock kimi-k3-only
  lists on load while preserving explicit empty/custom vision lists.
- On Windows visibility restore, force a one-frame compositor repaint.
- Regression tests for catalog, migration, mid-session image attach, and
  the DPI repaint helper.

Verification
- go test ./internal/config/ ./internal/control/
- tsx desktop/frontend/src/__tests__/dpi-repaint.test.tsx
@SivanCola
SivanCola requested a review from esengine as a code owner August 7, 2026 03:26
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) and removed v2 Go rewrite (1.x) — main-v2 branch, active development labels Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) desktop Wails desktop app (desktop/**)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant