Skip to content

fix(gui): prevent horizontal overflow and content clipping in chat webview panel - #13068

Open
Cookie-CoDeRR wants to merge 7 commits into
continuedev:mainfrom
Cookie-CoDeRR:fix/webview-padding-overflow
Open

fix(gui): prevent horizontal overflow and content clipping in chat webview panel#13068
Cookie-CoDeRR wants to merge 7 commits into
continuedev:mainfrom
Cookie-CoDeRR:fix/webview-padding-overflow

Conversation

@Cookie-CoDeRR

@Cookie-CoDeRR Cookie-CoDeRR commented Jul 30, 2026

Copy link
Copy Markdown

Description

Fixes #12910

Three related layout bugs were causing content to overflow or get clipped
on the right edge of the VS Code sidebar panel:

1. Layout.tsx — Phantom padding from scrollbarGutter: "stable both-edges"
The both-edges keyword reserves gutter space on both sides of the scroll
container, silently eating ~8px on the right and clipping chat content even
without a scrollbar. Changed to "stable".

2. StyledMarkdownPreview/index.tsx — Code blocks sized to wrong viewport
max-width: calc(100vw - 24px) uses the full screen width, not the panel width.
In a VS Code webview sidebar, this causes <pre> blocks to overflow their
container. Changed to max-width: 100%.

3. TipTapEditor — Long unbroken text overflows input box
Typing a long string with no spaces caused the TipTap editor to expand
horizontally beyond the panel. Added word-break: break-word,
overflow-wrap: anywhere, and overflow-x: hidden to the editor and its wrapper.

Checklist

  • I've read the contributing guide
  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Tests

Pure CSS/layout fixes — no logic changes. Manually verified by running
the extension in debug mode (F5) on macOS (darwin-arm64).

- Remove scrollbarGutter both-edges to stop phantom right-side clipping in Layout
- Fix pre block max-width using 100% instead of 100vw in StyledMarkdownPreview
- Add word-break and overflow-x hidden to TipTap editor for long unbroken strings
Copilot AI review requested due to automatic review settings July 30, 2026 08:06
@Cookie-CoDeRR
Cookie-CoDeRR requested a review from a team as a code owner July 30, 2026 08:06
@Cookie-CoDeRR
Cookie-CoDeRR requested review from sestinj and removed request for a team July 30, 2026 08:06
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Cookie-CoDeRR

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The new TipTap overflow/wrapping CSS targets a .tiptap selector that doesn’t match the actual editor element class (ProseMirror), so the intended fix likely won’t apply.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

This PR addresses multiple UI layout issues in the VS Code sidebar chat webview that caused horizontal overflow and right-edge content clipping, primarily around code blocks and the main input editor.

Changes:

  • Adjusted the main layout container’s scrollbarGutter behavior to avoid reserving space on both sides.
  • Updated markdown <pre> styling to size relative to its container instead of the viewport to prevent sidebar overflow.
  • Added new overflow/wrapping constraints intended to prevent the TipTap editor/input from expanding horizontally.
File summaries
File Description
gui/src/components/StyledMarkdownPreview/index.tsx Constrains <pre> to container width to reduce markdown code-block overflow in the sidebar.
gui/src/components/mainInput/TipTapEditor/TipTapEditor.css Adds CSS intended to wrap/break long unspaced input and hide horizontal overflow.
gui/src/components/mainInput/TipTapEditor/components/StyledComponents.ts Hides horizontal overflow on the input wrapper to prevent layout spill.
gui/src/components/Layout.tsx Changes scrollbarGutter to avoid reserving gutter space on both edges.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Low

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread gui/src/components/mainInput/TipTapEditor/TipTapEditor.css
@Cookie-CoDeRR

Copy link
Copy Markdown
Author
Screenshot 2026-07-30 at 12 59 43 PM Screenshot 2026-07-30 at 1 17 49 PM Following images are the example of issue lastest version was dealing with, Screenshot 2026-07-30 at 1 41 25 PM Screenshot 2026-07-30 at 1 41 41 PM And this are the images after fixing that bug

Cookie-CoDeRR and others added 2 commits July 30, 2026 14:08
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@Cookie-CoDeRR
Cookie-CoDeRR requested a review from Copilot July 30, 2026 08:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Cookie-CoDeRR

Copy link
Copy Markdown
Author

even after using community solution provided in one of the PR , jetbrains test is still failing, on testing locally the extention on Intelij IDEA, it was working as intended, so leaving this matter on a physical reviewer rather then co-pilot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sidebar buttons pushed off-screen due to Flexbox overflow

2 participants