Skip to content

feat(web): cap + center content width on wide viewports - #108

Merged
os-zhuang merged 1 commit into
mainfrom
feat/web-content-maxwidth
Jun 10, 2026
Merged

feat(web): cap + center content width on wide viewports#108
os-zhuang merged 1 commit into
mainfrom
feat/web-content-maxwidth

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

The deferred web max-width item from the UX walkthrough.

On the web the app runs full-width, so lists, cards, forms, and chat bubbles stretched edge-to-edge and were hard to scan on a desktop monitor.

Change

A shared webContentMaxWidth (820px centered reading column) applied to the main scroll surfaces:

  • Object list / detail / form renderers (covers every object screen app-wide)
  • AI assistant — message column + input bar
  • Tab screens — home, apps, search, more, notifications, profile

Safety

Strict no-op on native and narrow web — it's a Platform.OS === "web" style and maxWidth never binds below 820px, so the phone layout is unchanged (verified identical at 375px). The dashboard is intentionally left full-width: its responsive grid sizes widgets from the window width and benefits from the space. The list cap is per-row, keeping FlashList's virtualization intact (its contentContainerStyle is padding-only).

Verification

desktop (~1600px) mobile (375px)
list cards / detail / AI chat sit in a centered ~820px column everything fills the viewport as before — no change

1281 tests pass, typecheck + lint clean.

🤖 Generated with Claude Code

On the web the app runs full-width, so lists, cards, forms, and chat bubbles
stretched edge-to-edge and were hard to scan on a desktop monitor. Add a shared
`webContentMaxWidth` (820px reading column, centered) and apply it to the main
scroll surfaces: the object list/detail/form renderers, the AI assistant
(message column + input bar), and the tab screens (home/apps/search/more/
notifications/profile).

It is a strict no-op on native and on narrow web — `maxWidth` simply never
binds below 820px — so the phone layout is unchanged (verified: identical at
375px). The dashboard is intentionally left full-width; its responsive grid
sizes widgets from the window width and benefits from the space.

Per-row cap on the list keeps FlashList's virtualization intact (its
contentContainerStyle is padding-only).

Verified in the browser at desktop width: list cards, detail, and the AI chat
sit in a centered ~820px column; at mobile width everything fills the viewport
as before. 1281 tests pass, typecheck + lint clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit cc1da31 into main Jun 10, 2026
1 of 4 checks 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.

1 participant