Skip to content

fix(sheets): a swipe begun on a Mermaid diagram or an unloaded image scrolls the file - #3486

Merged
devswha merged 1 commit into
mainfrom
fix/sheet-overscroll-chain
Nov 9, 2026
Merged

devswha merged 1 commit into
mainfrom
fix/sheet-overscroll-chain

Conversation

@devswha

@devswha devswha commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Fixes #3475.

Summary

In a phone sheet, a vertical swipe begun on a Mermaid diagram or on an image that is loading or failed scrolled nothing. .modal-scrim * { overscroll-behavior: contain } (#683) makes every overflow: hidden box inside a sheet a scroll container that ends the scroll chain, and these boxes only clip.

.markdown-mermaid and .image-slot.is-loading / .is-failed (src/components/ChatView.css) now use overflow: clip. A clip box isn't a scroll container, so the swipe goes on to the file. overflow: hidden stays just before it as a fallback for browsers without clip, which then behave as before.

Review

Codex CLI adversarial review, gpt-6.1-terra fast xhigh (route: team proxy):

  • No HIGH.
  • MEDIUM, no clipping on browsers without clip: fixed with the hidden fallback.
  • LOWs, not changed here:
    • other sheet wrappers have the same pattern, for example DirectoryBrowser.css:118, which is like that on main too;
    • the test covers a failed image but not one still loading.

Validation

  • scripts/markdown-outline-browser-qa.ts: the fixture gains a Mermaid fence and a missing image, both swiped in the phone loop. With main's CSS the swipe on the diagram doesn't scroll the document. With only the diagram fixed, the swipe on the failed image doesn't either. With the full fix both pass.
  • Browser regressions in the CI runner image (herdr-ci-runner:local): pass for markdown-outline-browser-qa, phone-glass-header-demo, phone-worktree-sheet, touch-long-press-demo, phone-split-grid-demo and chat-size-regression's layout checks. In chat-size-regression, one unrelated attach scenario timed out once under load, then passed twice when run alone.
  • bun run check fast: green on old-desktop (unit tests 14300 pass, 0 fail, 38 skip).

…rolls the file on phones

Fixes #3475.

Inside a phone sheet every element is `overscroll-behavior: contain`
(#683), so any `overflow: hidden` box, a scroll container that never
scrolls, ends the scroll chain and swallows a vertical swipe. A Mermaid
diagram's `.markdown-mermaid` and an image slot that is loading or failed
(`.image-slot.is-loading`, `.is-failed`) only clip their content: they now
use `overflow: clip`, which clips the same but makes no scroll container,
so the swipe reaches the document. `overflow: hidden` stays before it as
the fallback for a WebView without `clip` (before Safari 16). No addition
to the #3294 allow-list.

The outline regression's Markdown now holds a Mermaid fence and an image
whose bytes are gone, and its phone loop swipes on each. It fails on the
diagram with main's CSS, and on the failed image with only the diagram
fixed.
@coderabbitai

coderabbitai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 34 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b8cace0 and 0d53607.

Files selected for processing: 3

  • changelog.d/sheet-overscroll-chain.md
  • scripts/markdown-outline-browser-qa.ts
  • src/components/ChatView.css
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha
devswha merged commit 4019519 into main Nov 9, 2026
20 of 22 checks passed
@devswha

devswha commented Nov 9, 2026

Copy link
Copy Markdown
Owner Author

Merge note (merge pass) at head 0d53607:

@devswha
devswha deleted the fix/sheet-overscroll-chain branch November 9, 2026 17:23
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.

Phone sheets: a swipe begun on a Mermaid diagram or a failed image scrolls nothing (overscroll contain on every element)

1 participant