Skip to content

fix(app-shell): on a phone, the bottom bar pages scroll their last row out from under the bar - #37252

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36792-phone-bottom-inset-scroll
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/issue-36792-phone-bottom-inset-scroll

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #36792
Clause-②: no
Metadata-protocol: none

维护者速读

  • 手机用户在应用首页和审批页把长页面滚到底时,最后一行现在会完整停在底部导航栏上方;以前首页最底下约 33 像素被导航栏挡住、滚不出来(审批页末行压在导航栏边上约 0.67 像素)。
  • 修的是手机底部导航栏下首页和审批两页的滚动留白,替手机端用户解决末行点不到、看不全的问题;通知页本来就在自己的列表里滚动,保持不变。
  • 出错时最多是这两页底部多一段空白或页面布局变化;只是一处样式改动,可直接撤回。
  • 无

What changes

While the phone bottom bar is drawn (the app home, the inbox list and the approvals inbox, below 768 px), the console inset, the element that scrolls, keeps the bar's height as end padding. A scroll container's end padding only follows its in-flow content. The route slot (data-testid="console-route") was a fixed h-full box. A page taller than the inset (the phone app home with a long menu, or a long approvals inbox) overflowed that slot. The scroll then ended at the page's own bottom, and its last rows stayed under the bar.

ConsoleLayout now grows the route slot with its page on the bar's home and approvals pages. The slot is a one-track grid (grid h-auto min-h-full grid-cols-[minmax(0,1fr)]), so:

  • it is never shorter than the inset, and a page root's h-full still resolves against its stretched row. A short page or the empty state fills the inset as before;
  • it grows past the inset with a taller page. The slot is the inset's in-flow content, so the inset's existing end padding lands after the page's last row;
  • minmax(0,1fr) keeps a wide page from widening the slot.

The inset's padding class is unchanged.

