Repository navigation
feat(console): an app's docs pages draw in the app shell from 768 px up - #37193
Conversation
The shell sidebar is mounted on an app's docs pages at desktop width and carries the docs' own navigation in the app menu's place; the top bar is gone there as on every other desktop app page. A phone keeps its bar and its in-page column. Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
… control Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
…pp shell Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
…8 px up Claude-Session: https://claude.ai/code/session_01QSeKYnagJvGbCtNg2PhvgW Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Final green head for L1 (2026-11-25T03:41Z):
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — REWORK · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ 席位核对 — ACCEPT · L1 · head
|
|
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW Landing (2026-11-25T03:57Z) — head
State change: ready for review, and auto-merge armed; the merge queue lands it. This PR is "Part of #37150", so #37150 stays open, keeping |
repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW
Part of #37150 — this PR carries Change items 1, 3 and 4 (an app's docs pages,
/apps/APP/docs…, in the app shell from 768 px up; every old docs URL pinned; phone unchanged). Item 2 (the standalone/docsportal in the same appearance) is carried by #37197: the maintainer ruled B, an app-less shell variant (#37150 comment 7151721568), design first.Clause-②: no
Metadata-protocol: none
维护者速读
/docs…in an app-less variant of the app shell on desktop: neutral 「文档」 head with the app switcher, docs tree in the sidebar, no top bar, every URL kept (#37150 item 2) #37197 承接,先出设计图给你看,批准后再做。Docs portal/docs…in an app-less variant of the app shell on desktop: neutral 「文档」 head with the app switcher, docs tree in the sidebar, no top bar, every URL kept (#37150 item 2) #37197 设计图里唯一会牵动本 PR 的问题是「全部文档」放在侧栏哪里(本 PR 目前放在底部)。What changes
ConsoleLayout(app shell): theisAppDocsPathexception now holds on a phone only. From 768 px up an app's docs pages mountUnifiedSidebar(head: app-name menu, collapse, search, bell; foot: account) and draw no top bar, like every other desktop app page. The connection banner shows there too, since no bar carries it any more.UnifiedSidebartakesdocsNav: on an app's docs route its body is an empty target (SidebarDocsNavTarget) in place of the app's menu and recents (the one-navigation rule of the earlier docs work holds: a reader has one navigation, the docs').layout/sidebarDocsNavSlot.tsx: a provider (mounted byConsoleLayout), the sidebar's target element, andSidebarDocsNav, a portal the docs page draws its column through, so the column keeps the page's router and data context. Exported from@object-ui/app-shellwith the two existing page-header slot hooks.DocShelldraws the column into the sidebar when the slot exists (the reader's own column, elseAppDocsNav: every book of the app, 「← Back to APP」 and 「All documentation」) and draws the page header's button group and expand button at the page's top.DocPagestops drawing its in-page column when the sidebar carries it.usePackageDocsNavBooksis the reader's former inline memo, lifted so the non-reader pages share it.ConsoleBootShell: the boot fallback matches (sidebar, no bar on an app's docs page from 768 px up; unchanged on a phone)./docsportal frame (DocsPortalRoute,DefaultHomeLayout variant="docs"), the phone.Tests
ConsoleLayout.phoneRecordOneBar-28483.test.tsx: the route exception's removal: at 768 and 1440 px,/apps/crm/docs,/apps/crm/docs/, a book, a flat permalink and an article mount the sidebar withdocsNavand no top bar; PHONE CONTROL at 390 px keeps no sidebar and the app bar; control: other app routes keep the app menu.UnifiedSidebar.footerSlot-36739.test.tsx: the page's column lands in the sidebar body, the app menu is gone, head and foot stay; control withoutdocsNav.ConsoleBootShell-35981.test.tsx: the boot fallback at 768/1440 vs 375 px.docs-portal.test.tsx(objectstack#37150 block): the reader's one column is in the sidebar; the page header carries the shell's group; old URL forms in the shell: reader, book, flat permalink, docs index, book NAME, book NAME/DOC, doc-name-that-is-also-a-book-name, canonical SLUG/DOC each land on the same canonical URL and article as before; non-reader pages; CONTROL without the shell (phone,/docs): the page draws its own column and back link. The/docsURL forms keep their existing pins in the same file (unchanged frame).Test runs (head fd2011e)
All through
scripts/pm/os-verify-lock.sh,--maxWorkers=2, at fd2011e unless noted.ConsoleLayout.phoneRecordOneBar-28483,ConsoleLayout.noTopBar-36112,UnifiedSidebar.footerSlot-36739,ConsoleBootShell-35981):Test Files 2 passed,Tests 23 passedfor the two ConsoleLayout files at fd2011e; the sidebar and boot filesTest Files 3 passed (3),Tests 27 passed (27)at 827b3c7 (unchanged since).docs-portal.test.tsx:Test Files 1 passed (1),Tests 62 passed (62)at 827b3c7; the objectstack#37150 block with the added URL pinsTests 13 passed | 53 skipped (66)at 2ec4312.ConsoleLayout,UnifiedSidebar,ConsoleBootShell,consoleRoutePaths,sidebarDocsNavSlotorisAppDocsPath(128 files) and every console test that names a docs page (13 files), at 2ec4312: app-shellTest Files 1 failed | 127 passed (128), the one red wasConsoleLayout.noTopBar-36112's control pinning the old docs-page bar, corrected in fd2011e and green above; consoleTest Files 13 passed (13),Tests 122 passed (122).type-check(@object-ui/app-shell,@object-ui/console) after rebuilding the app-shell dependency closure: VERDICT command-exit 0.Test UI); the local full run was stopped after 38 minutes holding the shared lock.Ablations (one-shot, restored byte-identical to HEAD)
Both through
scripts/ablation-replace.mjs(anchor hit 1 -> 0 on disk, restored blob == HEAD,git diff HEADempty). The tests import these sources directly (relative import;@object-ui/app-shellaliased tosrcin the console's vite config), so nodist/is involved.ConsoleLayout.tsx:phoneDocsPage ? undefined : (->docsPage ? undefined : ((the sidebar exception back at every width). Expected red; observed:× at 768 px and 1440 px a docs index, a book, a flat permalink and an article draw the sidebar …,Tests 1 failed | 14 passed (15); the PHONE CONTROL stayed green.DocPage.tsx:const pageNav = sidebarNav ? null : docsNav;->const pageNav = docsNav;(the reader draws its in-page column in the shell too). Expected red; observedTests 9 failed | 4 passed | 53 skipped (66): the one-column test and all eight URL-form pins (two columns).Acceptance notes
/docs…in an app-less variant of the app shell on desktop: neutral 「文档」 head with the app switcher, docs tree in the sidebar, no top bar, every URL kept (#37150 item 2) #37197.ConsoleLayoutis app-scoped by construction and/docsnames no app. The maintainer ruled option B, an app-less shell variant (「B:做一个不属于任何应用的外壳变体(推荐)」, Docs pages join the app shell on desktop: one appearance, no top bar, both entry points and every old docs link kept (#36107 item 11) #37150 comment 7151721568), and asked to see the design first. Docs portal/docs…in an app-less variant of the app shell on desktop: neutral 「文档」 head with the app switcher, docs tree in the sidebar, no top bar, every URL kept (#37150 item 2) #37197 carries it: stage 1 mockups, then the build after approval and after this PR lands.origin/mainmerge; the merge's only overlap with this surface isui/packages/app-shell/src/index.ts, merged clean, and no implementation file changed after.Verification
Read first (by risk):
ui/packages/app-shell/src/layout/ConsoleLayout.tsx: thephoneDocsPagehunk (sidebar mount andshowHeader), the branch the shell's look hangs on.ui/apps/console/src/pages/DocShell.tsx: the sidebar portal and the page-header row.ui/packages/app-shell/src/layout/UnifiedSidebar.tsx: thedocsNavbody swap.Two-minute check: in the showcase app (
pnpm dev), open the Showcase app's documentation from its menu at 1440 px: no top bar, the sidebar head reads 「Showcase」, the sidebar body is the docs column with 「← Back to Showcase」 first and 「All documentation」 last; narrow the window to 390 px and the app bar and the in-page column are back.Desktop, an app's docs reader (no top bar, sidebar body = docs column):

Desktop, an app's docs index:

Desktop, a flat doc permalink (lands on the same reader):

Desktop, the

/docsportal entry (unchanged by this PR; item 2):Phone control, 390 px (unchanged: app bar, in-page column):

Screenshots live on the assets-only branch
claude/issue-37150-screenshots(never merged).Generated by Claude Code