Skip to content

fix(mobile): five Office routes stop scrolling sideways on a phone - #872

Merged
thinkclay merged 1 commit into
mainfrom
fix/858-table-stack
Sep 22, 2026
Merged

thinkclay merged 1 commit into
mainfrom
fix/858-table-stack

Conversation

@thinkclay

Copy link
Copy Markdown
Contributor

Closes #858. Found by the release-1 route sweep (#852). Independent — branches from main.

The issue's premise was wrong

It blamed the web Table's 150px column floor. Measuring said otherwise: stackBelow already defaults to 768, so the Table stacks into cards at 390 and was never the overflow. I wrote that hypothesis from reading the code; walking the DOM for elements wider than the viewport found three unrelated causes, none of them the table.

What it actually was

1. A text block beside a button, with nothing allowed to shrink. <Row justify="space-between"> holding a bare <Stack> of title and description next to a Refresh button. React Native defaults flexShrink to 0, unlike the web, so the text keeps its content width and the row pushes past the screen — 460px on Payment Analytics, 412 on Violation Reports.

flex={1} minWidth={0} on the text side fixes it, the same treatment BlockedUsersSection.tsx:54 already uses. Six screens carried the pattern; all six are fixed, including three that were not yet overflowing but would at a longer title.

2. Six status filters on one line. /office/oauth-apps laid them in a nowrap Row. They wrap now — a filter scrolled out of frame is one the user does not know exists, the same call the Tabs strip made.

3. Three form fields side by side. /office/cms/projects/create put Status, Start date and End date in one Row of flex={1} children, and the same flexShrink: 0 default kept them at content width. They wrap, with a 200px floor each.

Measured

At a 390px viewport, documentElement.scrollWidth:

Route Before After
/office/payments 571 390
/office/violations 524 390
/office/transactions 522 390
/office/cms/projects/create 505 390
/office/oauth-apps 491 390

A 94-capture sweep of every /office and /employers route at 390 reports zero horizontal scroll. nx run scf-core:test 1175/1175, typecheck and pnpm prepush clean.

No change to packages/ui — the Table is fine, and the desktop grid tuned in #799/#804 is untouched.

🤖 Generated with Claude Code

The issue blamed the web Table's 150px column floor. That was wrong, and
measuring said so: `stackBelow` already defaults to 768, so the Table
stacks into cards at 390 and was never the overflow. Walking the DOM for
elements wider than the viewport found three unrelated causes, none of
them the table.

**A text block beside a button, with nothing allowed to shrink.**
`<Row justify="space-between">` holding a bare `<Stack>` of title and
description next to a Refresh button. React Native defaults `flexShrink`
to 0, unlike the web, so the text keeps its content width and the row
pushes past the screen — 460px on Payment Analytics, 412 on Violation
Reports. `flex={1} minWidth={0}` on the text side fixes it, which is the
same treatment `BlockedUsersSection.tsx:54` already uses. Six screens
carried the pattern; all six are fixed, including the three that were
not yet overflowing but would at a longer title.

**Six status filters on one line.** `/office/oauth-apps` laid them in a
`nowrap` Row. They wrap now: a filter scrolled out of frame is one the
user does not know exists — the same call the Tabs strip made.

**Three form fields side by side.** `/office/cms/projects/create` put
Status, Start date and End date in one Row of `flex={1}` children, and
the same `flexShrink: 0` default kept them at content width. They wrap,
with a 200px floor each.

Measured at 390, before → after:

  /office/payments              571 → 390
  /office/violations            524 → 390
  /office/transactions          522 → 390
  /office/cms/projects/create   505 → 390
  /office/oauth-apps            491 → 390

A 94-capture sweep of every `/office` and `/employers` route at 390
reports zero horizontal scroll.

Closes #858

Co-Authored-By: Claude Opus 5 <[email protected]>
@thinkclay

Copy link
Copy Markdown
Contributor Author

CI's Unit tests failure was the known flake (#753), not this change: the failing test is results-view-xp.test.tsx, which this branch does not touch and which passes locally. Re-ran the same commit with no changes — it passes. Evidence added to #753.

@thinkclay
thinkclay merged commit 6207bce into main Sep 22, 2026
13 of 14 checks passed
@thinkclay
thinkclay deleted the fix/858-table-stack branch September 22, 2026 19:43
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.

fix(ui): five Office routes scroll sideways on a phone — the web Table gives every column a 150px floor

1 participant