[AAASM-4883] 🐛 (docs): Fix version-selector overflow at 375px#282
Merged
Chisanan232 merged 2 commits intoJul 19, 2026
Conversation
The AAASM-4319 max-width cap on `.md-version__list` never held: `.md-version`
is a nowrap header flex item, so a long mike title ("pre-release (v0.0.1-rc.4)")
pushed the current label past the viewport, and the dropdown is absolutely
positioned from a ~72px left anchor so a width cap alone still ran off the
right edge (measured right: 423px @ 375px, scrollWidth 400 > 375).
Cap+clip the widget so the current label truncates, and take the dropdown out
of flow with viewport-gutter `position: fixed` so it can't reach either edge
and never adds to page scrollWidth. Scoped to <=76.1875em; desktop untouched.
Closes AAASM-4883
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Playwright captures at 375x812 against the live pre-release docs: before (red- outlined dropdown running off the right edge, scrollWidth 400>375) and after (dropdown contained, scrollWidth 367<=375), plus a 1280px shot showing the media-query-scoped fix leaves desktop unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
Review — Claude CodeCI: ✅ green (all checks SUCCESS + expected SKIPPED; no failures). |
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.
Description
The python-sdk docs pre-release page had real horizontal overflow at a 375px mobile viewport:
scrollWidth 400 > 375. This is a partial regression of AAASM-4319 — the sidebar-nav half of that fix held, but the version-selector half did not.Root cause (measured live via Playwright DOM at 375px, not just source inspection):
.md-versionis a header flex item withwhite-space: nowrap, so the long mike current-version titlepre-release (v0.0.1-rc.4)pushed the current label past the viewport..md-version__list(the dropdown, always in the DOM) is absolutely positioned from a far-left anchor (~72px in), so the AAASM-4319max-width: calc(100vw - 2rem)cap never bound (intrinsic width 335px < 343px cap) and, anchored at left 88px, it ran toright: 423px.Fix (in
docs/stylesheets/aaasm-brand.css, scoped to<=76.1875em, mkdocs-material's drawer breakpoint):.md-versionand truncate.md-version__currentso the current label can't widen the header (and page) past the viewport.position: fixed(left/right: 0.8rem,top: 2.4remjust below the 48px mobile header) so it can never reach either edge and never contributes to page scrollWidth.Desktop is unaffected — the entire change lives inside the mobile media query.
Type of Change
Breaking Changes
Related Issues
Testing
Verified with Playwright against the live deployed page
https://docs.agent-assembly.com/python-sdk/pre-release/(the authoritative environment — it carries the real mike version selector and real long version titles; a localmkdocs servecannot render the mike selector, and the docs toolchain is not installed locally). The exact final stylesheet was injected against the real DOM and measured:scrollWidth 400(overflow +25px);.md-version__listright 423scrollWidth 367(no overflow); dropdown left 32 / right 328,.md-versionright 367.md-versionkeepsmax-width:none/position:absolutedefaults;scrollWidth 1265 <= 1280Before (375px) — dropdown (red outline) runs off the right edge:
After (375px) — dropdown contained within the viewport:
After (1280px) — desktop unchanged:
Screenshots are committed under
validation/AAASM-4883/.Checklist
Closes AAASM-4883