Repository navigation
fix(components): an authored page lays its region row out by its own width, so a narrow record drawer stacks the rail - #34924
Conversation
A record page with an aside rail, drawn in a record drawer dragged to 380 px at a 1280 px viewport, kept the viewport md row: the rail kept 256 px, main was squeezed to 3 px and the rail's cards covered the tab row. Each region template root is now the named container `regions` and the row, the rail widths and the rail no-shrink switch at its @3xl (768 px, the replaced viewport md, measured on the layout). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs
…e template-slots harness check:test-source-alias judges an edited test file: the harness reaches react-page.tsx's dynamic import of @object-ui/react-runtime, so it now imports it at module top, as its sibling page tests do. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs
|
repo:objectstack#3 · os-support-ai · session_01WGufzhshTXCAmv9KJXRZkB L1 review · 2026-11-17T16:55ZL1: ACCEPT What I read at this head
Checklist
Must-fixNone. Should-fixNone. Escalation to the seatE1: a full page at a mid viewport now stacks. The claim says "a fix that changes how full-width pages lay out is reported to the seat before code". The PR's Acceptance notes disclose that a full page whose content area is under 768 px now stacks its rails where it used to squeeze Notes / nits
CI at review timeThere are 58 check-runs on this sha, all completed and 0 failed. Lint UI, Type Check UI, Test UI 1–16 plus the aggregate, Build & E2E UI and Live E2E UI are all green. RoutingL1 ACCEPT. No L2 is owed (Clause-② no), and the PR is not governed. The area lands it once the seat answers E1, with CI green on the landing head. |
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs
|
repo:objectstack#3 · os-support-ai · session_01WGufzgwLiKcfujYUug7sPs Landing · area o3-B · 2026-11-17T17:46Z
State change: ready for review + auto-merge (merge queue). Card #34826 closes on merge via |
🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzgwLiKcfujYUug7sPs
Fixes #34826
Clause-②: no
Metadata-protocol: none
维护者速读
aside/sidebar右侧栏的 page 模板)的分栏改为按页面自身容器宽度切换,不再按浏览器视口宽度切换。page.tsx里三个区域模板的 CSS class;容器宽度 768px 以上(完整页面的常见宽度)排版与以前完全一致,768px 以下(包括默认 720px 的抽屉)右侧栏改排到主栏下面。回滚即 revert 本 PR。ui/packages/components/src/renderers/layout/page.tsx(新常量PAGE_REGION_ROW_CLASS一段与三个模板根);ui/e2e/page-region-row-narrow-drawer-34826.spec.ts;ui/packages/components/src/__tests__/page-template-slots-12476.test.tsx末尾的新 describe。What changes
RegionLayout(thedefaulttemplate and a page that names no template),three-columnandheader-sidebar-mainlaid the body row out with the viewport breakpoint:flex flex-col md:flex-row, railsmd:shrink-0 w-full md:w-64|w-80|w-96. An authored page never measures its container (unlike the synthesized default page, which usesuseRecordPageTier), so in a narrow record drawer at a desktop viewport the row stayed side by side.Each of the three template roots is now a named Tailwind container,
@container/regions. The row isflex flex-col @3xl/regions:flex-row flex-1 gap-6, and each rail is@3xl/regions:shrink-0 w-full @3xl/regions:w-64(orw-80,w-96).@3xlis 48rem, 768 px: the same pixel value as the viewportmdit replaces, now measured on the layout the row sits in. Below that the rails stack undermain. The container is named, so a container nested inside a region never answers the row's query.Not changed: the
dashboardtemplate's grid (md:grid-cols-2), the page root padding, the drawer width, and the synthesized default record page.Tests
page-template-slots-12476.test.tsx, which is the harness that already renders every slotted template. It checks the four rail layouts: the row carries@3xl/regions:flex-rowand no viewport breakpoint, the row's parent carries@container/regions, and each rail carriesw-full,@3xl/regions:WIDTHand@3xl/regions:shrink-0. It also maps authoredlarge/mediumwidths. The harness now imports@object-ui/react-runtimeat module top, whichcheck:test-source-aliasasks of an edited file that reachesreact-page.tsx.ui/e2e/page-region-row-narrow-drawer-34826.spec.ts, in the style of the record-path narrow-drawer spec. It reads the class strings frompage.tsxat run time and compiles real Tailwind for them. Cases: the defect with the old classes at 380 px (main under a quarter of the layout, last tab under the rail); 360, 380 and 720 px drawers at a 1280 px viewport (stacked, no overlap); a 1000 px drawer at a 1920 px viewport and a full page at 1280 px (rail beside main at 256 px); the full page draws exactly the same boxes as the old viewport row; a 375 px phone viewport still stacks.scripts/ablation-replace.mjs: the row class was put back tomd:flex-row. 4 vitest cases went red (all four rail layouts) and 3 geometry cases went red (360/380/720). The tool then restored the file, blob equal to HEAD,git diff HEADempty.Premise: real record drawer, before the change (head fc5913e)
Method: a local
objectstack devon a private port for each example, plus the Console Vite dev server from this branch'sui/source. Viewport 1280x900. The record opened in the console's overlay drawer (?recordId=), then the drawer's own resize handle was dragged with the mouse to 380 px. The showcase project page temporarily got anasiderail (record:reference_rail). A temporary CRM opportunity page mirrored HotCRM'sopportunity_detail_pageshape: a header region,mainwithpage:tabs, and anasidesmall rail. Neither temporary edit is in this PR.Second check: dragging the same drawer wider after open re-laid it out (main 3 px to 391 px at 768 px, the drawer's 60vw cap). It stayed side by side at every width, because the switch read the viewport. A window resize to 900 px kept the row too (main 195 px).
After the change, same rig
Commands and verdicts (head 9af0fd1)
pnpm --dir ui exec vitest run packages/components/(at d1eb572): Test Files 483 passed, 1 skipped (484); Tests 4634 passed, 24 skipped. The one later commit adds a module-top import to one test file; that file re-ran 21/21 at 9af0fd1.pnpm --filter @object-ui/components type-check: exit 0.pnpm --dir ui run type-check:e2e: exit 0.node scripts/pm/dispatch-gates.mjs --commands: 38 families derived and 38 run, all exit 0.check:test-source-aliaswas red on the first head and is green at 9af0fd1.--ran: 38 derived, 38 run, 0 NOT-MEASURED.node scripts/pm/overlap-check.mjs --branch=9af0fd133f --base=origin/main: VERDICT clean exit 0.Test UI,Build and E2E UI,Lint UIand the rest are left to CI.Acceptance notes
@3xl(768 px) keeps the old pixel value.@md(448 px) would leave alargerail beside a main column only 40 px wide at that width. The synthesized default record page switches at 760 px (recordPageTierFor), so in the default 720 px drawer an authored page now stacks its rails, as the default page already does there. A full page whose content area is under 768 px (a viewport between 768 and about 1050 px with the expanded sidebar) now stacks where it used to squeeze.md.dashboardtemplate'smd:grid-cols-2, the page root'sp-3 md:p-4 lg:p-6, and the block-span fold inpage-block-span.ts. Not measured in a narrow drawer, so no card.