fix(docs): clip horizontal hero overflow - #312
Merged
SigureMo merged 1 commit intoSep 11, 2026
Merged
Conversation
# 🐛 Bug Fix - Clip horizontal overflow at the existing VPHero boundary so the 800px ambient glow cannot widen mobile homepages, without hiding page overflow. - Preserve vertical glow and button focus outlines. Validation: docs build; all pre-commit hooks (Python 3.11); Chromium EN/ZH homepages at 320, 360, 375, 390, 414, 960 and 1440px, including touch swipes and keyboard focus. Before/after screenshots captured from local builds.
rai-studio-bot
approved these changes
Sep 11, 2026
rai-studio-bot
left a comment
There was a problem hiding this comment.
已审查完整 diff 及中英文首页的 Hero 结构,未发现需要阻塞合入的问题。改动范围明确,PR 已提供移动端横向滑动、桌面布局及键盘焦点的验证记录,并说明了浏览器覆盖范围。
Pre-commit 已通过,Python CI 仍在运行。本次为静态审查,未独立重跑文档构建或浏览器验证;多节点 GPU 集成测试因环境缺少对应硬件未运行。
Powered by Nyanpasu with gpt-6-astra medium, please check the suggestions carefully.
ShigureNyako
marked this pull request as ready for review
September 11, 2026 14:40
ShigureNyako
requested review from
NINGBENZHE and
Yangruipis
as code owners
September 11, 2026 14:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add one
overflow-x: clipdeclaration to the existing.VPHerorule indocs/.vitepress/theme/custom.css.Why
The absolutely positioned 800×800px
.hero-glow-blobinAsciiHero.vueextends beyond narrow viewports. On both homepages this widens the document and lets a horizontal touch swipe reveal a large blank area to the right.How
Contain horizontal overflow at the hero boundary rather than hiding overflow globally on
htmlorbody. The glow itself is unchanged; vertical overflow remainsvisibleand the hero buttons' keyboard focus outlines fit inside the hero boundary.Testing
pre-commit run --all-files --show-diff-on-failurepasses — Python 3.11.16; no hooks bypassed. The initial system-Python 3.14 run could not install the existingdocformatter==1.3.1; rerunning the unchanged configuration under Python 3.11 passed.Additional validation:
npm run docs:buildpassed for basee4875b6and fixd4df5a4(four OpenAPI specs generated, VitePress 1.6.4 build complete). Generated OpenAPI changes are not included in this PR./Relax/en/and/Relax/zh/, using local production builds.document.documentElement.scrollWidth === document.documentElement.clientWidthanddocument.body.scrollWidth === document.body.clientWidthafter the fix.The results are identical for EN and ZH. In each row, document/body
clientWidthequals the requested viewport width before and after.blur(140px)are preserved.:focus-visibleactive, nonzero outlines present, and outlines remain within the horizontal clipping boundary.html/bodyhorizontal overflow staysvisible; hero vertical overflow staysvisible. No browser page errors in the 28 captured page/viewport cases.Type of Change
Screenshots / Logs
These are real, unedited screenshots from separate local production builds of the base and fix. Each mobile pair uses the same viewport and the same leftward touch gesture, revealing the right edge before and after. The animated/randomized ASCII backdrop naturally differs between captures. All six uploaded images were downloaded without authentication and verified byte-for-byte against the originals (SHA-256).
English mobile screenshots
375×667 viewport, identical leftward touch gesture:
Chinese mobile screenshots
375×667 viewport, identical leftward touch gesture:
Desktop glow and keyboard focus
1440×900 viewport, primary button reached with Tab: