Skip to content

fix(onboarding): keep chapter footer on screen on narrow viewports - #14911

Merged
bolichen97 merged 2 commits into
mainfrom
fix/crewmates-onboarding-bottom-cutoff
Sep 29, 2026
Merged

bolichen97 merged 2 commits into
mainfrom
fix/crewmates-onboarding-bottom-cutoff

Conversation

@buluoray

@buluoray buluoray commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On a phone, every onboarding chapter's Next / Not now buttons are visible without being hidden behind the browser toolbar.

On iOS Safari the Meet CrewMates chapter (and every chapter sharing OnboardingChapterShell) renders its footer buttons below the fold: only the top edge of "Not now" / "Next" peeks out under the Safari toolbar.

Why it matters

A first-run user on a phone sees a chapter with no visible way forward and has to discover that the overlay scrolls. It is the first screen of the crewmates feature.

Not a goal

  • Redesigning the stacked mobile layout (aside height, copy length).
  • Desktop / sm: layout, which is unchanged.

What changed (motivation → approach → change)

  • Symptom: footer below the fold on narrow viewports.
  • Root cause: on narrow viewports the aside stacks above the section and the scrim scrolls. The panel was min-h-screen (100vh — the LARGE viewport on iOS Safari) and the section min-h-[calc(100vh-248px)] assumed a 248px aside; the real aside is taller once its copy wraps, so the footer sits past the visible bottom, and 100vh adds the toolbar's height on top.
  • Change (OnboardingChapterShell.tsx, mobile classes only):
    • footer is sticky bottom-0 bg-card (sm:static), so it stays pinned to the bottom of the scrolling scrim while the body scrolls under it;
    • panel overflow-hidden → overflow-clip — a hidden ancestor becomes the sticky element's scrollport and stops it pinning (website/docs/narrow-viewport.md);
    • 100vh/min-h-screen → svh, per the same doc;
    • footer bottom padding max(1.5rem, env(safe-area-inset-bottom)) to clear the home indicator / floating toolbar.
    • a top border on the pinned footer (narrow only), so a row scrolling under it reads as scrolling, not cut off;
    • the pinned behaviour is one exported PINNED_FOOTER_CLASS beside PANEL_CLASS/SECTION_CLASS, used by the chapter footer AND the Kiro CLI setup gate's footer (KiroPrerequisiteGate.tsx), which composes the same stacked panel and had the same off-screen actions;
    • the desktop height sm:h-[min(760px,calc(100vh-48px))] is rewritten as the equivalent sm:h-[calc(100vh-48px)] sm:max-h-[760px]: once this PR touched that line, the i18n strict lint read the min(…,calc(…)) string as prose.

The shared class constants also feed KasLoginGate and KiroPrerequisiteGate; both get the same svh + overflow-clip, and the gate's footer is pinned too. No visual difference on desktop.

Backwards compatibility

Compatible: CSS classes only; no props, keys or APIs change.

Tests

  • New OnboardingChapterShell.test.tsx: pins the sticky footer + safe-area inset, and that the mobile panel/section classes never use 100vh/min-h-screen/overflow-hidden. Both tests fail against the pre-fix source (mutation-checked).
  • KiroPrerequisiteGate.test.tsx: the gate's footer carries the pinned classes and the safe-area inset.
  • Existing safeArea.guard, MeetCrewmatesFlow, onboarding and gate suites pass (13 files / 168 tests); tsc and eslint clean.

Manual verification

Throwaway --test-mode gateway from this worktree, Chromium mobile emulation at 390×664 CSS px (iPhone width, height minus Safari chrome), Meet CrewMates opened via its reopen event:

  • before: footer box y=642 of 664 → not fully visible;
  • after: footer box y=587, height 77 → fully visible.

Not verified on a physical iPhone; Chromium cannot emulate Safari's large-viewport 100vh or a non-zero safe-area inset.

Screenshots / video

Before After
before: footer buttons cut off at the bottom after: Not now / Next pinned at the bottom

Kiro CLI setup gate, same stacked panel, at 390×664 with the prerequisite read stubbed as "CLI not installed": the footer box is y=591, height 73, fully on screen, pinned over the scrolling setup steps.

Kiro CLI setup gate: footer pinned at the bottom on a phone

Related Issues

N/A — reported from a device screenshot.

Pattern harvest

Rule candidate: lint
Pattern: min-h-screen / 100vh on a mobile full-screen surface (should be svh/dvh), already described in website/docs/narrow-viewport.md but not enforced.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

On a phone the onboarding aside stacks above the step and the scrim
scrolls. The panel was sized with 100vh (the LARGE viewport on iOS
Safari) and the section assumed a 248px aside, so a taller aside pushed
the step's Next / Not now buttons below the fold and under the browser
toolbar.

Pin the footer with position: sticky (the panel clips with overflow-clip,
since overflow-hidden would become its scrollport), size with svh, and
pad the footer bottom by the safe-area inset.
@buluoray
buluoray requested a review from a team September 29, 2026 03:16
@buluoray
buluoray requested a review from a team as a code owner September 29, 2026 03:16
@buluoray
buluoray requested a review from kyleseaman September 29, 2026 03:16
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of c843f09ebac1ea2178aba6c7f503d2f83803be86 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] c843f09

False positive or not applicable? A repository writer can comment:
/ai-review override gpt c843f09ebac1ea2178aba6c7f503d2f83803be86: <one-sentence reason>

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of c843f09ebac1ea2178aba6c7f503d2f83803be86 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm on a physical iPhone that svh + safe-area padding clear Safari's toolbar — Chromium emulation could not, and the author flagged it.

[DESIGN-REVIEWED] c843f09

Description read

[DESCRIPTION-READ] 738aa9dceb343aa08c46bd217ffce4268698c878b058af777f6b683bd7393047

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — ✅ PASS

Premise-level review of c843f09ebac1ea2178aba6c7f503d2f83803be86 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify on a physical iPhone: the description admits Chromium cannot emulate Safari's large-viewport 100vh or a non-zero safe-area inset, the exact conditions being fixed.

Not justified as shipped

  • Item 5 — rides along: declared; the CLI setup gate is not an onboarding chapter, but it shares the shell and had the same off-screen actions.
  • Item 6 — rides along: declared; KasLoginGate inherits svh/overflow-clip through the shared constants it already imports.
  • Item 7 — rides along: declared; the desktop height respelling is CSS-equivalent (h + max-h = min()), motivated by the i18n lint on the touched line.

What this change ships

Inventory (9 items) — 6 justified

Intent: FIX — on a phone, every onboarding chapter's Next / Not now buttons stay visible instead of hiding under the browser toolbar.

  1. Chapter footer stays pinned on screen while the body scrolls under it — justified
  2. Overlay heights size to the small viewport (svh), not 100vh — justified (doc-backed, website/docs/narrow-viewport.md:123)
  3. Panel clips with overflow-clip so the sticky footer can pin — justified
  4. Footer bottom padding clears the home indicator / floating toolbar — justified
  5. Kiro CLI setup gate footer pinned the same way — rides along (declared; same defect, same shell)
  6. KasLoginGate chrome inherits svh + overflow-clip — rides along (declared, via shared constants)
  7. Desktop panel height respelled to an equivalent h/max-h pair — rides along (declared, i18n lint)
  8. New shared PINNED_FOOTER_CLASS export — justified (2 consumers counted: chapter footer, gate footer; grepped PINNED_FOOTER_CLASS)
  9. Top border above the pinned footer on phones only — justified

No prior test pinned min-h-screen/overflow-hidden on this shell (grepped website/src/test); no existing sticky-footer mechanism duplicated (grepped sticky bottom-0: 1 hit, the new constant).

[FIRST-PRINCIPLES-REVIEWED] c843f09

Description read

[DESCRIPTION-READ] caf31ce667c071eb4d02740fb0d890a5ab47a1277b132baa9c875ec4396611a8

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ human override accepted

@buluoray overrode this lane for c843f09ebac1ea2178aba6c7f503d2f83803be86 via /ai-review override (this commit only).

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Sep 29, 2026
The sticky footer sat flush against the scrolling list in the same
bg-card, so a sliced row read as content cut off rather than a list
scrolling under a bar; a top border on narrow viewports marks the edge.