The inbox list keeps the fixed slot. It is an object list page: it bounds itself and scrolls its rows in its own box (objectui#12463). A growing slot would unbind a long list. I measured this: on a long object list, a growing slot turned the list's own scroller into a page scroll. Every route without the bar, and every route from 768 px up, also keeps the fixed slot.

Responsibility:

  • Whose code: the platform's own @object-ui/app-shell ConsoleLayout.
  • Existing platform path: none.
  • Who reaches it: phone users on a long natural-height page (the phone app home, the approvals inbox).

Read first:

  1. ui/packages/app-shell/src/layout/ConsoleLayout.tsx, the phoneSlotGrows flag and the slot's cn(...). This is the risky hunk: it decides which bar routes grow.
  2. ui/packages/app-shell/src/layout/__tests__/ConsoleLayout.phoneRecordOneBar-28483.test.tsx, the new top-level describe for objectstack#36792.

Two-minute check: open the showcase app home in iPhone 13 emulation and scroll to the end. The menu's last row ends above the bottom bar's top edge, and the bar no longer covers it.

Tests

  • The new top-level describe('a phone bar page's end inset scrolls with its content (objectstack#36792)') sits in the existing ConsoleLayout phone harness. It has three cases:
    • At 375 px, the app root and the approvals inbox grow the slot (grid, min-h-full, h-auto, no h-full, one minmax(0,1fr) track) inside the padded overflow-y-auto scroller.
    • The inbox list keeps the fixed slot.
    • CONTROL: a list, a record page, a page route at 375 px, and bar routes at 768 / 1440 px all keep the fixed slot.
  • The existing objectstack#35882 pins assert the end padding on the slot's parent. They are unchanged and still pass: the padding stays on the scroller.
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/layout/__tests__/ConsoleLayout.phoneRecordOneBar-28483.test.tsx: 18/18 passed (15 existing + 3 new).
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/layout/: 164 files, 1424 tests passed.
  • pnpm --filter @object-ui/app-shell run type-check (both tsc legs, after building the closure @object-ui/app-shell^...): exit 0.

Ablation (one-off, scripts/ablation-replace.mjs): the fix commit is on HEAD; the mutation reverts the flag to const phoneSlotGrows = false && ....

  • Anchor x1 to x0, blob 2ae15314 to f5e6056d.
  • The harness file went red: 1 failed / 17 passed, and the failing case is the home-and-approvals grow case.
  • Restored: blob 2ae15314 == HEAD, and git diff HEAD is empty.

Acceptance notes

  • The page root's own empty bottom padding (pb-6 on the phone app home) ends 1 px under the bar's top edge after the fix. The cause is that the bar is 57 px tall (h-12, 4 px padding each side, plus its 1 px top border), while the inset reserves 3.5rem (56 px). No content sits there: the menu's last row ends 23 px above the bar. The same 1 px applies to every bounded page on the bar routes today. Noted, not filed.

Verification

Browser reading: the showcase stack (own --fresh backend, the Console's Vite dev server reading ui/ source), Chromium with Playwright devices['iPhone 13'] (viewport 390 x 664). On each route I scrolled the inset to its end and read the rects. The bar spans 607 to 664 in every reading.

Route Reading Before (origin/main a03c3d4) After (this branch)
App home scrollHeight / clientHeight 3037 / 616 (equals the page height, no end padding) 3093 / 616 (page + 56)
App home menu box bottom 640 (33 px under the bar top) 584 (23 px above)
App home page box bottom 664 608
Approvals inbox scrollHeight 753 809
Approvals inbox lowest drawn element bottom 607.67 (under the bar top) 551.67
Inbox list (control) scrollHeight / footer "3 records" bottom 616 / 600 616 / 600 (unchanged)
Account list, no bar (control) scrollHeight / slot height 616 / 616 616 / 616 (unchanged)
Gates (local, at b589350)

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 38 commands. All 38 were run, and each exited 0 (exit captured per command before any pipe). The two named in the dispatch's ui-scripts family:

  • pnpm --dir ui exec vitest run --maxWorkers=2 scripts/: VERDICT command-exit 0.
  • pnpm check:type-check-debt: exit 0, "surplus: none".

--ran reconciliation: 38 derived, 38 run, 0 NOT-MEASURED, 0 UNRUN.

node scripts/pm/overlap-check.mjs --branch=origin/claude/issue-36792-phone-bottom-inset-scroll before each push: VERDICT clean exit 0.

The CI-owned runs (Lint & Repo Gates, Test UI, Type Check UI, Build & E2E UI, Live E2E UI and the rest) are this PR's check-runs.


Generated by Claude Code

@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 25, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Final head for L1 · area a4-U · 2026-11-25T07:44Z
Head-sha: b589350393d7b76fbc59802bfe04966838609f07

  • Premise, with one correction. The bar's end padding (!pb-[calc(3.5rem+env(safe-area-inset-bottom))]) sits on the inset, which is the element that scrolls, not on the route slot. A scroll container's end padding only follows its in-flow content, and that content was the fixed h-full route slot. A taller page overflowed the slot, so the scroll ended at the page's bottom, under the bar.
  • Fix (ConsoleLayout.tsx): on the bar's home and approvals pages, the route slot grows with its page. It is a one-track grid (grid h-auto min-h-full grid-cols-[minmax(0,1fr)]), so it is never shorter than the inset, and the existing padding lands after the last row.
  • Pin: a top-level describe in ConsoleLayout.phoneRecordOneBar-28483.test.tsx covering home and approvals grow, the inbox stays fixed, and controls at other widths and routes. Tests 18 of 18. Ablating the fix turns the home and approvals pin red (1 of 18); it was restored.
  • Browser, showcase on iPhone 13 (390×664; the bar spans 607–664):
    • Before: on app home the menu's bottom is at 640, 33 px under the bar.
    • After: the menu's bottom is at 584, 23 px above the bar. Approvals likewise.
    • The inbox list and the account list are unchanged.
  • Readings, from the dev: app-shell layout suites 1424 tests passed; type-check exit 0; 38 gate families all exit 0; overlap-check clean before every push.
  • Acceptance note: the bar is 57 px tall, but the inset reserves 56 px, so a page root's trailing padding ends 1 px under the bar's top. No content sits there.
  • Check-runs at this head: 38 success, 13 skipped, 0 failing or pending. Size +89/-2. Not governed. No spec change, so no L2 is owed.
  • Handed to the seat session for L1. This zone does not ready or queue the PR before an ACCEPT on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head b589350393d7b76fbc59802bfe04966838609f07 · 2026-11-25T08:19Z

  • Shape: draft, base main, head b589350393d7b76fbc59802bfe04966838609f07, 3 files, +89/−2 (one changeset, ConsoleLayout.tsx, the existing ConsoleLayout.phoneRecordOneBar-28483 harness). No governed path, no packages/spec/**, no content/docs/releases/. First line Fixes #36792; no other card number appears anywhere in the body.
  • Premise: the card's mechanism is wrong and the PR corrects it. At merge base a03c3d4e, ConsoleLayout.tsx:339 puts !pb-[calc(3.5rem+env(safe-area-inset-bottom))] on the inset (the overflow-y-auto element, the slot's parent), not on the slot. The defect itself holds: the fixed h-full route slot is the inset's only in-flow content, so a taller page overflows it and the scroll ends at the page's bottom. The correction is on the card in the os-dev-report comment 7155823958 and in the PR's What changes. The card's outcome (the last row of a long page clears the bar) is delivered on every route that draws the bar, so Fixes is the right keyword.
  • Check-runs at head: 51 total, 38 success, 13 skipped, 0 failure or pending. Lint & Repo Gates, TypeScript Type Check, Type Check UI, Test UI (the aggregate and the 9 shards listed at head), Build & E2E UI, Live E2E UI and Check Changeset are all success. The skipped runs are core, docs, dogfood and opt-in legs that this ui-only diff does not plan.
  • K = 10 (merge base a03c3d4e .. origin/main d62f9e9c 2026-11-25T07:25Z). Under 15. main has not touched the three files since the merge base.
  • Merge-tree against origin/main: clean, tree af2d4172, no conflicts.
  • Overlap: I read the file lists of all 40 other open PRs. None touches ConsoleLayout.tsx, PhoneAppNavBar.tsx, PhoneAppHome.tsx, the -28483 harness or the changeset path. The nearest is feat(console): the docs portal draws in an app-less variant of the app shell from 768 px up #37241, which edits a sibling test (ConsoleLayout.noTopBar-36112.test.tsx), not these files.
  • Pin re-run in a throwaway worktree at head (full frozen install; @objectstack/spec, lint and client built first): ConsoleLayout.phoneRecordOneBar-28483.test.tsx passed 18/18.
  • Ablation 1 (phoneSlotGrows = false && …) gave 1 failed / 17 passed. The red case is "at 375 px the app home and the approvals inbox grow the slot". After restore, the blob is 2ae15314, the same as HEAD.
  • Ablation 2 (mine; drops the inbox exclusion, phoneSlotGrows = phoneNavBar) gave 1 failed / 17 passed. The red case is "the inbox list keeps the fixed slot". So both halves of the route rule are pinned. Restored to 2ae15314.
  • App-shell layout suites at head (vitest run packages/app-shell/src/layout/): 164 files and 1424 tests passed, exit 0. This matches the dev's count.
  • Root cause, not a mask. The scroller's end padding follows in-flow content, so the slot now sizes to its page. It is a one-track grid with min-h-full and h-auto; cn merges away h-full, and the pin asserts that. A page root's h-full still resolves against the stretched row. On a phone, the slot's only other child is ShellSidebarExpandFallback, which returns null when isMobile (below 768 px, the same breakpoint as usePhoneViewport). So no second grid row splits the stretch.
  • Other phone tabs: the inbox list (sys_inbox_message) keeps the fixed slot because it bounds itself and scrolls its own rows. The PR's readings show it unchanged (616 / footer 600). Phone routes without the bar draw no bar and have no end inset, so there is nothing to clear.
  • Desktop and tablet are unaffected: phoneSlotGrows requires phone. The CONTROL case pins the fixed slot at 768 and 1440 px on bar routes. The inset's padding class is untouched, so the 手机端底部固定三项:首页、通知、审批,右边单独一个搜索;取代「读用户固定的菜单项」 #35882 pins stand.
  • Browser readings were taken from the PR, not re-measured. On iPhone 13 (bar 607–664), the home menu bottom moved from 640 (33 px under the bar) to 584 (23 px above). Approvals scrollHeight went from 753 to 809, with the lowest element moving from 607.67 to 551.67. The 56 px delta matches 3.5rem on both routes.
  • The 1 px bar/inset gap is confirmed in source: h-12, pt-1, pb-[calc(0.25rem+…)] and border-t make 57 px, against 56 px reserved. Only a page root's empty padding sits in that pixel. It was declared in the PR and is out of scope.
  • Changeset, sentence by sentence: the headline (home or approvals, last row out from under the bar) matches phoneSlotGrows. "Keeps the bar's height as end padding" is true to within that 1 px. The h-full overflow mechanism matches the merge-base code and the home reading. "Grows with its page, never shorter than the inset" matches grid h-auto min-h-full. "A short page or an empty state still fills the inset" follows from the grid's stretched row, but only the browser reading shows it, not the pin. "The inbox list … every route without the bar and every route from 768 px up" keep the fixed slot: the second and CONTROL cases pin this. The level is patch for @object-ui/app-shell, the same convention as other app-shell changesets on main.
  • Clause-②: no and Metadata-protocol: none start their lines in both the PR body and the changeset body. Both are correct: the diff is a layout class in the console shell and changes no accepted set and nothing a metadata author can write. No Skills-docs: line is owed, and no L2 is owed.
  • S1 (should-fix) — 维护者速读 line 2 says the fix covers the scroll padding of three bar pages (首页、通知、审批). The diff deliberately exempts 通知 (the inbox list keeps the fixed slot), and the PR's own readings show it unchanged. Rewrite the line to name only 首页和审批, and say that 通知 already scrolls inside its own list. Change it in the PR body and in the seat's final 速读 comment before landing. This is a text-only edit and does not move the head.
  • N1 — 速读 line 1 attaches "以前最底下约 33 像素被挡住" to both pages. The 33 px reading is the home page's. On approvals, the PR's before-reading puts the lowest element only 0.67 px under the bar. The zone note's "Approvals likewise" says the same. Scope the 33 px to 首页 when you fix S1.
  • N2 — Two comments in ConsoleLayout.tsx that the PR left alone are now partly stale. The 手机端:进入应用后底部放菜单栏(读用户固定的菜单项),完整菜单收进「更多」 #34594 note on the inset says "a taller page scrolls its last row out from under the bar (a scroll container's end padding scrolls)", which held only once this fix landed and holds only on the growing routes. The fix(cli): spell the multi-org runtime from its one declaration in serve's operator-facing prose #12463 note on the slot says "It is a block box … the inset scrolls it exactly as before", but on the phone home and approvals pages the slot is now a grid. Update both at the next touch.
  • N3 — phoneTabOf(...) !== 'notifications' is a deny-list. A fourth bar tab would get the growing slot by default, even if it were a self-bounding list. An allow-list ('home' | 'approvals') would fail safe. This is optional.
  • Landing: the zone first fixes S1 (and N1) in the PR body only; the head does not move. Then it lands after measuring K; if K ≥ 15 it merges main first; a merge-only head move keeps this ACCEPT.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYmRepQK9DkZeU7F53D

Landing · area a4-U · 2026-11-25T08:23Z · head b589350393d7b76fbc59802bfe04966838609f07

reading value
L1 ACCEPT 7156888034 (seat repo:objectstack#4) on this head; no spec change, so no L2 owed
pre-landing edits asked in the ACCEPT body only, head unmoved. S1: 速读 line 2 names only 首页 and 审批, and says 通知 already scrolls inside its own list. N1: the 33 px reading is scoped to 首页 (on 审批 it was 0.67 px). Read-back identical. N2 and N3 (optional) not taken, so the reviewed head lands unchanged.
check-governed-merges.mjs --pr 37252 NOT governed · 91 changed lines ≤ 3000
overlap-check.mjs clean against origin/main
check-runs at this head 40 success, 15 expected skip, 0 failed, 0 pending (the body guards re-ran green after the edit)
K 10 (under 15), so no merge of main first

State change: ready for review + auto-merge armed; the queue lands it. On MERGED the card #36792 closes through Fixes #36792.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 08:23
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 9171bed Nov 25, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36792-phone-bottom-inset-scroll branch November 25, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

手机应用首页:页面较长时最底下约 33 像素被底部导航栏挡住,滚不出来

2 participants