Skip to content

feat(console): an app's docs pages draw in the app shell from 768 px up - #37193

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-37150-docs-in-app-shell
Nov 25, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-37150-docs-in-app-shell

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

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 /docs portal 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

维护者速读

What changes

  • ConsoleLayout (app shell): the isAppDocsPath exception now holds on a phone only. From 768 px up an app's docs pages mount UnifiedSidebar (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.
  • UnifiedSidebar takes docsNav: 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').
  • New layout/sidebarDocsNavSlot.tsx: a provider (mounted by ConsoleLayout), the sidebar's target element, and SidebarDocsNav, 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-shell with the two existing page-header slot hooks.
  • Console docs pages: DocShell draws the column into the sidebar when the slot exists (the reader's own column, else AppDocsNav: 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. DocPage stops drawing its in-page column when the sidebar carries it. usePackageDocsNavBooks is 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).
  • Unchanged: every route and URL shape (ADR-0046 section 6), the /docs portal 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 with docsNav and 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 without docsNav.
  • 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 /docs URL 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.

  • The four pinned files (ConsoleLayout.phoneRecordOneBar-28483, ConsoleLayout.noTopBar-36112, UnifiedSidebar.footerSlot-36739, ConsoleBootShell-35981): Test Files 2 passed, Tests 23 passed for the two ConsoleLayout files at fd2011e; the sidebar and boot files Test 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 pins Tests 13 passed | 53 skipped (66) at 2ec4312.
  • Narrowed suite: every app-shell test that names ConsoleLayout, UnifiedSidebar, ConsoleBootShell, consoleRoutePaths, sidebarDocsNavSlot or isAppDocsPath (128 files) and every console test that names a docs page (13 files), at 2ec4312: app-shell Test Files 1 failed | 127 passed (128), the one red was ConsoleLayout.noTopBar-36112's control pinning the old docs-page bar, corrected in fd2011e and green above; console Test 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.
  • Full app-shell and console suites: declared to CI (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 HEAD empty). The tests import these sources directly (relative import; @object-ui/app-shell aliased to src in the console's vite config), so no dist/ is involved.

  1. 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.
  2. DocPage.tsx: const pageNav = sidebarNav ? null : docsNav; -> const pageNav = docsNav; (the reader draws its in-page column in the shell too). Expected red; observed Tests 9 failed | 4 passed | 53 skipped (66): the one-column test and all eight URL-form pins (two columns).

Acceptance notes

Verification

Read first (by risk):

  1. ui/packages/app-shell/src/layout/ConsoleLayout.tsx: the phoneDocsPage hunk (sidebar mount and showHeader), the branch the shell's look hangs on.
  2. ui/apps/console/src/pages/DocShell.tsx: the sidebar portal and the page-header row.
  3. ui/packages/app-shell/src/layout/UnifiedSidebar.tsx: the docsNav body 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 app docs reader

Desktop, an app's docs index:
desktop app docs index

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

Desktop, the /docs portal entry (unchanged by this PR; item 2):
desktop docs portal

Phone control, 390 px (unchanged: app bar, in-page column):
phone control

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


Generated by Claude Code

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>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Final green head for L1 (2026-11-25T03:41Z): fd2011e516147f382f234389b342a118e7fc9f56.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — REWORK · L1 · head fd2011e516147f382f234389b342a118e7fc9f56 · 2026-11-25T03:53Z

The rework is to the PR body only. The code, tests and changeset are ready to accept at this head. Editing the body does not move the head, so the check-runs below stay valid.

Checklist

  • Shape (l1-face CLEAN, 13/13):
    • draft, base main, Part of #37150, and no closing keyword;
    • no releases path; no +0/-0 files; dogfood not owed;
    • the one published package touched (@object-ui/console) has a changeset;
    • mergeable_state: clean.
  • Check-runs at head: 55 runs: 40 success, 15 expected skips, 0 failed, 0 pending.
    • The floors Lint & Repo Gates and TypeScript Type Check both succeeded.
    • Test UI ran in affected mode on @object-ui/app-shell and @object-ui/console: 3217 files in 9 of 16 slots, with 3216 passed and 1 skipped. All five touched test files ran green: phoneRecordOneBar 15, noTopBar 8, footerSlot 5, BootShell 7 and docs-portal 66.
  • K = 12.
  • Item 1 (desktop app shell):
    • Code:
      • ConsoleLayout.tsx:206,290,295,307,359;
      • UnifiedSidebar.tsx:843 (body swap);
      • the new sidebarDocsNavSlot.tsx;
      • DocShell.tsx:60 (portal) and :65 (header row);
      • DocPage.tsx:397;
      • ConsoleBootShell.tsx:94,109.
    • Tests that go red on revert:
      • phoneRecordOneBar-28483:241 (768/1440 × 5 paths: sidebar present, data-docs-nav, 0 headers);
      • noTopBar-36112:109;
      • footerSlot-36739:235;
      • docs-portal:1006/1019/1040;
      • ConsoleBootShell-35981 at 768/1440.
    • The two ablations agree: 1 failed | 14 passed, and 9 red.
  • Item 3 (old links):
    • No route or isAppDocsPath change: AppContent.tsx docs routes and App.tsx /docs are not in the diff, and nothing is redirected or dropped.
    • 8 URL forms are pinned in the shell (docs-portal:1027, :1070). Each asserts the landing path, the article body and a single column. Ablation 2 reddened all 8.
    • /apps/crm/docs/ and the flat permalink are added to the frame pin.
  • Item 4 (phone): every new branch is gated on phone.
    • The slot hooks return null on a phone.
    • No sidebar means a null slot, so the in-page column and the back bar stay.
    • Pinned by:
      • phoneRecordOneBar:254 PHONE CONTROL (390 × 5 paths, one header);
      • noTopBar:109 (the 390 leg);
      • BootShell at 375;
      • docs-portal:1084.
  • /docs… untouched: DocsPortalRoute, HomeLayout and AppHeader are not in the diff.
    • The shared DocShell/DocPage branches are inert there, because the provider and the ShellPageActionsScope are mounted only by ConsoleLayout.
    • usePackageDocsNavBooks is an exact lift of the old memo, reading the same useBookData().docs.
    • The existing /docs pins are unchanged and green.
  • i18n vs @object-ui/i18n@18.6.0: no locale file in the diff, and no key removed or renamed.
  • Published exports and types: no change.
    • @object-ui/app-shell is private: true. Its root exports gain additively: the 4 slot symbols, plus useShellPageActionsSlot and useShellSidebarExpandSlot.
    • @object-ui/console publishes only plugin.ts/plugin.d.ts and the SPA dist, and plugin.ts is untouched.
  • Declarations: Clause-②: no and Metadata-protocol: none hold, in both the PR body and the changeset. Nothing published is widened, and no spec or metadata key changes.
  • Changeset, read sentence by sentence: it is in user terms, and each sentence matches the code.
    • "page header's button group (assistant and help)" matches ShellPageActionsGroup (AssistantTopBarButton + HelpMenu).
    • "The reader no longer draws that column inside the page there" matches DocPage:397.
    • "other docs pages … carry the same column in the sidebar instead of a back link" matches DocShell:60,70.
    • "every docs address resolves … phone … /docs not changed" matches items 3 and 4 and the portal check above.
  • Local narrowing: acceptable.
    • The full app-shell and console suites the dev stopped locally did run at this head in CI Test UI: the affected set holds both packages' whole suites (2443 + 335 files) plus 437 always-on files.
    • The PR body's local readings at 827b3c75a and 2ec431259 are not at the head, so they are not counted. CI at the head covers the same files.
  • Browser evidence: 5 screenshots are linked on claude/issue-37150-screenshots (da446f108), and all resolve.
    • They were taken at 096ac6732. Since then the only implementation-file drift is the changeset line and 3 index.ts lines from the main merge.
    • The desktop reader shot shows no top bar, a head with 「Showcase」, search and bell, a body from 「← Back to Showcase」 to 「All documentation」, and the account foot. The portal still has its bar, and the phone control keeps its bar and the in-page disclosure.
  • Overlap:

Open

Note for later (not graded): suppose the maintainer answers #37197's 「全部文档」 question with B, first in both sidebars.

  • This PR's sidebar would then change at ui/apps/console/src/pages/DocsNav.tsx:119-128: the <div className="border-t pt-3"> with <Link to={allDocsHref} data-testid="docs-nav-all-docs">, at the foot after the book list.
  • It is shared by the reader (DocPage.tsx:384-393) and AppDocsNav (DocsNav.tsx:181).
  • It also renders the phone in-page column, so the move needs a phone guard to keep item 4.
  • It is pinned for presence only, not position (docs-portal.test.tsx:1013).

Landing to-dos at ACCEPT: Part of #37150 does not auto-close the card. #37150 stays open for item 2 (#37197), and pm:dispatched on #37150 stays until #37197 lands (landing rule B).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYpEsWWE9Y5YtSsDgqZ

席位核对 — ACCEPT · L1 · head fd2011e516147f382f234389b342a118e7fc9f56 · 2026-11-25T03:56Z

Delta over the body-only REWORK 7152350994. The head is unchanged.

No must-fix, no should-fix.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Landing (2026-11-25T03:57Z) — head fd2011e516147f382f234389b342a118e7fc9f56, on L1 ACCEPT 7152386684 (over body-only REWORK 7152350994).

Probe Reading
check-governed-merges.mjs --pr 37193 NOT governed: 0 of 15 paths hit the register; 581 changed lines ≤ 3000
Check-runs at this head 0 failed; one PR-body guard re-running after the body-only edit; mergeable_state was clean before the edit
Landing K 12 since the merge base (L1's reading); under 15, so no main merge first

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 pm:dispatched, for item 2, which #37197 carries.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 25, 2026 03:57
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 93bd459 Nov 25, 2026
60 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-37150-docs-in-app-shell branch November 25, 2026 04:20
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…p shell from 768 px up (objectstack-ai#37241)

repo:objectstack#4 · os-justin · session_01QSeKYnagJvGbCtNg2PhvgW

Fixes objectstack-ai#37197
Part of objectstack-ai#37150 — this PR carries its last open item (item 2, the
standalone `/docs` portal's frame, ruled B in objectstack-ai#37150 comment
7151721568); items 1, 3 and 4 landed in objectstack-ai#37193.

Clause-②: no
Metadata-protocol: none

## 维护者速读

-
电脑上打开独立文档门户(文档首页、书、文章)时,顶栏没有了,左侧是和应用页面同样的侧栏:顶部是中性的「文档」入口(点开是你的应用列表和「添加应用」),正文是按应用分组的全部文档目录,「全部文档」排第一行;应用内文档的侧栏也把「全部文档」挪到了「返回应用」下面、目录之上的第一行;手机不变。
- 属于「去掉顶栏和平台首页那一层」专题,是「文档页进应用外壳」那张卡的最后一项:两个文档入口从此是同一种外观,按你批准的设计图做的。
- 出错时电脑上的文档门户会少了目录或入口,打开门户不会改动「上次使用的应用」;改动只在前端,直接撤回这个改动即可恢复原样。
- 无。

## What changes

From 768 px up, `/docs…` now renders in an app-less variant of the app
shell, as designed in stage 1 and approved on objectstack-ai#37197 (comment
7153085446, the maintainer: 「5 处都按建议,批准设计」).

- **New `DocsPortalShell`** (`ui/packages/app-shell/src/console/docs/`,
exported from `@object-ui/app-shell`): on a phone it is `HomeLayout
variant="docs"`, unchanged; from 768 px up it mounts the real `AppShell`
with `showHeader={false}`, `UnifiedSidebar` in a new `docsPortal` mode,
the docs-navigation slot from objectstack-ai#37193, the page header's group and expand
button (`ShellPageActionsScope sidebarExpand appless`), Home's AI drawer
and Home's command palette (`HomeCommandPalette`, now exported from
`HomeLayout`). Like `ConsoleLayout`, it draws a non-shrinking box at the
top of the content holding `ChromeBannerHost` and `ConnectionBanner`, so
the standing banners (impersonation, read rate, storage) and a
lost-connection notice sit beside the fixed sidebar instead of over its
head (seat L1 S2). The connection state comes from the data adapter, as
`AppContent` reads it. It sets the navigation context to `home`, as
Home's frame does, and never sets the current app, remembers a last app
or applies an app's branding.
- **`UnifiedSidebar` `docsPortal`** (+ `docsPortalSearch`): the shell
head and foot as in an app, a neutral 「Documentation」 head
(`SidebarDocsPortalMenu`) instead of the app's name menu, and the
docs-navigation target as the body. The search field is drawn only when
a palette is mounted (Home's palette needs a host app).
- **`SidebarDocsPortalMenu`** (in `SidebarAppMenu.tsx`): the app menu's
list, extracted into `AppMenuList` and shared by both menus, under 「Your
apps」, with no row checked and no app-scoped row (「Design layout」, 「Edit
app」), plus 「Add app」 for the viewers who may build. Choosing an app
opens `/apps/APP`.
- **`ShellPageActionsScope appless`**: the page header's group without
an app: the assistant, and `HelpMenu inApp={false}` with no app package.
Without it the group resolves the app from the navigation context or the
URL's second segment, which on the portal would be the last app or a
book slug.
- **`PortalDocsNav`** (console `DocsNav.tsx`): every book the portal's
index lists, under its app's heading, in the index's order
(`groupBooksByApp`, the index's own grouping). Each book is named by its
index card's label, so an implicit platform book reads as its app does
(「系统设置」), not as its package id's last segment (「Setup」). `DocShell` and
`DocPage` hand it to the sidebar on `/docs…`.
- **「All documentation」 the first docs row in both docs sidebars** (seat
ruling on objectstack-ai#37241: the back link is shell navigation, not a docs row):
whenever the column is in the shell sidebar, `DocsNav` draws it as the
first docs entry, marked current on the portal index. In an app's docs
reader and in `AppDocsNav` it sits directly under 「← Back to APP」 and
above the filter and the books; on the portal, which has no back link,
it is the column's first row. The phone guard is the slot itself: a
phone mounts no docs sidebar, so the column the page draws keeps the
link at its foot, unchanged.
- **DELIBERATE CORRECTION** of objectstack-ai#37193's pending changeset
`.changeset/37150-docs-pages-in-app-shell.md` (seat ruling on objectstack-ai#37241).
One sentence. It was "The `/docs` portal is not changed by this
release." and now reads "The `/docs` portal draws in the same frame from
768 px up too, in a variant that belongs to no app (its own entry
describes it)." `check-empty-changeset` is red on this by design; the
dispatching seat's record confirms it.
- `content/docs/frontend/app-shell.mdx`: the stale line "the app bar …
on an app's docs pages, which mount no sidebar" is corrected. An app's
docs pages draw the shell from 768 px up, and the portal draws the same
frame with a neutral head.
- `App.tsx`: `DocsPortalRoute` mounts `DocsPortalShell` in place of
`DefaultHomeLayout variant="docs"`. No route, redirect or URL changes.

Files to read first, by risk:
1. `ui/packages/app-shell/src/console/docs/DocsPortalShell.tsx`: the
variant switch, and what it does not write.
2. `ui/packages/app-shell/src/layout/UnifiedSidebar.tsx`: the
`docsPortal` hunks (`shellChrome`, the head, the body condition,
`hasCommandPalette`).
3. `ui/apps/console/src/pages/DocsNav.tsx`: `inSidebar` (the first-row
move and its phone guard), and `PortalDocsNav`'s labels.

## Tests

- New `DocsPortalShell-37197.test.tsx`: real `DocsPortalShell`,
`AppShell`, `ShellPageActionsScope`, docs slot and `NavigationProvider`.
- `/docs`, `/docs/crm` and `/docs/crm/crm_intro` at 768 and 1440 px: no
`header` element, the sidebar in `docsPortal` mode with no
`activeAppName`, the page's tree drawn in the sidebar. PHONE CONTROL for
each path at 390 px: Home's docs frame, no sidebar.
- No app guessed: opened cold (1440 and 390), the context is `home`, no
current app, and no last-app key is in storage; that storage check
carries the pin. The `rememberApp` spy is only a tripwire for a future
frame that would remember an app. After an app was open, on a
package-named path, the head names no app, the help menu gets
`inApp=false` and no package, and the current app stays as it was.
- The app-less group, and the collapsed expand button in the docs header
with no corner fallback; phone control.
- Design point 5, the default accent (seat L1 S1): after an app whose
`branding.primaryColor` was open, with `--primary`/`--accent` left on
the root, the portal's root carries neither. Phone control.
- The banners (seat L1 S2): at 1440 px a standing banner mounted above
the routes (as `ConsoleShell` does) is drawn exactly once, inside the
portal's banner box at the top of the content. A disconnected adapter
shows the connection notice in that box; a connected one shows none.
PHONE CONTROL: the banner stays where the shell mounts it, drawn once,
with no box and no notice.
- `docs-portal.test.tsx`, new block `objectstack#37197`: the portal tree
in the shell (first row, `aria-current` on the index, sections in the
index's order, no back link, no in-page column). A book open in the tree
with the article current. The label fix (an app labelled `System
settings`, so not 「Setup」). Every portal URL form in the shell: index,
SLUG, book NAME, NAME/DOC, doc-name-is-also-a-book-name, canonical
SLUG/DOC, implicit package book, slug-that-is-another-book's-name. In an
app's reader and docs index, 「All documentation」 is the first docs row:
the back link stays the column's top row, and 「All documentation」
precedes the filter and the first book. PHONE CONTROL: the in-page
column of the portal and of an app keeps it last.
- `SidebarAppMenu-36112`, new block: the portal head reads
「Documentation」, lists the apps under 「Your apps」 with none checked,
opens any app by its address, gives 「Add app」 to an admin who may author
and no app-scoped row; member control.
- `UnifiedSidebar.footerSlot-36739`, new block: in Home's context with a
remembered app, `docsPortal` draws the portal head (not the app's), the
page's tree as the body and the account foot; no search field without a
palette; control without `docsPortal`.
- **objectstack-ai#37193's N1**, in `ConsoleLayout.noTopBar-36112`: a docs route with
`connectionState: 'disconnected'` shows `ConnectionBanner` in the
banners box at 1440 px. A collapsed docs route draws the expand button
in the docs header (a `DocShell` stand-in that reads the shell's expand
slot) and no corner fallback. Each has a phone control.

Ablations, each via `scripts/ablation-replace.mjs`: anchor 1 to 0 on
disk, restored blob equal to HEAD, `git diff HEAD` empty. The tests
import `src`, so there is no `dist` leg.
1. The variant switch, `DocsPortalShell` `if (phone) {` changed to `if
(phone || true) {`: `Tests 7 failed | 4 passed (11)`. Every desktop pin
went red; the four phone controls stayed green.
2. The first-row switch, `DocsNav` `inSidebar` forced false: `Tests 4
failed | 76 passed (80)`. The two portal-tree tests and the two
app-sidebar tests went red; the PHONE CONTROL stayed green. Re-run after
the reorder, at `2961b4a9`: the same 4 red, PHONE CONTROL green,
restored blob == HEAD.
3. The label fix, `{ ...resolved, label: card.label }` changed to
`resolved`: the label test went red (`1 failed`).
4. The app-less group, `appless` removed from the scope: the
no-guessed-app help test went red (`1 failed | 10 passed`).
5. S1, `AppShell` handed the host app's `branding` (anchor
`navbar={null}` replaced): `Tests 1 failed | 15 passed (16)`, the
default-accent pin red, its phone control green. A first attempt put the
anchor inside its own replacement; the tool refused it ("a drop of 0")
and restored the file, so it measured nothing and was re-run.
6. S2, `ChromeBannerHost` deleted: `1 failed | 15 passed (16)`, the 1440
banner pin red. `ConnectionBanner` deleted: `1 failed | 15 passed (16)`,
the notice pin red. The PHONE CONTROL stayed green in both.

Local runs. Each ran under `os-verify-lock` with `--maxWorkers=2`; every
one reports `VERDICT command-exit 0` unless it says otherwise.

<details><summary>Test readings</summary>

- At `95a165e3`, before the main merge, the five touched or new suites
with `--reporter=verbose` (every new block listed): `Test Files 5 passed
(5) / Tests 140 passed (140)`.
- After merging `origin/main` (`0a1b69c0`), the closure was rebuilt
(`turbo run build --filter='@object-ui/console^...'`, `Tasks: 75
successful, 75 total`). Then a NARROWED suite ran at `1ffad1a4`: 186
files, every app-shell and console test naming `ConsoleLayout`,
`UnifiedSidebar`, `SidebarAppMenu`, `ShellPageActions`, `HomeLayout`,
`DocsPortalShell`, `sidebarDocsNavSlot`, `DocsNav`, `DocShell` or
`DocPage`, plus every console `pages/` test. Result: `Test Files 3
failed | 183 passed (186) / Tests 3 failed | 1680 passed (1683)`. The
three reds were tests that count what this change adds:
- `App.docsPortalLazy` stubbed the old portal frame but not the new one,
so the real shell's bell and agent reads escaped to the network;
- `expressionUser.mountSites.ratchet` counts expression mount sites, and
`DocsPortalShell` is a new one;
- `unsavedEditsLeave.census-13253` counts `UnifiedSidebar`'s
`onAppChange` reads, and the portal head's wrapped read is a new one.
All three were fixed in `7977d28b`, which changes tests only, and
re-run: `Test Files 3 passed (3) / Tests 12 passed (12)`.
- DECLARED NARROWING: the full app-shell and console suites were not run
locally; CI `Test UI` runs them.
- `type-check` for `@object-ui/app-shell` and `@object-ui/console` at
`1ffad1a4`: `VERDICT command-exit 0` (the later commit changes tests
that the same programs compile). Lint on the changed files: 0 errors,
and no new warning after typing the shared list's props.

</details>

<details><summary>Rework 2 readings at fecd4e2 (seat L1 7155677032: S1
accent pin, S2 banner host, S3 + N1 note wording, N2)</summary>

- The closure was rebuilt (`Tasks: 75 successful, 75 total`). Then
`DocsPortalShell-37197`, `ConsoleLayout.noTopBar-36112`,
`App.docsPortalLazy` and `expressionUser.mountSites.ratchet` ran: `Test
Files 4 passed (4) / Tests 31 passed (31)`, `VERDICT command-exit 0`.
- `type-check` for app-shell and console at `e78f292d`: `VERDICT
command-exit 0`. For app-shell again at `fecd4e23`, after the hook was
moved to `useSyncExternalStore`: exit 0.
- Lint on the two changed source files: 0 errors and no warning. The
first spelling of the hook drew `react-hooks/set-state-in-effect`; that
is why it was rewritten.
- S3: the 37197 note now opens "was the one documentation page that
still drew a top bar on a desktop". `/organizations` and Home's
no-product-app state still draw one. N1: search is described "when there
is an app to search". The note also names the standing notices at the
top of the page's content.
- `app-shell.mdx` needed no edit: its portal sentence ("draws the same
frame there", the content area carrying the standing banners) is now
true at this head.
- The derived gate list at `fecd4e23` is unchanged (71). Of the 70 light
ones, 68 exited 0 at once. `check:skill-examples` exited 3
(`client-react` was not built in the fresh worktree); after building it,
exit 0. `check-empty-changeset` exited 1: the DELIBERATE CORRECTION,
confirmed by the seat's contract review. ui `vitest run scripts/`: `Test
Files 172 passed | 2 skipped (174)`. `--ran`: `71 derived, 71 run, 0
NOT-MEASURED (a DERIVED zero)`. overlap-check: clean against `main`,
objectstack-ai#37166, objectstack-ai#37168 and objectstack-ai#37169, and exit 1 against objectstack-ai#35129 only (accepted);
the push was gated on that.

</details>

<details><summary>Rework readings at 2961b4a (seat ruling: order,
changeset, app-shell doc)</summary>

- The closure was rebuilt (`Tasks: 75 successful, 75 total`, 74 cached).
Then `apps/console/src/pages/`, `packages/app-shell/src/console/docs/`,
`UnifiedSidebar.footerSlot-36739`, `SidebarAppMenu-36112` and
`ConsoleLayout.noTopBar-36112` ran: `Test Files 177 passed (177) / Tests
1656 passed (1656)`, `VERDICT command-exit 0`.
- `dispatch-gates --commands` at `2961b4a9` derived 71 commands (the
changeset and the doc add the docs families). Of the 70 light ones, 68
exited 0 at once.
- `check:skill-examples` exited 3: it refused for a missing
`@objectstack/client-react` build. After building that package it ran
with exit 0 (`350 prose examples type-check`).
- `check-empty-changeset` exited 1: the DELIBERATE CORRECTION above, red
by design.
- `pnpm --dir ui exec vitest run scripts/`: `Test Files 172 passed | 2
skipped (174)`.
- `--ran`: `71 derived, 71 run, 0 NOT-MEASURED (a DERIVED zero — all 71
recorded an exit code and none of them is 3)`.

</details>

## Acceptance notes

- **N2 and the stage-2 views** are real renders against the showcase
example on a fresh database: zh-CN browser locale, `deviceScaleFactor`
2, this branch's Console on Vite. They were committed at `672b06dd` and
removed in the next commit, so the PR's file list carries no binaries:
- [1 · /docs at
1440](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/1-portal-landing-1440.png):
the 「文档」 head, 「全部文档」 first and current, books under 「功能展示」 and 「系统设置」,
and the Setup book named 「系统设置」 as its card is. The page's one `header`
element is the index's own title block, not a bar.
- [2 · a doc
open](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/2-portal-doc-open-1440.png):
no `header` element on the page.
- [3 · the head menu
open](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/3-portal-head-menu-open-1440.png):
「你的应用」, the two apps and 「添加应用」; 0 checked rows; the URL is unchanged
(measured).
- [4 ·
collapsed](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/4-portal-sidebar-collapsed-1440.png):
one expand button, in the docs header, and no corner fallback
(measured).
- [5 · 768
px](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/5-portal-landing-768.png).
- Phone 390 px, unchanged: [6 ·
landing](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/6-phone-portal-landing-390-unchanged.png)
and [6b · a
doc](https://raw.githubusercontent.com/objectstack-ai/objectstack/672b06dd86559c2061bc0c8e975cf325dc5de7d4/design/37197/stage2/6b-phone-portal-doc-390-unchanged.png).
- [7 · an app's docs
reader](https://raw.githubusercontent.com/objectstack-ai/objectstack/0b9b82809015d40074d9aa71ea5a3528cd44b20d/design/37197/stage2/7-app-docs-reader-1440.png):
「← 返回功能展示」, then 「全部文档」 as the first docs row. Re-captured at `2961b4a9`
and committed at `0b9b8280`.
- **N2** · [8 · an app's docs page that is not the reader (not found),
the `AppDocsNav`
column](https://raw.githubusercontent.com/objectstack-ai/objectstack/0b9b82809015d40074d9aa71ea5a3528cd44b20d/design/37197/stage2/8-app-docs-not-found-appdocsnav-1440.png),
with the same order. Re-captured too.
- No last-app key was found in the browser's storage after any desktop
view (measured on each).
- Home's command palette keeps its scope: the host app it searches is
read the way Home reads it, as the portal's old frame did, and is never
written back. That is search scope, not a frame app: the sidebar head,
branding and help name no app.
- The portal's desktop sidebar carries the host's footer slot (the
administrator's 「开始使用」 checklist in the screenshots), as every shell
sidebar does.
- Book labels in an **app's** docs column (`usePackageDocsNavBooks`)
still read the book's own label. For an implicit book of an app's own
package that is the humanized package id. The approved scope was the
portal tree, so this is noted, not changed.
- `overlap-check` reports exit 1 against objectstack-ai#35129, the bot-maintained
Version Packages PR (`chore: version packages`). That PR deletes every
pending changeset, so the DELIBERATE CORRECTION above meets it as a
modify/delete conflict on `.changeset/37150-docs-pages-in-app-shell.md`.
Nothing was resolved by hand. `origin/main` and every sister PR (objectstack-ai#37166,
objectstack-ai#37168, objectstack-ai#37169) merge cleanly.

## Verification

Two-minute check: run `pnpm --dir ui exec vitest run
packages/app-shell/src/console/docs/__tests__/DocsPortalShell-37197.test.tsx`.
Expected: 16 passed, among them three per-path desktop pins and five
PHONE CONTROLs. Or open `/docs` at 1440 px: no top bar, a 「文档」 head, and
「全部文档」 first in the sidebar.

<details><summary>Gate readings</summary>

- `dispatch-gates --commands` (objectstack-ai/objectstack, 16 paths
against merge base `93bd45957`; the list is unchanged at the final head)
derived 38 commands. 37 ran at `e4db1f12`, and `pnpm --dir ui exec
vitest run scripts/` ran under the lock at `eea1765f`: `Test Files 172
passed | 2 skipped (174)`. All exited 0 except
`check:test-source-alias`. It asked for the palette's lazy
`@object-ui/plugin-detail` load to be paid at collection in the new
suite; fixed in `1ffad1a4` and green since.
- `--ran` reconciliation: `38 derived, 38 run, 0 NOT-MEASURED (a DERIVED
zero — all 38 recorded an exit code and none of them is 3)`.
- At the final head `7977d28b`, these re-ran and exited 0:
`check:test-source-alias`, `check:cross-package-test-inputs`,
`check:nul-bytes`, `check:type-check-debt`, `check:tier-file-adoption`,
`check-empty-changeset`, `check-changeset-no-major`, and under `ui/`
`check:new-line-citations` (`0 new citation(s)`).
- `overlap-check` before every push: `VERDICT clean exit 0`.
`origin/main` merges cleanly, as do objectstack-ai#37166, objectstack-ai#37168 and objectstack-ai#37169, which
share `app-shell/src/index.ts` or `SidebarAppMenu-36112.test.tsx`.
- Size at `fecd4e23`: 21 files, +1323 / -152. No governed path.

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01QSeKYo1Rb7aYhQiJdWshkL)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
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/l 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.

2 participants