Chat panel overflows horizontally when VS Code zoom level is increased (Cmd/Ctrl + +)

未关闭 适合新手
#13,483 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 8 天内回复

@tang-ontheway 已经在做这个了。

开始于 2026年11月16日。

  • #13485 来自 @tang-ontheway —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
80/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
css, typescript
领域
frontend

调研方向

溢出是 GUI webview 样式表 gui/assets/index.css 中的布局问题:.thread-message 没有规则,且 flex 祖先默认使用 min-width: auto。找到聊天线程组件及其 flex 容器,然后按 issue 的建议添加 min-width: 0 以及 max-width/overflow 约束,同时保持代码块在其自身容器内可滚动。通过在 VS Code 中打开聊天面板并缩放到 + 和 ++ 来验证;在每个级别,内容都应换行或在内部滚动,而不加宽侧边栏。

由索引模型根据 Issue 内容生成。

描述

Before submitting your bug report
Relevant environment info
- OS:
- Continue version:
- IDE version:
- Model:
- config:
  

  
  OR link to agent in Continue hub:
Description

Summary

When the VS Code window is zoomed in (Cmd/Ctrl + +), the Continue chat webview overflows horizontally and the content breaks out of the panel / sidebar container. At 100% zoom everything renders correctly. This happens at roughly + and ++ zoom levels and gets worse at higher levels.

Environment

  • Continue version: 2.0.0 (continue.continue-2.0.0-darwin-x64)
  • VS Code: latest
  • OS: macOS (also reproducible on Windows/Linux, zoom behavior is the same)
  • Surface: VS Code Webview sidebar/panel chat

Steps to reproduce

  1. Open the Continue chat panel in the VS Code sidebar/panel.
  2. Open any conversation (new or history — the issue is layout-related, not data-related).
  3. Press Cmd + + (macOS) / Ctrl + + (Windows/Linux) to zoom the window in about 2 levels.
  4. Observe the chat content overflowing horizontally outside the panel bounds.

Expected behavior

The chat content should stay within the panel width at any zoom level (wrap long lines, scroll code blocks horizontally inside their container, never widen the surrounding layout).

Actual behavior

At zoom levels ≥ ~+, layout containers get pushed wider than the viewport and content overflows horizontally. Zooming back to 100% restores normal rendering.

Root cause (from inspecting the bundled GUI)

  • The extension does not appear to handle VS Code's zoom / device pixel scaling at all (no zoomLevel handling in out/extension.js or the gui bundle).
  • The layout uses flex containers without min-width: 0. Flex items default to min-width: auto, so long/unbreakable content (long lines, code, base64, terminal output) cannot shrink and widens the whole flex chain — which is especially visible under zoom.
  • The message body container .thread-message has no CSS rules at all in gui/assets/index.css, so its width/overflow behavior is unconstrained.

Suggested fix

Add constraints so flex containers can shrink and long content can wrap, e.g.:

html, body, #root, #root > * {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}
#root [class*="flex"] { min-width: 0; }
#root [class*="overflow"] { min-width: 0; max-width: 100%; }
.thread-message {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.thread-message pre { max-width: 100%; overflow-x: auto; display: block; }

The key part is min-width: 0 on flex items — without it, max-width: 100% alone does not prevent overflow under zoom.

Verification

Applying the CSS above (only min-width: 0 + wrap/overflow constraints, no layout redesign) fully fixes the overflow at all zoom levels, confirming it is a CSS/layout-adaptation issue rather than a data or logic problem.

To reproduce

No response

Log output

主要语言
TypeScript
星标
36.5k
派生
5.6k
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

continuedev/continue 的其他 Issue

查看 continuedev/continue 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。