Skip to content

feat(console): the All documentation page has the console's top bar, groups its books by app, and searches every article - #36027

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

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

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #35424

repo:objectstack#1 · os-sales · session_01L6bhgTo4iDVWE2AcWkPm77 · Area: b1-CX

维护者速读

  • 用户看到的变化:「全部文档」页(以及它下面的手册和文章页)换成和首页一样的顶栏「ObjectOS / 文档」,带搜索、通知、助手和头像菜单,可以直接回到任何应用;手册按应用分组,组名就是应用启动器里的名字;卡片上不再出现包 id;副标题和「9 篇」这样的计数跟随当前语言;页面右上角新增「搜索全部文档」,按标题、摘要和正文搜所有文章,结果里高亮命中的词,点开直接进到文章所在的手册。
  • 系统包(如「系统设置」)的手册只挂在它的应用下面:成员的应用列表里没有这个应用,这页就不列它。这只是「列不列」,谁能读文档仍由服务端的受众规则决定,和以前一样。
  • 最坏情况:只影响显示。全文搜索第一次输入时多一次 GET /meta/doc?include=content 请求(走和列表相同的受众规则);撤回这个 PR 即恢复原样。
  • 需要 Sales 做的:无。

What changes

The "All documentation" half of #35424 (its items 6–9, design figure 26), plus three notes carried from #36000.

  1. The console's top bar on every portal page. /docs, /docs/<book> and /docs/<book>/<article> now render inside Home's frame (DefaultHomeLayout, under the same organization / permissions layout as /home). The bar reads 「 / Documentation」 (a new docs variant of AppHeader; the crumb links to /docs) and keeps the centred search, inbox, assistant and avatar menu. The portal's own 「Documentation / <title>」 strip is gone (DocShell draws no bar off an app).
  2. Books grouped by app (groupBooksByApp, docs-index.ts). A book goes under the first app whose navigation links to it (a doc entry naming the book or one of its articles, in navigation, nested children or areas, so a module's navigation contributions count), else under the first app of its package; books no app carries are listed last under 「Other documentation」. Groups are named as the launcher names the app (useServedAppLabel). The subtitle and the counts read the session language (「9 篇」), through new help.* keys with per-locale plural forms.
  3. No package id on any card. A package's docs with no authored book are named by their app. A platform package's books (com.objectstack.*) are listed only under an app in the member's list that carries them (one linking them, else their own package's app), never under 「Other documentation」, so a member whose app list (/meta/app, already filtered by the server) has no such app does not see them listed. An implicit book is named by its own package's app, never by another app that links it. This is what the page lists, not who may read a doc: the server's audience gate decides that, as before.
  4. 「Search all documentation」 (searchDocs, useDocContents). A search field on the page matches every listed article's title, summary and body (every word must match; title ranks above summary above body), and lists the matches with the words marked in context; each opens the article in its own book. Mermaid source and markup are not searched. The bodies are asked once, the first time the reader types (GET /meta/doc?include=content, which the server answers through the same audience gate as the slim list), and held for the page's life: one read of every listed doc's body per visit that searches, and none for a visit that does not. A server-side search shared with the MCP doc door is the follow-up if doc volume grows. Every match is listed and counted (no cap). The query stays in the URL (?q=). The label differs from the reader column's 「Search docs」.

Notes from #36000:

  • N3: a hand-typed /docs/<book A>/<article of book B> now redirects to the article in its own book; with no book that holds it, the reader draws no previous / next pager instead of both ends at once (bookHoldsArticle).
  • The portal reader passes backLink={!docsNav} to DocShell, so inside an app an article whose book is in no package keeps its 「← Back to 」 link.

@objectstack/client: meta.getItems(type, { include }) (both the unscoped and the environment-scoped client) sends ?include=; leaving it out sends nothing, as before. The options type is exported as MetaItemsListOptions. @object-ui/app-shell: AppHeader takes a docs variant; DefaultHomeLayout takes variant.

Why

The maintainer's topic #34571, card #35424, figure 26: the "All docs" page had no way back to the apps (its own one-line bar), listed books flat with package ids (com.objectstack.setup), an English subtitle and counts under a Chinese session, the Setup book for every member, and no way to search across books.

