Skip to content

fix(app-shell): a full-height console page gives the impersonation banner its height back - #37588

Merged
objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-th9squ
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 3 commits into
mainfrom
claude/project-thread-th9squ

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #37528

What changes

  • ChromeBannerSlot (app-shell/src/layout/chromeBannerHost.tsx): when the console's standing banners (impersonation, read rate, storage) are drawn in place above the routes, a display: contents wrapper measures them (ResizeObserver on each child, MutationObserver for banners that come and go) and publishes the summed height as --os-chrome-banners on the document root; cleared on unmount and while nothing is drawn. Drawn into an app layout's host (desktop, inside an app, objectstack#36112) nothing is published, as that host sits inside the content area.
  • The console's full-height shells take the viewport less that property, through CONSOLE_FULL_HEIGHT (module-local constants, literal Tailwind classes): AppShell in @object-ui/layout (height, and a min-h- that tailwind-merge puts in place of the sidebar wrapper's own min-h-svh), StudioDesignSurface, HomeLayout, AiChatPage, the two organization layouts, the app-unavailable / no-app screens in AppContent, and StudioRoute's access-required screen. The property is unset outside the console and on an ordinary session, so every class there computes to the plain viewport height.
  • The banner keeps its place in flow (objectui#4467) and its sticky; nothing about where it is drawn changes.

Why

While an administrator impersonates a user, the banner sat in flow above a shell that still took 100svh / 100vh, so the document was taller than the window by the banner's height: list footers and bulk action bars fell below the fold and the page grew a second scrollbar.

Measured on main (4116465) in a local console against examples/app-crm (--fresh), impersonating a seeded user, document.documentElement.scrollHeight against innerHeight:

page 1280×768 before 1280×768 after 390×844 before 390×844 after
/home 768 / 768 (redirects into the app) 768 / 768 921 / 844 844 / 844
an app list (crm_lead) 768 / 768 (#36112 host) 768 / 768 921 / 844 844 / 844
/studio 821 / 768 768 / 768 921 / 844 844 / 844

The first push fixed /home only: the sidebar wrapper's own min-h-svh and Studio's access-required screen still overflowed, which the second commit covers.

Verification

  • New layout/__tests__/chromeBannerHost.bannerHeight-37528.test.tsx (5 cases: in place publishes the summed height and clears on unmount; no banner publishes nothing; a resize and a banner going away republish; drawn into the host publishes nothing; every full-height class reads the property with a 0px fallback). With chromeBannerHost.tsx restored from main, 3 of the 5 go red (the two "nothing published" cases are controls).
  • pnpm --dir ui exec vitest run over packages/layout/, packages/app-shell/src/layout/, src/console/__tests__/, src/console/home, src/console/ai, src/console/organizations, src/views/studio-design, the print stylesheet pin, apps/console/src/components and the boot-redirect pins: all green (3,325 + 3,862 tests). ai-surface-unavailable in ConsoleShell is deliberately left on h-screen: bootRedirectCoverage.test.tsx reads that class as the full-viewport cover.
  • type-check for @object-ui/app-shell and @object-ui/layout: clean. eslint on the changed files: 0 errors.
  • The full UI suite runs in this PR's CI.
  • overlap-check: exit 0 (shares StudioDesignSurface.tsx with feat(studio): 概览 package overview page — Info and Pending tabs, ⋯ menu in its header #37546 and AiChatPage.tsx with fix(chatbot): redraw record-citation chips after a reload; keep the cited-section scroll to new clicks #37539, both merge cleanly).

Clause-②: no
Metadata-protocol: none

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; eslint on the changed files passes (the full pnpm lint runs in CI).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset.
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (not touched)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done. (full local suite not run; CI carries it)

Generated by Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri

… their height back

Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri
Co-authored-by: Claude <noreply@anthropic.com>
… app-state screens, give the banners their height back too

Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m 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 26, 2026
…37528)

StudioRoute.tsx lives in the published @object-ui/console package.

Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head ce889b5 · card #37528 · area s2-ux-L · 2026-11-26T15:13Z

L1 checklist

  • Shape and relation: l1-face.mjs --pr 37588 CLEAN on 13 items. At ce889b5 there are 39 success, 13 expected skips, 0 failed and 0 pending, and mergeable_state is clean. 11 files, not governed, under the human-merge threshold.
  • Fixes #37528 is right: the card is the document growing taller than the window by the banner's height while an administrator impersonates a user, and every full-height console shell the card's pages reach now takes the viewport less the banners drawn in place.
  • Scope, read in the diff:
    • ChromeBannerSlot draws in place through a display: contents wrapper that sums its children's heights (ResizeObserver per child, MutationObserver for banners that come and go) and publishes --os-chrome-banners on the document root. It removes the property at zero height and on unmount. Drawn into the app layout's host it publishes nothing, which is right because that host sits inside the content area.
    • CONSOLE_FULL_HEIGHT holds literal Tailwind classes with a 0px fallback, so a page outside the console or a session with no banner computes the plain viewport height. AppShell spells the same classes literally (no import from app-shell into layout), and its min-h- replaces the sidebar wrapper's own min-h-svh through tailwind-merge.
    • The remaining files swap h-screen / h-svh for those classes: Studio's surface and access-required screen, Home, the AI chat page, the two organization layouts, and the three app-state screens in AppContent.
    • The banner's place in flow and its sticky are unchanged.
  • Evidence: the thread measured scrollHeight against innerHeight on main and on the fix, at 1280×768 and 390×844, across /home, an app list and /studio. Every page overflowed by the banner's height before (921/844 on a phone, 821/768 on desktop Studio) and fits after. The new test has 5 cases; with chromeBannerHost.tsx from main, 3 go red and the 2 controls stay green.
  • Sentence-by-sentence read of the changeset (@object-ui/app-shell, @object-ui/layout, @object-ui/console, all patch): it matches the diff, including where the banners are drawn in place and that nothing is published inside an app on a desktop.
  • No contract face is hit (Clause-②: no, Metadata-protocol: none), so no L2 is owed.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 15:14
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
Merged via the queue into main with commit e2837e7 Nov 26, 2026
53 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-th9squ branch November 26, 2026 16:03
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/m 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.

Impersonation banner adds its height to a full-height shell: list footers and bulk action bars fall below the viewport

2 participants