Skip to content

fix(web): stop horizontal overflow on mobile landing sections - #9

Merged
hmziqrs merged 1 commit into
freeoxide:masterfrom
hmziqagent:fix/web-mobile-responsive
Jul 28, 2026
Merged

fix(web): stop horizontal overflow on mobile landing sections#9
hmziqrs merged 1 commit into
freeoxide:masterfrom
hmziqagent:fix/web-mobile-responsive

Conversation

@hmziqagent

Copy link
Copy Markdown
Contributor

Problem

Several components on the homepage caused horizontal overflow on mobile — the whole page was ~622px wide, forcing horizontal scroll at 390/360/320px.

Root cause

Three landing grids use grid lg:grid-cols-[…] without a base grid-cols-1, so the implicit column sized to max-content and wide children (a long tab label, a long code line, the event-log panel) inflated the entire grid past the viewport.

Changes

  • landing/v1/HookTabs.astro — add base grid-cols-1; make the tab <nav> scroll horizontally (min-w-0 max-w-full overflow-x-auto) and stop the buttons compressing (shrink-0 whitespace-nowrap). The nav is a flex item of Basecoat's .tabs, so min-w-0 is required for overflow-x-auto to actually engage. (card was 602px → now 358px)
  • landing/v3/AnnotatedFigure.astro — add base grid-cols-1 so the <pre> scrolls instead of inflating its card. (529px → 390px)
  • landing/v2/CacheDeck.astro — add base grid-cols-1 so the event-log panel fits. (overflowed ~72px @320)
  • landing/architecture-section.astrotruncatesm:truncate so the layer API list wraps on mobile instead of being ellipsized away (still truncates ≥640px).

Verification

Rendered the homepage in a headless browser at 390 / 360 / 320px:

  • document.scrollWidth now equals the viewport at every width (was 622) — hasHScroll: false.
  • Per-component widths back in bounds (HookTabs 602→358, AnnotatedFigure 529→390, CacheDeck internal 376→362).
  • Architecture items now wrap to 2 readable lines instead of clipping.
  • bun run build passes.

Desktop (lg) layouts are unchanged — every fix only affects the mobile base layer or is inert when content already fits.

Note: PR is from a fork (hmziqagent/gpui-query) because the authed account has read-only access to freeoxide/gpui-query.

Three landing grids used `grid lg:grid-cols-[...]` with no base `grid-cols-1`, so the implicit column sized to max-content and wide children (a long tab label, a long code line, the event-log panel) inflated the page to ~622px on mobile, forcing horizontal scroll.

- HookTabs: add base grid-cols-1; make the tab nav scroll (min-w-0 max-w-full overflow-x-auto) and keep buttons from compressing (shrink-0 whitespace-nowrap). The nav is a flex item of Basecoat's .tabs, so min-w-0 is required for overflow-x-auto to engage.
- AnnotatedFigure: add base grid-cols-1 so the <pre> scrolls instead of inflating its card to 529px.
- CacheDeck: add base grid-cols-1 so the event-log panel fits.
- architecture-section: `truncate` -> `sm:truncate` so the layer API list wraps on mobile instead of ellipsizing the content away.

Desktop (lg) layouts are unchanged. Verified at 390/360/320px: document scrollWidth now equals the viewport (no horizontal scroll), and `bun run build` passes.
@hmziqrs
hmziqrs merged commit cb8ae1d into freeoxide:master Jul 28, 2026
1 check passed
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.

2 participants