Verification

  • Browser, against the showcase app (objectstack dev --fresh, console on vite), zh-CN, dark, 1280 × 800 and 375 × 812, /docs, /docs?q=Markdown, /docs/manual:
    • before: one bar 「文档」 with no search or menus; two flat cards, the second 「Setup」 with com.objectstack.setup under it; 「Books and guides from your installed packages.」 and 「8 articles」 in English; no search.
    • after: the bar 「ObjectOS 预览版 / 文档」 with search, inbox, help and avatar; groups 「功能展示」 (示例手册, 8 篇) and 「系统设置」 (系统设置, 1 篇); subtitle 「已安装应用自带的使用手册。」; 「Markdown」 finds 3 articles, each with its book and the word marked in the snippet; the reader under the same bar. At 375 px the bar folds to its phone form and the search sits under the title.
    • Screenshots (before / after, both widths) are kept with the card's evidence for the reviewer.
  • Tests:
    • docs-index.test.ts (new): grouping by link, by package, the ungrouped group, a doc link counting as linking its book, platform books only under an app in the list that carries them (and named by their own app), no package id line; search word logic and ranking, listed-books filter, a hit naming its book as the card does, every match answered, no diagram source or markup, snippet marking, CJK without spaces.
    • docs-portal.test.tsx: the real DocsIndex under the docs routes — groups and labels, the platform rule, search (URL, one content read for several queries, the article opened in its own book), search limited to listed books, the label differing from 「Search docs」, the N3 redirect with its control; the earlier collision pin now expects the redirect.
    • AppHeader.centeredSearch-12472, AppHeader.aboutBuild-12970, AppHeader.searchTriggerNeedsPalette-11912: the docs variant (centred search, the crumb to /docs, the about item, the palette gate); the home bar's control has no crumb.
    • client.test.ts: include sent as ?include= on both getItems, nothing when left out.
    • App.docsPortalLazy.test.tsx: the portal stays lazy inside its new frame.
  • vitest: apps/console docs files (64 tests), packages/i18n in full (parity, base keys, CLDR plural categories per pack), the app-shell layout and home tests, packages/client (223 tests): all passed. tsc for console, app-shell (with tsconfig.test.json) and client; check:i18n-keys; eslint over the changed files: 0 errors, no new warnings. zh-Hant regenerated with gen:zh-hant.
  • overlap-check.mjs: clean against origin/main and the five open PRs sharing the locale files or AppHeader.tsx (feat(app-shell): connect your Slack account on the notification settings page, and an admin Slack page in Setup (Part of #34730) #35968, feat(list,detail): a change that makes other fields required asks for them in place #35994, feat(fields): select, multi-select, tags, date, time and colour open ready to pick in a grid cell (#35688 S2) #36018, feat(list): a phone list gets its own top row, one row of pills, and bottom-sheet sort, filter and view panels that apply on ✓ #36024, feat(console): a change on a list is a draft, with Discard and Save (#35955 PR 1) #36026).

Clause-②: yes (widening) — @objectstack/client meta.getItems takes an optional include ('content' | 'grants', sent as ?include=) and exports its options type MetaItemsListOptions; @object-ui/i18n adds nine help.* keys (two of them plural, with their per-locale forms); nothing removed
Metadata-protocol: none

Follow-ups (not in this PR): #36029 — give Setup's own books an audience, so a member without setup.access cannot read them, not only does not see them listed (card #35424 item 8 reads "only admins see it"; this PR makes it a listing rule).

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (No spec change.)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes.
  • 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: n/a.
  • 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.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgTo4iDVWE2AcWkPm77

…groups its books by app, and searches every article

- /docs, a book and an article render in Home's frame; the bar reads
  "<product> / Documentation" and keeps search, inbox, assistant, avatar.
- Books are grouped under the app that carries them, named as the
  launcher names them; no card shows a package id; a platform package's
  books are listed only under its app.
- Subtitle and counts read the session language.
- "Search all documentation" searches title, summary and body over one
  lazy GET /meta/doc?include=content; the query stays in ?q=.
- An article opened under a book that does not hold it redirects to its
  own book; with no such book it draws no pager.
- @objectstack/client meta.getItems takes an optional include.

Claude-Session: https://claude.ai/code/session_01L6bhgTo4iDVWE2AcWkPm77
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/xl documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 21, 2026
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/client, touching 11 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/client/README.md), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

23 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 9a98a4675683a405aa911cd6c3e31f88bfe24151.

⛔ 10 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/client/README.md) — pages documenting those are invisible to this run
  • 1 anchor(s) matched too much of the corpus to be a work list: /meta/:type (route, 44 pages)
  • 2 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 21 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 9a98a4675683a405aa911cd6c3e31f88bfe24151 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from a27e0235d5f7d674c8260b348c770762a9f969a0 — the merge of head 122847dc96a1e24adbc7f10012dbfdf8081c29a0 into base 9a98a4675683a405aa911cd6c3e31f88bfe24151, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a27e0235d5f7d674c8260b348c770762a9f969a0 && git checkout a27e0235d5f7d674c8260b348c770762a9f969a0
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 9a98a4675683a405aa911cd6c3e31f88bfe24151 122847dc96a1e24adbc7f10012dbfdf8081c29a0 && git checkout -B drift-repro 9a98a4675683a405aa911cd6c3e31f88bfe24151 && git merge --no-ff 122847dc96a1e24adbc7f10012dbfdf8081c29a0

