Repository navigation
fix(app-shell): phone drawer closes on navigation; 44 px top-bar targets below md - #29168
Merged
Merged
Conversation
…ets below md Below 768 px a route change closes the sidebar drawer, so a tapped entry opens its page uncovered. The top bar's controls, the account menu's theme and language buttons and the page header's Refresh are 44 px below md, and the bar's menus get 44 px rows. Below 640 px an app's bar leaves the product mark and the Studio button to the app switcher's menu to fit them. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRQob8nVK5owwvNtfr
…an unused helper The drawer test's probe assigned module variables during render, which react-hooks/globals refuses; it now publishes them after each commit. The phone-targets test no longer declares an unused DOM-order helper. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jRQob8nVK5owwvNtfr
This was referenced Nov 2, 2026
Contributor
Author
|
domain:ui#1 · zhuangjianguo · session_01QsR2jUJ19MstFvFhjgiYTu 席位核对 · ACCEPT · 2026-11-02T09:05ZHead-sha:
|
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Steedos · project thread
Fixes #29075
Clause-②: no
Metadata-protocol: none
维护者速读
@object-ui/app-shell的 7 个布局文件的max-md:/max-sm:类名,加一个按路由关闭手机抽屉的 effect;768 px 以上外观与行为不变(1280 px 实测尺寸与 main 相同)。回滚即 revert 本 PR。ui/packages/app-shell/src/layout/UnifiedSidebar.tsx新增的routeKeyeffect;②ui/packages/app-shell/src/layout/AppHeader.tsx产品图标与 Studio 按钮的max-sm:hidden;③ui/packages/app-shell/src/layout/AppSwitcher.tsx的触发器与菜单行。pnpm dev:crm,浏览器 375 px 打开 Accounts:顶栏是 ☰ · 应用图标 · 标题 · 搜索 · 铃铛 · 头像;点 ☰ 再点 Contacts,抽屉自动关上,直接看到联系人列表。What changes
The Navigation flow of the Console at phone width, audited at 375×812 and 390×844 on
examples/app-crmandexamples/app-showcase(card #29075; parent audit #29040).UnifiedSidebar.tsx). Below 768 px the sidebar is a drawer over the page. A tapped entry opened its page under a drawer that stayed open, so every navigation cost a second tap. The sidebar now closes the drawer when the route (pathname and search) changes. It is keyed on the route, not on one row's handler, so navigation, favorite and recent rows and any other control that changes the route all close it. Wider windows are unchanged: the effect acts only while the sidebar is in its mobile form.md.max-md:size-11on the sidebar trigger (class passed byAppHeader), the product mark, search, the Studio buttons, the AI button and the account avatar (AppHeader.tsx), the inbox bell (InboxPopover.tsx, the trigger's class only), the theme and language buttons (ModeToggle.tsx,LocaleSwitcher.tsx) and the page header's Refresh (PageHeader.tsx). The app pill getsmax-md:min-h-11 max-md:min-w-11(AppSwitcher.tsx).md. The app switcher, account, theme and language menus carrymax-md:[&_[role=menuitem]]:min-h-11on their content, so every row they hold, including rows drawn from metadata (hidden apps in the account menu), is 44 px tall. The dropdown primitive (ui/dropdown-menu.tsx) is not edited./rule) nor the Studio button. Both stay one tap away: the app switcher's menu has "Back to home" and the Studio row (the bar hands it the same target), and the drawer's "All apps" goes home. Home and the other platform surfaces keep the product mark, at 44 px; the empty trigger slot there is not drawn below 640 px. Where a host hides the switcher for a single app, Studio is not offered on a phone bar; Studio is a desktop authoring surface.Run record
Production Console build served at
/_consolebyobjectstack dev --freshfor "before" (main 6b3ba82); the Vite Console on the branch source against the same backends for "after". Chromium withisMobileand touch, DPR 2.touch-44lists every visible interactive element under 44 px on either side in the named scope. The keyboard check focuses the search field and shrinks the viewport by 40 % (AndroidadjustResize); iOSvisualViewportis not simulated.Other checks of the card:
Screenshots before and after each fix are in the project folder
issue-29075/(before/,after/), with the run recordrun-record-before.mdand the scriptaudit.cjs.Tests
UnifiedSidebar.phoneDrawerCloses-29075.test.tsx(4 tests, realSidebarProviderand@object-ui/layout): a tapped drawer entry closes the drawer; a navigation from outside the drawer closes it too; the same route leaves it open; CONTROL, a wide window's sidebar is unchanged by a route change.AppHeader.phoneTargets-29075.test.tsx(8 tests, harness ofAppHeader.sidebarTrigger-12429.test.tsx): the 44 px classes on the bar's controls in an app and on Home; the product mark, its rule and the Studio buttons hidden belowsminside an app only; CONTROL, the trigger, search and avatar are never hidden; the menus' row class and the controls drawn byAppSwitcher,ModeToggle,LocaleSwitcher,InboxPopoverandPageHeader, read from their source.scripts/ablation-replace.mjs, restored to HEAD byte-identical by blob hash): the drawer close made a no-op (if (isMobile && Date.now() < 0) setOpenMobile(false);) reds 2 of 4 in the drawer test, the two navigation cases.Run from
ui/underscripts/pm/os-verify-lock.sh, head 0564756:pnpm exec vitest run --maxWorkers=1on the two new files: exit 0, 2 files, 12 tests.pnpm exec vitest run --maxWorkers=2on the 79 existinglayout/__tests__files forAppHeader,AppSwitcher,UnifiedSidebar,PageHeader,ConsolePageHeader,InboxPopoverandLocaleSwitcher(includingAppHeader.homeMark-12605, which pins the product mark's classes): exit 0, 79 files, 512 tests (run at 7a92e5d; 0564756 changes only the two new test files).pnpm exec eslinton the ten changed files: no errors; the warnings are the files' existinganyand hook warnings, none on a changed line.Acceptance notes
dialog.tsx), seat 4's Record and Overlay cards; the list toolbar, Console at phone width: Lists flow audit and fixes at 375 and 390 px #29074; the notification switches, Console at phone width: Notifications flow audit and fixes at 375 and 390 px #29076; the home page body's small links, a card the seat is filing.LocalizedSidebarTrigger.tsxwas in the amended surface and needed no edit:AppHeaderpasses the class.check-sdui-manifestis green: no component config changed.Verification
node scripts/pm/dispatch-gates.mjs --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN; every recorded exit is 0. The 30 gate commands andpnpm --dir ui exec vitest run scripts/(169 files passed, 2 skipped) ran at 7a92e5d; 0564756 touches only the two new test files.node scripts/check-changeset-no-major.mjs --base origin/main,node scripts/check-adr-0087-registration.mjs --base origin/main,node scripts/check-closing-keyword-parity.mjsandnode scripts/check-partof-closing-keyword.mjs, with this body as the event: exit 0 each.node scripts/check-sdui-manifest.mjs: exit 0.pnpm exec turbo run type-check --filter=@object-ui/app-shell --concurrency=2at 0564756: exit 0, 65 of 65 tasks.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (CI runs the repo lint)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code