The Kiro CLI setup gate composes the same stacked panel and had the same
off-screen footer. The pinned behaviour is now one PINNED_FOOTER_CLASS
next to PANEL_CLASS / SECTION_CLASS, used by the chapter footer and the
gate's, each adding its own padding and safe-area bottom inset.

The i18n strict lint read the panel class string as prose once this
branch touched its line, tripped by the min(...,calc(...)) arbitrary
value. sm:h-[calc(100vh-48px)] sm:max-h-[760px] is the same height.
@buluoray
buluoray force-pushed the fix/crewmates-onboarding-bottom-cutoff branch from a0b43d6 to c843f09 Compare September 29, 2026 05:05
@buluoray

buluoray commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author
  • KiroPrerequisiteGate keeps the off-screen footer -- fixed in c843f09. The pinned-footer behaviour is now an exported PINNED_FOOTER_CLASS next to PANEL_CLASS/SECTION_CLASS; the gate's footer uses it with a safe-area bottom inset, pinned by a new render test in KiroPrerequisiteGate.test.tsx, and a 390×664 screenshot of the gate is in the description. KasLoginGate, the third consumer, has no footer.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Opus 5 Review — ✅ no blocking findings

Reviewed c843f09ebac1ea2178aba6c7f503d2f83803be86 — this comment is updated in place on each push.

Review details

The pinned footer is lifted by the section's stale 248px floor and parks opaquely over the tail of the scrolling body, so content that was reachable before the change no longer is.

FINDING — website/src/components/OnboardingChapterShell.tsx:106 — min-h-[calc(100svh-248px)] floors the section against the aside's minimum height, but the stacked aside is shrink-0 min-h-[248px] and its real height A is larger whenever the copy wraps (≈300–340px at 390px in fr/de, and at 320px in any locale), so the section extends A−248 px past the panel's overflow-clip edge, sticky bottom-0 lifts the footer by exactly that amount, and the last A−280 px of the overflow-y-auto body (≈20–60px — the tail of the customize form, or the gate's second CopyCommand / sign-in note, which is also unclickable under the opaque bg-card) can no longer be scrolled clear; before the change the footer was in flow, so that band was visible → Fix: delete min-h-[calc(100svh-248px)] from SECTION_CLASS so flex-1 sizes the section from the aside's actual height and nothing overflows the clip box (the panel is already min-h-svh).

[OPUS-REVIEWED] c843f09

Verdict parsed from the review's SHA-scoped output markers for commit c843f09ebac1ea2178aba6c7f503d2f83803be86.

False positive or not applicable? A repository writer can comment:
/ai-review override fable c843f09ebac1ea2178aba6c7f503d2f83803be86: <one-sentence reason>

@buluoray

Copy link
Copy Markdown
Contributor Author
  • Export the pinned-footer classes as a shared FOOTER_CLASS -- fixed in c843f09 as PINNED_FOOTER_CLASS beside PANEL_CLASS/SECTION_CLASS; paddings stay per surface because the chapter and the gate use different spacing.

@buluoray

Copy link
Copy Markdown
Contributor Author

/ai-review override ux c843f09: The earlier UX block on this head was a missing narrow-viewport screenshot of the Kiro CLI setup gate; the description now carries it (390x664, footer fully on screen) and UX re-reviewed this head as PASS.

@github-actions

Copy link
Copy Markdown
Contributor

Human judgment recorded

@buluoray marked the ux AI finding as false positive, not applicable, or explicitly accepted for c843f09ebac1ea2178aba6c7f503d2f83803be86.

The earlier UX block on this head was a missing narrow-viewport screenshot of the Kiro CLI setup gate; the description now carries it (390x664, footer fully on screen) and UX re-reviewed this head as PASS.

This decision applies only to this commit. A new push requires a new judgment.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Sep 29, 2026
@bolichen97
bolichen97 enabled auto-merge (squash) September 29, 2026 06:49
@bolichen97
bolichen97 merged commit b12f2d3 into main Sep 29, 2026
154 of 171 checks passed
@bolichen97
bolichen97 deleted the fix/crewmates-onboarding-bottom-cutoff branch September 29, 2026 06:49
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Sep 29, 2026
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