node scripts/docs-audit/affected-docs.mjs --json 9a98a4675683a405aa911cd6c3e31f88bfe24151

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 9a98a4675683a405aa911cd6c3e31f88bfe24151 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Posted 2026-11-21T08:26Z. The brief handed to the isolated declaration-face reviewer for PR #36027 (owed by the changeset's Clause-②: yes (widening) line). The record follows as its own comment.

Contract review brief — PR #36027 @ 3f16d0bcd2f9bb41afdbbdeeb6dc8b751cb3e904 (card #35424)

You review at TIER_DEFAULT. Render ONE ## Contract review record on this head — its shape is
node scripts/pm/record-recognisers.mjs --template --face declaration — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
· card #35424: its body and EVERY comment (rulings and earlier records included)
· PR #36027: its body, its file list, and the net diff against main at 3f16d0bcd2f9bb41afdbbdeeb6dc8b751cb3e904
· the check-runs on 3f16d0bcd2f9bb41afdbbdeeb6dc8b751cb3e904: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
on the head already answered every derived gate family, and a local run costs more than it returns.
If ONE probe is unavoidable, the record's Local-runs: line says probe — REASON; otherwise none.
Scratch space is /tmp/claude-0/-home-user/3d3cbaf6-4903-5fed-92d4-c2b94a45e868/scratchpad/pr-36027/ alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
② Semver level — the changeset (or skip-changeset) matches what the diff publishes, and the Clause-②: line.
③ Boundary flags — every dev flag and every open_questions entry answered, or escalated.
On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
Sign Implemented-by: with the dev's branch and Reviewed-by: with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — ACCEPT (L1-b)

Head-sha: 3f16d0b · read 2026-11-21T08:28Z · full read of 141a826..3f16d0b (32 files, +1230/−154) against card #35424 items 6–9 and its acceptance list, the PR-b brief's three carried notes, and the before/after screenshots at 1280 and 375.

维护者速读

  • 「全部文档」页现在有和其他页面一样的顶栏,写着「产品名 / 文档」,可以从这里回到任何应用。手册按应用分组,组名用启动器里的应用名;卡片上不再显示包 ID;副标题和篇数都按当前语言显示(「8 篇」)。
  • 新增「搜索全部文档」:会搜标题、摘要和正文,结果里标出命中的词,点开后在文章自己的手册里阅读。只有第一次搜索时才去取全部正文,取的时候和列表走同一道权限关。
  • 系统包的手册(比如「系统设置」)只列在对应应用下面。列表里没有这个应用的人(非管理员)就看不到这本。这是「列不列出来」的规则,谁能读仍由服务端决定。
  • 建议补一处,不挡合并:没有单独写手册的包,搜索结果里的手册名还是旧的包名转写,中文界面下系统设置的文章会显示英文「Setup」,和卡片上的「系统设置」对不上。
  • CI 全绿,可合并状态为 clean。

Must-fix

None.

Should-fix

  • S1 — a search hit names an implicit book by its package, not by its app. searchDocs builds bookLabel: book.label ?? book.name (docs-index.ts). For an implicit book (book.implicit, a package with docs and no authored book) that label is humanizePackageId(pkg) (book-nav.ts:432). Meanwhile groupBooksByApp renames the same book's card to the owning app's label (book.implicit ? { ...rest, label: owner.label }). Example: Setup's docs. The card reads 「系统设置」, but a zh-CN search that hits a Setup article prints the book line as 「Setup」. That is an English word on the page, and it disagrees with the card one screen up. The card's acceptance asks for "zh-CN 下页面无英文句子、无包 ID". Fix: take the hit's book label from the listed cards, for example a Map(book name → card label) built from groups and passed to searchDocs (or have searchDocs take groups), with a unit case for an implicit book. (The reader page names the implicit book the same humanized way; that belongs to PR-a's surface and is not owed here.)

