Skip to content

fix(home): keep the hero mock and its flags inside the viewport below 320px - #176

Merged
nish3451 merged 28 commits into
mainfrom
fix/hero-mock-240px-overflow
Aug 14, 2026
Merged

fix(home): keep the hero mock and its flags inside the viewport below 320px#176
nish3451 merged 28 commits into
mainfrom
fix/hero-mock-240px-overflow

Conversation

@nish3451

@nish3451 nish3451 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Packet

sol-sweep fix packet product-live/tinystudio-io-hero-mock-240px-overflow
(lane deepseek).

Defect

The .browser/.mock appraisal hero card at 240px viewport grows to 252px:
doc scrollWidth 252 vs clientWidth 240; the absolutely-positioned nowrap
.flag annotations sit at left=161..304, past the 240px edge. The
320/360/390 sweep never caught it.

Change

  • public/index.css: min-width:0 on the .spec grid column, the card and
    .specbody; max-width:100% on the card; .flag gets
    white-space:normal + max-width:100%; in the mobile block the flags are
    anchored to the card's right padding edge (right:30px,
    max-width:calc(100% - 60px)) and the two-column spec rows + who-banner
    label wrap instead of pushing the document sideways.
  • scripts/test-narrow-viewport.mjs: real-Chromium regression on /,
    /appraisal, /desk at 240/260/280/320px asserting doc scrollWidth ==
    clientWidth, card right edge inside viewport, and every flag inside the
    card. Wired into npm test as test:narrow (sibling to the existing
    test:narrow-pages).

Proof (re-runnable)

node scripts/test-narrow-viewport.mjs in the worktree:

  • RED with origin/main CSS: fails at every viewport (240px: doc 252 != 240;
    flags to right=304; 320px: flags to right=337 beyond card right 300).
  • GREEN with this branch: 12/12 route×viewport combos pass (card right 220
    at 240px, 240 at 260px, 260 at 280px, 300 at 320px; doc sw == cw).

Full suite green: npm run check, headings, viewport, contract, sitemap,
worker 76/76, ui 16/16, test:narrow-pages all routes pass.

Report:
/home/nish/workspaces/agent-state/sol-sweep/fix-packets/REPORT-product-live-tinystudio-io-hero-mock-240px-overflow.md

Summary by CodeRabbit

  • Bug Fixes

    • Improved narrow-screen layouts to prevent horizontal overflow.
    • Updated specimen cards and annotations to wrap and reposition correctly on small viewports.
  • Tests

    • Added automated checks for homepage layouts at viewport widths from 240px to 320px.
    • Expanded the test command to include narrow-viewport regression testing.

… 320px

The .browser/.mock appraisal hero card overflows below ~252px viewports:
the absolutely-positioned nowrap .flag annotations ("1 NO PRICE, ANYWHERE",
"2 ONE IDEA, TEN HOOKS", "3 NOTHING ANSWERED") stretch the card past the
viewport (doc scrollWidth 252 at a 240px viewport; flags to right=304).
The 320/360/390 sweep never caught it because the flags only overflow
below ~320px.

Give the .spec grid column and the card min-width:0 so the column can
shrink below its content's intrinsic width, cap the card at max-width:100%,
let the flag text wrap (white-space:normal, max-width:100%), and in the
mobile block anchor the flags to the card's right padding edge so they
always fall inside it. Let the two-column spec rows and the who-banner
label wrap at the same sub-340px widths.

Add scripts/test-narrow-viewport.mjs, a real-Chromium regression serving
the homepage (/, /appraisal, /desk — the latter two resolve to the
homepage) over node:http that asserts, at 240/260/280/320px viewports, that
doc scrollWidth equals clientWidth, the hero card's right edge stays inside
the viewport, and every flag stays inside the card. Wired into npm test as
test:narrow alongside the sibling test:narrow-pages.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 7da10395-fc01-43ac-a437-d5aa78fad7a7

📥 Commits

Reviewing files that changed from the base of the PR and between 08a7caa and 166d80d.

📒 Files selected for processing (3)
  • package.json
  • public/index.css
  • scripts/test-narrow-viewport.mjs

📝 Walkthrough

Walkthrough

The change adds responsive rules for narrow specimen layouts and introduces a Playwright regression test. The test serves the public pages locally, checks three routes at four viewport widths, and runs through the aggregate test script.

Changes

Narrow viewport handling

Layer / File(s) Summary
Responsive specimen layout
public/index.css
The layout now constrains grid and page widths, wraps annotation flags and labels, and adjusts rows and flags below 340px.
Narrow viewport regression test
scripts/test-narrow-viewport.mjs, package.json
The new Playwright test validates document, hero-card, and annotation bounds across /, /appraisal, and /desk at 240px, 260px, 280px, and 320px. The aggregate test script runs test:narrow.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 166d8

The change keeps the hero card, annotations, and related mobile content within narrow viewports while adding regression coverage; no actionable merge-blocking risk remains beyond normal checks.


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@greptile-apps greptile-apps Bot 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.

Your trial has ended. Reactivate Greptile to resume code reviews.

@nish3451
nish3451 merged commit 2d8599a into main Aug 14, 2026
3 checks passed
nish3451 added a commit that referenced this pull request Aug 15, 2026
…nt main and live (2026-08-15) (#231)

The 44px tap-target fix (PR #48, extended by #70) still holds on the
current head: npm run check passes with the tap-target guard pinning the
>=44px rules in all five stylesheets, and the full test suite passes (242
tests, 0 failures), including the narrow-viewport Chromium regressions
from #174 and #176. Since the 2026-08-14 receipt (base 7ad776a), three
commits touched the surface: #176 and #174 (index.css/shared.css
layout-only changes that did not move any tap-target rule) and #202/#193
(llms.txt/offer.md text and URLs only). Fresh headless-Chromium
full-element sweeps at 390x844 on a local static copy of public/ and on
the live deployment show every standalone interactive element on all
seven served pages is >=44px in height and width (logo 50, nav links 45,
nav CTA 47, lead CTA 44, footer links 44-45, .back 45, in-content CTAs
46, Agent Desk controls 44-65.2); the only sub-44px elements are inline
text links inside sentences (.xa1/.xi19/.xp1), exempt under the WCAG
2.5.8/2.5.5 Inline exception and intentionally excluded. All seven live
pages serve 200 and match main element-for-element. The finding stays
closed with no code change.

Co-authored-by: nish3451 <nish3451@users.noreply.github.com>
Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
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.

1 participant