Nits

  • N1 — markTerms/snippetAround take offsets from toLocaleLowerCase() text and slice the original. For the few characters whose lowercase changes length (e.g. İ), the marks shift by one. This is harmless for zh/en content; noted only.
  • N2 — The portal reader's column keeps sticky top-12 (DocPage.tsx:410). That is right while the window scrolls under Home's sticky 48px bar. With the chat dock's rail open, HomeLayout bounds itself to h-svh and main scrolls in its own box, so the column would stop 48px below the box's top. That is an edge case, and Home's own pages share the frame.
  • N3 — On /docs the bar's search reads 「搜索应用、记录、页面…」 and the page's reads 「搜索全部文档」. They are distinct as the brief asked, and both appear in the screenshot. Two search fields on one page is a product call for later, not this PR.

Checked

  • Item 6 (top bar). /docs moves under the same pathless layout as /home (RequireOrganization + ConsolePermissionsScope, one /auth/me/permissions answer) as DocsPortalRoute. That is DefaultHomeLayout variant="docs" around the lazy DocsLayout, so the bar is up while the chunk loads. AppHeader's docs variant is the home bar plus a / 文档 crumb linking to /docs (app-bar-docs-crumb). DocShell's own portal strip and every breadcrumb prop are removed, with all six call sites updated. The old route already sat behind ProtectedRoute, which requires an organization by default, so the access requirement does not change. The 1280 screenshots show 「ObjectOS 预览版 / 文档」, the search, the bell, help and the avatar.
  • Item 7 (grouped by app). groupBooksByApp puts a book under the first app whose navigation, including areas[].navigation at any depth, has a doc entry naming the book or one of its articles. Otherwise it goes under the first app of the book's package, and otherwise into 「其他文档」 last. Group names come from useServedAppLabel (the launcher's label) over filterActiveApps. The subtitle and counts are help.* keys in all 11 packs, with plural forms (_one/_other, es/fr/pt-BR _many, ar six forms); zh-Hant is regenerated (CI's generated check is green). The screenshot shows 「功能展示 / 示例手册 8 篇」 and 「系统设置 / 系统设置 1 篇」.
  • Item 8 (system packages). The subtitle (package id line) is dropped from every card, and an implicit book takes its app's label. A com.objectstack.* book with no owning app in the caller's list is not listed, and its articles are kept out of search (listedBooks). The reading recorded in the changeset is "listed only where the caller's app list has its app" (Setup is served to administrators only), with the server's audience gate unchanged as the read gate. That is a fair reading of 「只给管理员看」.
  • Item 9 (search). useDocContents asks GET /meta/doc?include=content once, when the first query is typed. It is sticky afterwards, re-asked only on a new adapter or a remount. The server already honours include=content (meta-item-read-gate.ts:4641) after its audience gate and locale collapse. searchDocs requires every word, ranks title over summary over body, strips mermaid, markup and link targets from bodies (plainText), and links each hit at /docs/<its own book>/<doc>. ?q= is kept in the URL with replace. Results are rendered as React text with <mark> runs, never as HTML.
  • Carried notes. (1) A reader URL whose book does not hold the doc redirects to the doc's own book once the doc is ready, guarded by bookHoldsArticle on the target. With no holding book, ArticlePager is not drawn (resolvedBook && inBook). Portal tests cover the redirect and its control. (2) The page search is labelled 「搜索全部文档」 (help.searchAllDocs), distinct from the column's 「搜索文档」, with a test. (3) DocShell backLink={!docsNav} is applied. homeBook(name, …, appName) passes the route's package-id segment, as the file's other reads do (:64, :111).
  • Clause-② widening. @objectstack/client: meta.getItems options become the exported MetaItemsListOptions with an optional include, on both the unscoped and environment surfaces. Leaving it out sends nothing; a test pins the four URLs. The README line is added. The 13 new @object-ui/i18n keys are additive. @object-ui/app-shell is private: AppHeaderVariant gains 'docs' and HomeLayout gains variant, and its three Record-keyed tests are updated. The changeset names all four packages, and its text matches the code sentence by sentence.
  • l1-face at 3f16d0b: CLEAN. 58 success, 10 expected skip, 0 failed, 0 pending; floor checks green; mergeable_state clean. Fixes #35424 is right: PR-a feat(console): an app's docs page has one navigation — the docs column — with the path to its book and the previous and next article #36000 (merged) delivered items 1–5, and this PR delivers 6–9 and both acceptance lines.

Owed

  • S1, which I will read as a delta on a later head. The L1 is final on that head once green, or on this one if the seat declines S1.
  • The L2 for the declaration face (client export, i18n keys) is the seat's. This L1 does not replace it.

An implicit book's hit read its package's humanized id ("Setup") while
its card reads the app's label; take the label from the listed cards.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — delta ACCEPT (L1-b)

Head-sha: c81b902 · read 2026-11-21T08:32Z · delta 3f16d0b..c81b902 only (one commit, 3 files), on top of ACCEPT 7059942047.

维护者速读

  • 上一轮提的那处已改好:搜索结果里的手册名现在和卡片上一致。中文界面下,系统设置的文章显示「系统设置」,不再显示英文「Setup」。
  • 新加的测试覆盖了这个情况,并有对照。
  • 没有别的改动。

Must-fix / Should-fix

None. S1 from 7059942047 is closed.

Checked

  • S1 closed. searchDocs now takes listedBooks: ReadonlyMap<book name, card label>. The listing gate still reads listedBooks.has(book.name), so the search still offers no article the page does not list. bookLabel is listedBooks.get(book.name) ?? book.label ?? book.name. DocsIndex builds the map from groups, the same cards the page draws, so an implicit book's hit carries its app's label. The new unit case runs groupBooksByApp and then searchDocs, and expects the Setup hit's book line to read 'System Settings'. Its control asserts the book's own label differs. The existing cases move from Set to Map with no change in what they assert.
  • Scope. Only docs-index.ts, DocsIndex.tsx and docs-index.test.ts changed. No public surface, changeset or i18n changes.

Owed

  • CI green at c81b902. The L1 is final on that green head.
  • The declaration L2 is the seat's. This L1 does not replace it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 3f16d0bcd2f9bb41afdbbdeeb6dc8b751cb3e904
Local-runs: none

Face: declaration (owed by the Clause-②: yes (widening) line alone; the tree carries no published schema and no governed path). Inputs read: card #35424 (body and all four comments: the triage, the PR-a claim, its amendment, the PR-b claim), PR #36027 (body, 32-file list, net diff against main at merge-base 141a826), and the 68 check-runs on the head: every one success or skipped, none failing or pending. Code outside the diff (the REST list chain, the Setup app, the MCP doc door) was read to judge the diff, not reviewed.

① Derived judgments

  • @objectstack/client meta.getItems(type, { include }): right. Both the unscoped surface (ObjectStackClient.meta.getItems) and the environment-scoped one (ScopedEnvironmentClient.meta.getItems) now send ?include= when the option is set, and nothing when it is left out (the client.test.ts case pins all four URLs, including the no-option control). The server already accepts both values on the same list door, with no server change in this diff:
    • include is in the list's closed query set (META_LIST_QUERY_PARAMS) and in its single-value arity set (META_QUERY_ARITY_DOORS.list), packages/rest/src/meta-item-read-gate.ts.
    • 'content': step 6 of createMetaListAnswer strips each doc's content unless query.include === 'content'.
    • 'grants': step 8 runs describeMetaPositionList on position only when query.include === 'grants' (Setup → Positions list shows no holder count and no bound permission sets, and only the name cell opens the row — so the list cannot answer "who is a sales manager?" (hotcrm#2194 T2-U05, the platform half) #25333).
    • Same audience gate: both steps run after step 2, the per-caller list gate (createMetaListReadGate, the ADR-0046 §6.7 docs-audience arm). So ?include=content serves bodies only for the docs the slim list already admits. Both transports (RestServer and the runtime dispatcher's twin) hand their list to this one function, and the environment-scoped mount registers the same handler. The PR body's "through the same audience gate as the list" is accurate.
    • The client's union 'content' | 'grants' is exactly the two values the server acts on. Its jsdoc names the type each one applies to (doc, position); a value on another type is a no-op on the server, which is existing behaviour. The option is a REST-wire option: GetMetaItemsRequestSchema in packages/spec/src/api/protocol.zod.ts declares no include, and none is needed for a transport parameter. No spec change.
  • MetaItemsListOptions exported from @objectstack/client: right. It is a new named export from the package entry (src/index.ts). It replaces the inline { packageId?, names? } with the same two members plus include, so no existing caller narrows. README line added.
  • @object-ui/i18n keys: right. The diff adds nine base help.* keys: docsIndexSubtitle, searchAllDocs, articleCount, otherDocs, noDocsInstalled, loadDocsFailed, searchingDocs, searchResultCount, docsSearchFailed. Two of them (articleCount, searchResultCount) are plural, with per-locale CLDR forms (ar carries zero/one/two/few/many/other). All 11 packs are touched and no key is removed (the diff has zero - lines under ui/packages/i18n). This matches the declared "nine help.* keys (two of them plural)".
  • @object-ui/app-shell (AppHeaderVariant gains docs; HomeLayout/DefaultHomeLayout take variant): right, and not counted. The package is private: true, so these are not published surface. This is consistent with the PR-a amendment's reading.
  • @object-ui/console routes: right, and disclosed. /docs and its children move from a bare ProtectedRoute into Home's frame, under the organization and permissions layout. So the portal now needs an active organization, as /home does. The PR body says so ("under the same organization / permissions layout as /home"). This is not a published API.
  • Item 8 wording, code against text: right on the axis asked. The code says "This is a listing rule, not a read gate: the server's audience gate (ADR-0046 §6.7) is what decides who may read a doc" (groupBooksByApp jsdoc, docs-index.ts). The PR body says "This is what the page lists, not who may read a doc", and the maintainer summary says 「这只是「列不列」,谁能读文档仍由服务端的受众规则决定」. The changeset repeats the PR body's sentence. Neither the code nor the text says "not readable" anywhere. The full-text search keeps to the same rule: searchDocs answers only articles whose home book is in listedBooks, which is pinned by "answers no article of a book the page does not list". The premise also holds on main: SETUP_APP.requiredPermissions is ['setup.access'] (packages/platform-objects/src/apps/setup.app.ts:47), so /meta/app leaves Setup out for a member without it. See F2 for one precision gap in "listed only under its app".

② Semver level

  • Changeset .changeset/35424-all-docs-page.md: patch on @objectstack/client, @object-ui/console, @object-ui/app-shell and @object-ui/i18n. The diff has Metadata-protocol: none (no authorable key, value or type changes), and under AGENTS.md "Land it" rule 3 a none kind ships patch, widening included. Right.
  • Clause-②: yes (widening): right. The diff publishes an optional include option and a new exported type on @objectstack/client, plus nine keys on @object-ui/i18n, and removes nothing from any published package. App-shell is private and correctly left off the line. The line is identical in the PR body and the changeset body, and each one is line-initial. The Check Changeset and PR-body guards check-runs are success.

③ Boundary flags

The PR-b claim (card comment 7059265831) carries five readings. Here is how each is answered:

  1. Item 9 search in the browser over GET /meta/doc?include=content: answered. The parameter exists and is gated as the claim says (see ①). The SQL judgment is under F3.
  2. Item 8 "admins only" read as a listing rule: answered in the code and the text, which are consistent with each other (see ①). The claim's own residual is not escalated. See F1.
  3. Item 7 grouping (first linking app in launcher order, else the package's app, else "Other documentation"; launcher names; no package id; plural counts): answered in code and pinned in docs-index.test.ts and docs-portal.test.tsx.
  4. Item 6 header: answered. DocShell draws no bar off an app, and AppHeader's docs variant is pinned in three AppHeader tests.
  5. Notes carried from PR-a (N3 redirect, bookHoldsArticle, backLink={!docsNav}, the label differing from 「Search docs」): answered and pinned.

No open_questions entry is present on the card or the PR.

SQL push-down (Prime Directive 5). The full-text search fetches every listed doc's body into the browser once, on the first keystroke (useDocContents), and matches there. The reason given is in the claim's scope item 1 and the PR body: reuse the existing gated ?include=content list, add no new REST route, and ask once, lazily, and keep the answer for the page's life. This is not an SQL-capable path being kept in the app. Docs are metadata items, merged from the package registry and the stored overlay and judged by the in-process per-caller gate before step 6. So the list door has no SQL query a search could be pushed into, and the diff adds no new id materialisation and no in-app join over SQL-backed rows. The line is not crossed. See F3 for what the stated reason leaves out.

Findings

  • F1, should-fix (③, flag not escalated). The claim reads card item 8 (「系统包…只给管理员看」) as a listing rule, and says that "a server-side gate would need an audience-scoped book for Setup and is a separate card." No such card exists: an issue and PR search for 35424 finds only this card, Opening a record page full-page: draw the app shell as soon as the session is confirmed, not after all metadata arrives #35981, [PM seat] triage (objectstack-wide) — 🟢 os-warren · session_01JQwxbZKP5YM48rWMWTS7wE · trig_01SWRJbcpKtjSGGhSWj6SZo1 (hourly) · state = body + the round records newer than it #6015, this PR and feat(console): an app's docs page has one navigation — the docs column — with the path to its book and the previous and next article #36000. The PR carries Fixes #35424, so merging it closes the card, and the residual would be named nowhere. On main, SETUP_OVERVIEW_DOC carries no audience. So for a member without setup.access, the Setup overview's body still arrives in the browser in this page's own ?include=content answer, and it reads at its direct URL. The PR states this honestly as "not listed". But the maintainer's word on the card was "only admins see it", and the narrowing to a listing rule has been neither ruled on by the maintainer nor filed. Fix: file the follow-up card (an audience-scoped book or doc for Setup), or put the listing-only reading on 文档页:看文档时不显示应用菜单,只留一栏文档导航;「全部文档」页带上顶栏(附效果图) #35424 for the maintainer's word, and link it from the PR body before merge.
  • F2, nit (① text against code). The PR body and changeset say "A platform package's books (com.objectstack.*) are listed only under its app". groupBooksByApp actually assigns a book to the first app whose navigation links it, and only then to its package's app. A platform book never falls into "Other documentation", but a business app that links one would list it for a member who lacks the platform app. That is defensible, because such a member reaches it through that app's navigation anyway. But it is not what the text says, and no test pins it. Suggested wording: "listed only under an app in the member's list that carries it, never under Other documentation".
  • F3, nit (③ SQL push-down, reason incomplete). The stated reason (no new route, the existing gated parameter) is about routing, not cost. ADR-0046 omits content from the list so that unbounded manuals stay off hot paths, and this page opts back in for every listed doc. The lazy single fetch bounds the cost to one read per page life, and that is acceptable. Also, main already has a server-side doc search behind the same gate: searchPackageDocs in packages/runtime/src/domains/mcp-package-docs.ts, for the MCP door. The console now has a second match and rank rule (title 100, summary 10, body count) that differs from it (title 3, heading 2, text 1). Neither point blocks this PR. A server-side search shared by both is the natural follow-up if doc volume grows, and one sentence in the PR body would give the cost reason.
  • F4, nit (① first consumer). useDocContents casts the adapter's client to its own structural type { include?: 'content' } instead of importing the newly exported MetaItemsListOptions. This is harmless, and the published type is right. The consumer just does not use it.
  • F5, nit (UI claim). searchDocs caps its answer at 50 (limit = 50), and SearchResults renders the count placeholder of help.searchResultCount with hits.length. A query matching more than 50 articles therefore reads "50 articles found". This does not affect correctness of the contract.

Implemented-by: claude/project-thread-m7zdqa
Reviewed-by: isolated L2 sub-agent of seat session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

…book keeps its own app's name

- searchDocs answers every match unless a limit is passed, so the
  page's "N articles found" is the true count.
- An implicit book listed under an app that links it is named by its
  own package's app, never by the linking app.
- The changeset's platform-book sentence says what the grouping does:
  listed only under an app in the member's list that carries it.

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

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4

席位核对 — delta ACCEPT (L1-b)

Head-sha: 122847d · read 2026-11-21T08:41Z · delta c81b902..122847d only (one commit, 3 files), on top of delta ACCEPT 7059985289.

维护者速读

  • 这次改的是复审提出的两个小问题。一是搜索结果的「找到 N 篇」现在是真实总数,之前最多只显示 50 条。二是没有单独写手册的包,如果被别的应用引用,卡片名用它自己应用的名字,不再借用引用它的那个应用的名字(之前系统设置的手册会被叫成「销售」)。
  • 发布说明里对应的那句话已同步改准。

Must-fix / Should-fix

None.

Nits

  • N4 — groupBooksByApp now names an implicit book by its own package's app (homeApp) and keeps book.label when that app is not in the caller's list. For a platform book that another listed app links, the card and its search hit then read the humanized package id (the new test pins 「Setup」 under Sales). That happens only when a non-platform app links a platform book and the caller's list lacks the platform app. It is rare, and it is better than borrowing the linking app's name. If it matters later, a localized fallback would cover it.

Checked

  • F5, limit. searchDocs' default limit becomes Number.POSITIVE_INFINITY. slice(0, Infinity) returns every hit, so 「找到 N 篇」 (hits.length) is the true count. A new case with 60 matches returns 60, and its control with limit 5 returns 5. DocsIndex passes no limit.
  • F2, implicit naming. named uses apps.find(app => app._packageId === pkg), the book's own package's app, instead of owner. Grouping (owner) is unchanged: the linking app first, else the package's app. Platform books are still never ungrouped. The new case covers linking without the home app, and linking with it (labelled 'System Settings' under Sales).
  • Changeset. The platform-book sentence now reads "listed only under an app in the member's list that carries them, never under 「Other documentation」", which matches the code. The rest of the text is unchanged. No package, public surface or i18n changes.

Owed

  • CI green at 122847d. The L1 is final on that green head.
  • The L2 is the seat's. This L1 does not replace it.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 122847dc96a1e24adbc7f10012dbfdf8081c29a0
Local-runs: none

This is a delta round on the declaration face, from the reviewed head 3f16d0bcd2f9bb41afdbbdeeb6dc8b751cb3e904 (record posted) to 122847dc96a1e24adbc7f10012dbfdf8081c29a0.

① Derived judgments

  • Published surface: unchanged since the reviewed head. The delta touches no @objectstack/client file and no i18n pack. The @objectstack/client include option, MetaItemsListOptions and the nine help.* keys stand exactly as judged on 3f16d0b.
  • searchDocs signature: right, and internal. listedBooks changes from ReadonlySet of string to ReadonlyMap from book name to card label, and limit defaults to Number.POSITIVE_INFINITY instead of 50. searchDocs lives in the console app (docs-index.ts) and is not a published export. Its consumers are DocsIndex.tsx, updated in the same delta, and the tests. Type Check UI is success. slice(0, Infinity) returns the whole array, so no cap applies. The page's call (DocsIndex.tsx:72) still passes five arguments and no limit.
  • S1 (the implicit book's name): right. groupBooksByApp now names an implicit book by its own package's app (homeApp), never by the app that links it. With no home app in the caller's list, it keeps the book's own label. Each search hit's bookLabel reads the card label from listedBooks before falling back to the book's own label, so a hit names its book exactly as the page's card does. This is pinned by "names a hit's book as the page's card does", with a control showing that the book's own label differs.
  • Item 8 wording: consistent across all three places. The groupBooksByApp jsdoc, the changeset bullet and the PR body item 8 now all read "listed only under an app in the member's list that carries them (one linking them, else their own package's app), never under Other documentation". That is what the code does. All three still say "not listed", never "not readable", and point read access to the server's audience gate.

② Semver level

  • No change in the delta. The changeset's front matter is unchanged: patch on @objectstack/client, @object-ui/console, @object-ui/app-shell and @object-ui/i18n.
  • The edit to the changeset body touches one prose bullet only.
  • Clause-②: yes (widening) and Metadata-protocol: none are line-initial and identical in the changeset and the PR body. Both stay right for what the diff publishes: the delta adds no published surface.

③ Boundary flags

  • SQL push-down. Nothing in the delta changes the judgment on 3f16d0b. Docs are metadata items, judged by the in-process per-caller gate, so the list door has no SQL query a search could be pushed into. The delta adds no new id materialisation and no in-app join.
  • The cost reason is now stated (PR body item 9): "one read of every listed doc's body per visit that searches, and none for a visit that does not". The PR body also names a server-side search shared with the MCP doc door as the follow-up if doc volume grows.
  • No new dev flag or open_questions entry.

Earlier findings

New findings: none.

Check-runs on 122847dc96a1e24adbc7f10012dbfdf8081c29a0: 72 in total, 60 success and 12 skipped. None failed and none is pending or in progress. The skipped runs are opt-in or conditional jobs.

Implemented-by: claude/project-thread-m7zdqa
Reviewed-by: isolated L2 sub-agent of seat session_01L6bhgUkbQqRUUFSiu2HGob

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Seat landing · 2026-11-21T09:07Z · #35424 PR-b (items 6–9): the "All docs" page carries the console header, groups books by the app in the member's list that carries them, shows no package ids, and searches every listed article's text. It also carries PR-a's three review notes. Clause-②: yes (widening): @objectstack/client meta.getItems takes an optional include (the server already accepts it behind the same audience gate) and exports MetaItemsListOptions, and @object-ui/i18n adds nine keys; nothing is removed. The seat's declaration-face L2 at TIER_DEFAULT read PASS on 3f16d0bc, then delta PASS on 122847dc (this head): F1 is closed by follow-up #36029 (give the Setup books an audience, so "not listed" becomes "not readable"), F2, F3 and F5 are closed, and F4 is accepted. L1-b delta ACCEPT 7060088347 on this head. check-governed-merges --pr 36027 reads NOT governed (+1270/−154). K read by hand: 8, and main since the merge base touches neither translations/ nor skills/. All 72 check-runs on this head are success or skipped; mergeable clean. The seat readies this PR and arms auto-merge in the same step. The PR carries Fixes #35424; item 8's read gate continues in #36029.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 21, 2026 09:08
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit dab4712 Nov 21, 2026
73 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-m7zdqa branch November 21, 2026 09:31
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/xl tests 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