Skip to content

fix(settings)!: offer the knowledge settings only where the knowledge service is mounted - #34223

Closed
objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/area-S3-33933
Closed

objectstack-fleet[bot] wants to merge 9 commits into
mainfrom
claude/area-S3-33933

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

domain:server#5 · zhuangjianguo · session_01QsR2jTEivi2wogPpeo3xd5

Requested by Steedos · project thread

Fixes #33933

Blocked-by: objectstack-ai/cloud#4569
(Parked as a draft by seat ruling: the hosted runtime's service-ai embedder binding reads ai.embedder_* without mounting service-knowledge (cloud lane answer 6902349823 on #33933). This PR lands after cloud#4569 retires that hosted binding. Card comment 6906109461.)

Clause-②: no (narrowing) — on a deployment that does not mount KnowledgeServicePlugin (every stock boot), GET / PUT /api/settings/knowledge and POST /api/settings/knowledge/test answer 404 UNKNOWN_NAMESPACE; a write of an ai.embedder_* key answers 400 UNKNOWN_KEY; POST /api/settings/ai/test_embedder answers 400 SETTINGS_ACTION_FAILED (no handler registered); the hub list drops knowledge and the Setup sidebar drops nav_settings_knowledge.
Metadata-protocol: none
Skills-docs: none — no skill under skills/** teaches the knowledge settings page or the ai.embedder_* keys; skills/objectstack-ai teaches wiring KnowledgeServicePlugin, which is unchanged.

BREAKING for a deployment that does not mount the knowledge service: the Knowledge page, the AI page's Embedder section, their two test buttons and the Setup entry are no longer offered by default. They come back, unchanged, when KnowledgeServicePlugin is mounted beside SettingsServicePlugin. Stored knowledge.* / ai.embedder_* rows are untouched. The changeset carries the ADR-0087 not-required marker (no-migration-prescription).

维护者速读

  • 改了什么:知识库设置页、AI 页的「Embedder」分区、两个测试按钮和 Setup 菜单项,改为只在挂载知识库服务时出现;默认部署不再显示。
  • 为什么改:知识库不是默认能力,以前每个部署都显示一个背后没有服务的知识库页面和测试按钮,误导管理员。
  • 风险与回滚:未挂载知识库服务的部署,这些设置接口改为返回 404 / 400;已存的值仍在库里,挂载服务后照常回来。回滚即还原本 PR。
  • 先看:packages/services/service-knowledge/src/knowledge-settings-contribution.ts(注册逻辑,尤其 ai 分区只并入内置 ai 清单那段)、packages/services/service-settings/src/manifests/ai.manifest.ts(Embedder 分区拆出)、packages/services/service-knowledge/src/knowledge-service-plugin.ts(optionalDependencies 保证设置插件先初始化)。
  • 两分钟验证:pnpm --filter @objectstack/service-knowledge exec vitest run src/__tests__/knowledge-settings-contribution.test.ts,预期 7 个用例全绿(挂载有、不挂载无)。
  • 需要你做的:落地前由席位向云端车道确认:托管环境的 embedder 绑定会挂载知识库服务,或不依赖 ai.embedder_* 读取。

What changes

  • @objectstack/service-settings
    • builtinSettingsManifests drops knowledgeSettingsManifest (10 → 9).
    • aiSettingsManifest drops its embedder section; the section is exported as aiEmbedderSettingsSpecifiers, with withAiEmbedderSection(manifest) to join it (idempotent).
    • The default actionHandlers map no longer registers knowledge.test or ai.test_embedder.
    • The package entry exports knowledgeSettingsManifest, knowledgeTestActionHandler, aiSettingsManifest, aiEmbedderSettingsSpecifiers, withAiEmbedderSection, aiTestEmbedderActionHandler.
    • settings.ai.description no longer names the knowledge base, in all 11 bundled locales.
  • @objectstack/service-knowledge
    • New contributeKnowledgeSettings(ctx, version), called from KnowledgeServicePlugin.init(). It registers the knowledge manifest and knowledge.test, and joins the embedder section plus ai.test_embedder to the ai namespace. It joins them only when the served ai page is the bundled one, or already declares the embedder keys. A host's own ai manifest is left untouched, and the plugin logs a warning saying why. It also registers the nav_settings_knowledge Setup entry as a navigationContributions bundle through the manifest service.
    • optionalDependencies names com.objectstack.service.settings (literal, ADR-0116), so "no settings service" at init is a fact of the composition.
    • Depends on @objectstack/service-settings; devDependency @objectstack/platform-objects for the merged-Setup-tree test.
  • @objectstack/platform-objects: the static nav_settings_knowledge entry leaves SETUP_NAV_CONTRIBUTIONS. Its label stays keyed in the Setup bundles.
  • docs/qa/platform-checklist/areas/platform-core.json: builtin-apps-nav-render (rev 16) and settings-hub-roundtrip (rev 9) restated for 9 builtins and the knowledge page's new source.

Tests

  • New service-settings/src/knowledge-settings-default-absent.pin.test.ts pins the default boot (8 cases, refusals by status + error.code):
    • no knowledge in the aggregate or the hub list;
    • GET knowledge answers 404 UNKNOWN_NAMESPACE;
    • no embedder key or button on the served ai page;
    • PUT ai {embedder_provider} answers 400 UNKNOWN_KEY;
    • POST ai/test_embedder answers 400 SETTINGS_ACTION_FAILED, judged against the hub's own no-handler answer, and POST knowledge/test answers 404 UNKNOWN_NAMESPACE;
    • no knowledge Setup entry;
    • no locale's AI description names the knowledge base.
  • New service-knowledge/src/__tests__/knowledge-settings-contribution.test.ts uses a LiteKernel with KnowledgeServicePlugin deliberately used BEFORE SettingsServicePlugin, against a bare control kernel (7 cases):
    • the namespace, the embedder keys and both actions are there with the service and absent without it. The actions are judged equal to their handler's own answer.
    • on the merged Setup tree (ObjectQL registry fold), nav_settings_knowledge appears exactly once with the service and never without it;
    • the two HTTP-door cases moved here from settings-default-action-handlers.pin.test.ts.
  • Updated:
    • ai.manifest.test.ts: the embedder describe reads the exported section; a joined-parse and idempotence case is added.
    • settings-default-action-handlers.pin.test.ts: the population excludes the two moved buttons.
    • settings-visibility-declaration.pin.test.ts and settings-translation-coverage.test.ts: the corpus keeps the knowledge declarations, so the measured 10 manifests and 90 predicates and the copy coverage still hold.

Acceptance notes

  • Acceptance 3 (a mounting app): no app in this repository mounts KnowledgeServicePlugin. The test kernel above stands in for one, as ruled; examples/app-todo is unchanged.
  • Hosted embedder use is the cloud lane's question. Before landing, the seat confirms with the cloud lane that the hosted embedder binding either mounts the knowledge service or does not read ai.embedder_* without it.
  • The refusal codes at the HTTP door are UNKNOWN_NAMESPACE / UNKNOWN_KEY (the route envelope's spelling of the service's UnknownNamespaceError / UnknownKeyError).
  • Surface deviations, both required by the approved dependency:
    • packages/services/service-settings/src/index.ts: the package entry exports the six symbols listed under What changes.
    • packages/services/service-knowledge/vitest.config.ts: src aliases for service-settings, types and platform-objects, as check:test-source-alias requires.
  • The two corpus tests (settings-visibility-declaration.pin.test.ts, settings-translation-coverage.test.ts) were outside the listed files too. They are measurement pins over this package's declarations, updated so they keep measuring the same declarations.

Verification

All verify runs go through scripts/pm/os-verify-lock.sh and quote the lock's VERDICT command-exit 0 line. Final head is f27aef7db8: 1b210ee4f6 plus a merge of origin/main.

Package tests and typecheck on the final head f27aef7
  • @objectstack/service-settings test: Test Files 76 passed (76), Tests 1484 passed (1484); typecheck exit 0.
  • @objectstack/service-knowledge test: Test Files 5 passed (5), Tests 56 passed (56); typecheck exit 0.
  • @objectstack/platform-objects test: Test Files 122 passed (122), Tests 2007 passed (2007).
  • Direct readers of the moved surface, at 334f6da447:
    • @objectstack/plugin-auth: the 5 files that read builtinSettingsManifests, Tests 133 passed (133).
    • @objectstack/spec: settings-manifest.test.ts, Tests 86 passed (86).
    • @objectstack/platform-objects typecheck: exit 0.
Dogfood battery (narrowing): green at 1b210ee
  • Closure built with pnpm --filter '@objectstack/dogfood^...' build (exit 0). Then pnpm --filter @objectstack/dogfood test under the lock, with no shard and no path: Test Files 467 passed, 3 skipped (470); Tests 3962 passed, 42 skipped (4004); exit 0.
  • The only commit after that run is the merge of origin/main, which brings main's own commits; CI runs the battery on the merge.
  • An earlier attempt ran on a partial closure: the build stopped at driver-turso, because a dependency arrived with a merge before pnpm install. That run is discarded and is not counted.
Ablation of every pin (on-disk mutation via scripts/ablation-replace.mjs, WRAP restore, restore proven blob == HEAD and git diff HEAD empty)

Tests are src-aliased, so no dist leg is needed.

  • A1, knowledge manifest back in builtinSettingsManifests: red, 5 failed.
    • Absent pin: aggregate/hub list, GET knowledge 404, both test-button doors.
    • Default-action-handlers pin: the population, and "every declared action reaches a handler".
    • The first A1 attempt was a no-op, refused by the tool because its replacement contained the anchor. It was redone as A1b.
  • A2, embedder section back on the served ai page: red, 4 failed (no embedder key/button; PUT embedder_provider 400; population; handler reach).
  • A3, static nav_settings_knowledge back: red in the absent pin (stock nav) and in the knowledge suite (the merged tree holds the entry twice when mounted, once when bare).
  • A4, en AI description naming the knowledge base again: red, 1 failed (locale description).
  • A5, default actionHandlers registering ai.test_embedder again:
    • First run: GREEN. No pin covered an extra handler, so the door pin "neither test button reaches a handler" was added.
    • A5b after the pin: red, 1 failed.
  • A6, contributeKnowledgeSettings not called: red, 6 of 7 failed (only the bare-hub non-vacuity case stays green).
  • A7, com.objectstack.service.settings dropped from optionalDependencies: red, 6 of 7 failed. use order alone does not put settings first.
  • Every leg: ablation-replace: ok restored: blob == HEAD, and _DIFF_HEAD_LINES=0 at the end.
Gates
  • node scripts/pm/dispatch-gates.mjs --commands at 1b210ee4f6: 90 families, all exit 0. --ran: 90 derived, 90 run, 0 NOT-MEASURED (a derived zero).
  • At f27aef7db8 (91 families, check:adr-anchors added): check:i18n first read exit 1 on a platform-objects dist built before the merge. After pnpm --filter '@objectstack/platform-objects...' build it read exit 0 ("all bundles in sync"). The other families were read as recorded in the report.
  • node scripts/check-platform-checklist.mjs --changed-from origin/main: OK, 9 anchors judged, 0 lost.
  • node scripts/check-nul-bytes.mjs: OK. eslint --no-inline-config on the changed .ts files: exit 0.
  • git merge-tree --write-tree origin/main HEAD: exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5

… service is mounted

The knowledge settings page, the ai namespace's embedder section, their two
test actions and the Setup entry move out of the default settings slate.
service-knowledge contributes all of them from KnowledgeServicePlugin.init()
when a settings service is present, with the settings plugin declared in
optionalDependencies so its absence is a composition fact.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…-objects test import

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…o the knowledge suite

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…ler on a default boot

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…bility and translation corpora

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
@github-actions github-actions Bot added size/l dependencies Pull requests that update a dependency file 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 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/platform-objects, @objectstack/service-knowledge, @objectstack/service-settings, touching 32 documentable anchor(s). ⚠️ 5 changed file(s) yielded no anchor (packages/services/service-knowledge/package.json, packages/services/service-knowledge/src/index.ts, packages/services/service-knowledge/vitest.config.ts, …), 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 35cc663868de0ea06346b0087ac2d0222b9c5ed3.

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

What this run could not see
  • 5 changed file(s) yielded no anchor (packages/services/service-knowledge/package.json, packages/services/service-knowledge/src/index.ts, packages/services/service-knowledge/vitest.config.ts, …) — pages documenting those are invisible to this run
  • 10 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 — 13 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 35cc663868de0ea06346b0087ac2d0222b9c5ed3 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from b88696c39ecab682b4554f58c6c490aa817dcde4 — the merge of head ba9ec457d95728754a39030bc4891e50327b6504 into base 35cc663868de0ea06346b0087ac2d0222b9c5ed3, 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 b88696c39ecab682b4554f58c6c490aa817dcde4 && git checkout b88696c39ecab682b4554f58c6c490aa817dcde4
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 35cc663868de0ea06346b0087ac2d0222b9c5ed3 ba9ec457d95728754a39030bc4891e50327b6504 && git checkout -B drift-repro 35cc663868de0ea06346b0087ac2d0222b9c5ed3 && git merge --no-ff ba9ec457d95728754a39030bc4891e50327b6504

node scripts/docs-audit/affected-docs.mjs --json 35cc663868de0ea06346b0087ac2d0222b9c5ed3

⚠️ 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 35cc663868de0ea06346b0087ac2d0222b9c5ed3 → 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

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head ba9ec45 · 2026-11-16T04:02Z

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: ba9ec457d95728754a39030bc4891e50327b6504
Local-runs: none
Scope: .changeset/33933-knowledge-settings-with-service.md, docs/qa/platform-checklist/areas/platform-core.json, packages/cli/test/connect-agent-both-halves-wire.pin.test.ts, packages/platform-objects/src/apps/setup-nav.contributions.ts, packages/services/service-knowledge/package.json, packages/services/service-knowledge/src/tests/knowledge-settings-contribution.test.ts, packages/services/service-knowledge/src/index.ts, packages/services/service-knowledge/src/knowledge-service-plugin.ts, packages/services/service-knowledge/src/knowledge-settings-contribution.ts, packages/services/service-knowledge/vitest.config.ts, packages/services/service-settings/src/index.ts, packages/services/service-settings/src/knowledge-settings-default-absent.pin.test.ts, packages/services/service-settings/src/manifests/ai.manifest.test.ts, packages/services/service-settings/src/manifests/ai.manifest.ts, packages/services/service-settings/src/manifests/index.ts, packages/services/service-settings/src/manifests/knowledge.manifest.ts, packages/services/service-settings/src/settings-default-action-handlers.pin.test.ts, packages/services/service-settings/src/settings-service-plugin.ts, packages/services/service-settings/src/settings-visibility-declaration.pin.test.ts, packages/services/service-settings/src/translations/ar.ts, packages/services/service-settings/src/translations/de.ts, packages/services/service-settings/src/translations/en.ts, packages/services/service-settings/src/translations/es-ES.ts, packages/services/service-settings/src/translations/fr.ts, packages/services/service-settings/src/translations/ja-JP.ts, packages/services/service-settings/src/translations/ko.ts, packages/services/service-settings/src/translations/pt-BR.ts, packages/services/service-settings/src/translations/ru.ts, packages/services/service-settings/src/translations/zh-CN.ts, packages/services/service-settings/src/translations/zh-Hant.ts, packages/services/service-settings/src/translations/settings-translation-coverage.test.ts, pnpm-lock.yaml + packages/services/service-settings/src/settings-service.ts (registerManifest, registerAction, getManifest, getNamespace, resetNamespaceRows), packages/services/service-settings/src/manifest.ts (SETTINGS_PLUGIN_ID), packages/core/src/plugin-order.ts (resolvePluginOrder), packages/core/src/kernel.ts and packages/core/src/kernel-base.ts (both call it), scripts/check-adr-0087-registration.mjs and AGENTS.md on main (level and marker rules); all read at the head, none reviewed

Read at 2026-11-16T04:10Z. First review of this head; claim: comment 6906919972; no lane request (owed per check-owed-reviews). Independence: implemented in a project thread for domain:server#5; reviewed by os-tesla, who neither dispatched nor implemented it.

① Derived judgments

  • Readers of the moved keys, in this repository: none at runtime. git grep of the six embedder_* keys over packages/, ui/, examples/ and skills/ at the head finds only ai.manifest.ts (the declaration and its form-check handler), a comment in visibility-eval.ts, translations, tests and changelogs. No package calls getNamespace('ai'), get('ai', …) or subscribe('ai', …) for them, and none reads the knowledge namespace. @objectstack/embedder-openai takes constructor options, not settings. The one runtime reader is outside this repository (see ③).
  • What an undeclared key means at the head (read in settings-service.ts). Declared keys are the registry's scopes map, built in registerManifest from the manifest's specifiers. With the section gone on a default boot: a write is refused (UnknownKeyError, 400 UNKNOWN_KEY at the door); an in-process get of one key throws the same error; getNamespace('ai') resolves declared keys only, so it answers without the six keys and without their defaults (embedder_provider: none, embedder_batch_size: 64); OS_AI_EMBEDDER_* overrides are no longer audited or served. Nothing in the diff deletes a row, and no boot path prunes rows of undeclared keys, so "stored values remain and return when the service is mounted" holds. The built-in reset action clears declared keys only (resetNamespaceRows walks the namespace payload). No settings export or import door exists in service-settings at the head, so that question has no subject.
  • Registration order: true. resolvePluginOrder visits every optionalDependencies id that is composed before the plugin itself, and both kernels (kernel.ts, kernel-base.ts) order through it. The literal com.objectstack.service.settings equals SETTINGS_PLUGIN_ID, which is SettingsServicePlugin.name. That plugin registers its manifests, its action handlers and the settings service inside init(), so at the knowledge plugin's init() the ai page is already registered. No cycle: the settings plugin's only edge is the ObjectQL engine, and service-settings does not depend on service-knowledge. The contribution test mounts the knowledge plugin before the settings plugin, and the dev's A7 ablation (dependency dropped, 6 of 7 red) shows the order is carried by the declaration, not by use order.
  • Knowledge mounted without settings. contributeKnowledgeSettings catches the missing service and returns with nothing offered, Setup entry included; the knowledge service itself is registered before the call. Read, not pinned by a test (N2).
  • Re-registering ai. registerManifest replaces the entry and keeps the previous actions map, so ai.test survives the join; env-override reports are de-duplicated, so the second registration does not repeat them.
  • Setup entry and routes: one reading of "mounted". The entry is registered by the same function, after the knowledge manifest, and only when a settings service took it. The static entry is gone from SETUP_NAV_CONTRIBUTIONS. The label key stays in the platform-objects bundles, so the contributed entry is translated.
  • Translations. All 11 locale bundles change the one string, settings.ai.description, the same way (no embedder, no knowledge base). No key moved or was removed: the knowledge page's copy and the embedder group's copy stay in the bundles, which is what the mounted deployment reads. The coverage test now measures the ai manifest with its embedder section joined and still enumerates knowledgeSettingsManifest from the manifests module, so it covers the same declarations as before; it is not weakened.
  • Pins: not vacuous. The default-absent pin asserts by status and error.code, with a control per case (the ai, storage, mail namespaces present; provider key present; nav_settings_ai present; at least six embedder keys enumerated). The contribution suite compares a mounted kernel against a bare one built by the same function. The two corpus pins keep 10 manifests by adding the two moved declarations back explicitly. The dev's seven ablations each went red, and the one that first stayed green (A5) produced a new pin.
  • CLI pin and checklist. connect-agent-both-halves-wire.pin.test.ts counts the Setup tree a composition without the knowledge service serves: 33 to 32, with an explicit not.toContain('nav_settings_knowledge'); correct for this change. The checklist JSON restates 9 builtins and 10 served namespaces with revision entries; check-platform-checklist is green in CI.
  • Lockfile. Six added lines: the two workspace links service-knowledge/package.json adds. Nothing else.

② Semver level

  • Clause-②: no (narrowing) is the true arm, on both the PR body and the changeset: served doors now refuse on every deployment that does not mount the service. The ! title, the BREAKING paragraph and the "What to do" paragraph are present.
  • Metadata-protocol: none is true: no schema key, accepted value or metadata type moves; a settings manifest is a runtime registration and the SettingsManifest schema is untouched. So the level is patch on each package the diff moves, and the changeset names exactly those three (service-settings, service-knowledge, platform-objects). packages/cli changes a test only and publishes nothing.
  • ADR-0087: not-required (no-migration-prescription) is the fitting category. No export is retired (knowledgeSettingsManifest and builtinSettingsManifests both remain, the former now also on the package entry), so the runtime-export category has no subject, and with none declared the narrowed-kind refusal of this exemption does not apply.
  • Skills-docs: none is true: git grep under skills/ at the head finds no embedder_ key, no settings-page URL for knowledge, no builtinSettingsManifests and no nav_settings_* id.
  • CI on this head: 72 check-runs, all completed; 61 success, 11 skipped, none failed, none running.

CI completed before posting: 72 check-runs on this head, 61 success, 11 skipped, none failed.

③ Boundary flags

  • Open dependency, not closed by this PR: the hosted embedder binding. The cloud lane's answer (6902349823) is that the hosted runtime does not mount service-knowledge and its AI plugin reads ai.embedder_* through getNamespace('ai') on every boot. Per ① that read answers without the six keys once this lands, so the hosted embedder would be configured from nothing, silently. The seat already parked the PR as a draft, Blocked-by: objectstack-ai/cloud#4569 (6906109461). This PASS judges the diff; it is not a statement that the PR may land. Landing waits for cloud#4569 to merge, or for the cloud lane to say the binding no longer reads those keys; if cloud keeps the binding, this PR needs a fallback and a new review.
  • The dev's report carries no open question. Its two out-of-scope notes (checklist count; the cloud reader) are both answered: the first in this diff, the second above.
  • Surface deviations named by the dev (package entry exports, vitest aliases, the two corpus pins) are all required by the approved dependency and are read above. The packages/cli pin is a further file outside the listed surface, added in the last commit; it is a count the change makes false, so it belongs here.
  • SQL push-down: no query, id materialisation or in-app join is added.
  • Acceptance 3 is met by the test kernel, as the area decision (6898471166) ruled; examples/app-todo is unchanged.

④ Design judgment

The narrowing makes a refusal real rather than taking a working capability away from an in-repository consumer: the two pages configured a service no stock deployment mounts, and the maintainer ruled that they be hidden everywhere. The mechanism follows the precedent already in the tree (the branding entry lives with its namespace). The diff agrees with the ruling and with the code it cites.

S1 (should-fix) — contributeKnowledgeSettings recognises "the bundled ai page" by its key set alone and then registers withAiEmbedderSection(aiSettingsManifest), the bundled declaration. A host that passed its own ai manifest with the same keys and different declarations is therefore not "left untouched", which is what the PR body, the changeset and the function's comment claim. Either make the recognition match the claim or narrow the claim, and pin the host-manifest branch (untouched, warning logged) and the already-declares-embedder branch, neither of which has a test. Detail is in the seat's private notes. Not a must-fix: no deployment mounts the service today, and the branch needs a hand-built ai manifest.

S2 (should-fix) — the changeset's "What to do" says stored values stay, and stops there. It should also tell an operator who stored a value under the two retired pages and wants it gone what to do, since the default deployment no longer serves the doors that edit those keys. A changeset sentence is enough. Detail is in the seat's private notes.

N1 (nit) — the page and its Setup entry are still titled "AI & Embedder" in every locale on a deployment that now shows no embedder section. The card's acceptance names the page by that title and asks only for the section and the description, so this is residue, not a miss; a follow-up card can decide whether the title travels with the section.

N2 (nit) — "knowledge mounted with no settings service offers nothing and does not throw" is read in the code and stated in the changeset, with no test.

N3 (nit) — the PR body names f27aef7db8 as the final head and lists no packages/cli change; the head is ba9ec457d9, one test commit later. The body's Verification section should say so.

No must-fix. Should-fix: S1, S2.

Implemented-by: claude/area-S3-33933
Reviewed-by: session_01L9qibxTeW8xHnxoHxWNHWW

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Recorded 2026-11-19T19:34Z. Pre-landing notice for this PR's next owner: card #33933 is pm:on-hold, and its seat (domain:server#5) is no longer on the roster, so the notice is left here. PR #35610 (card #35321, Tier H) adds a narrowed leg at the merge queue. Once it merges, a pull that declares a narrowing, as this one does, is refused until an authorized approval (or the authorized account's own enqueue) and a standing PASS contract review at CONTRACT_REVIEW_TIER are on its head. See the Landing impact section of #35610.

247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…ff), so the FLS question can be asked on the open cards (objectstack-ai#36152)

Fixes objectstack-ai#36073

Clause-②: yes (widening) — the new CLI flag `--schema-masking on|off`
(`cli.ts`); through `./runner`, the new module `schema-masking.ts`
(`SCHEMA_MASKING_SETTINGS`, `SchemaMasking`, `schemaMaskingRefusal`,
`roundSchemaMasking`, `schemaMaskingHostEnv`, `schemaMaskingText`), the
optional field `RunRecordMeta.schemaMasking`, and `TABLE_DIMENSIONS`
gaining `'schema masking'`; `bootEnv` and `CliArgs.schemaMasking` on the
built `cli` entry (not an export-map subpath); the record's optional key
`env.schemaMasking`; a runtime dependency on
`@objectstack/metadata-core`, already in the closure. Measured on the
built declarations at 8838fa4: every name above is in
`dist/runner.d.ts`'s export list (re-exported from the shared summary
chunk) or `dist/cli.d.ts`; none in `index.d.ts`, `score.d.ts`,
`score-full.d.ts` or `export.d.ts`. Nothing removed or narrowed.
Metadata-protocol: none

## 维护者速读

- 用户无感:场景评测的运行器新增一个开关,可在关闭对象结构遮蔽的应用上跑一轮问数,每条运行记录都写明遮蔽已关闭。
- 属于问数评测史诗:让已裁定的字段级安全问题(字段对你不可见算通过,说空白算失败)能在公开卡片上真正被问到。
- 只影响评测人员:默认每日一轮的记录逐字节不变;出错也只是评测读数错,不碰任何客户数据,可直接撤回。
- 无

## What changes

- `--schema-masking off` boots every app of the run with
`OS_ALLOW_UNMASKED_OBJECT_METADATA=1` (ADR-0106 D8; the name is imported
from `@objectstack/metadata-core`'s `OBJECT_SCHEMA_MASK_DISABLE_ENV`),
on the app's process only (`bootEnv` in `cli.ts`,
`schemaMaskingHostEnv`). The run prints `schema masking: off (...)` and
every record carries `env.schemaMasking: "off"`
(`RunRecordMeta.schemaMasking`, `runRecord`). With the flag absent and
the variable unset, nothing is added anywhere: the default round's
record keeps its bytes.
- Done-when 1, the inherited variable: **recorded, not refused.** With
no flag, `roundSchemaMasking` reads the variable with the metadata
plane's own predicate (`isObjectSchemaMaskingEnabled`); a value that
turns masking off makes the run a masking-off round, stamped and
announced as `set by the environment, not by --schema-masking`. A value
the platform reads as masked (`0`, `false`, blank) stamps nothing. Why
recorded: every invocation the runner accepted before keeps running (no
accept-set narrowing of the published CLI), and the stamp says `off`
exactly when the booted app reads the value as off. `--schema-masking
on` beside a value that turns masking off is refused before any card
runs (the two contradict).
- `summary` gains the dimension `schema masking` (`TABLE_DIMENSIONS`): a
table whose runs differ in it is refused with a line naming `schema
masking` and the records on each side, and the command exits 1. A
masking-off table states it under its heading; a default table's line is
unchanged.
- `packages/qa/scenarios/README.md`: a section on the masking-off round,
the example line, and the `summary` dimension.

## Tests

`packages/qa/scenarios/test/runner/masking-off-ask-round.test.ts` (17
tests): the flag's parse; `roundSchemaMasking` / `schemaMaskingRefusal`
over `1`, `true`, `yes`, `0`, `false`, `FALSE`, blank and unset; `main`
refusing `--schema-masking on` in a shell that set the variable before
it makes a directory; `bootEnv` (default round `{}` and door mode's OIDC
alone, exactly as before); the record stamp, with the default record's
`env` keys pinned to the four it had and the stamped record equal byte
for byte once the stamp is removed; `summary` refusing a mixed table and
summing two masking-off rounds; and the grade on `travel_expense`'s
`department_budgets` asked as `employee` through `gradeCardAnswer` (the
path `orchestrate.ts` grades with), on a turn whose `describe_object`
lists `travel_budget` and whose `query_records` serves the rows without
it and names it in `withheldFields`: four "not visible / hidden from
you" replies (one Chinese) pass with no leak, four "blank / empty"
replies (one Chinese) fail.

<details><summary>Readings at 8838fa4</summary>

- `pnpm --filter @objectstack/scenarios exec vitest run --maxWorkers=2`
(after `pnpm --filter @objectstack/scenarios build`): `Test Files 41
passed (41)`, `Tests 1233 passed (1233)`, lock VERDICT command-exit 0.
- `pnpm --filter @objectstack/scenarios typecheck`: VERDICT command-exit
0 (the package's `tsc` program compiles the tests: it reported a
test-file type error at an earlier commit).
- Ablations (each through `scripts/ablation-replace.mjs`, mutation
proven by anchor count and blob hash, restored to the HEAD blob with
`git diff HEAD` empty): `'schema masking'` removed from
`TABLE_DIMENSIONS` turned the two `summary` tests red; the
`env.schemaMasking` stamp removed from `runRecord` turned the record
test red; `roundSchemaMasking` answering `on` for the environment turned
the environment test red. A first attempt at the stamp ablation was
refused by the tool before running (its replacement text already
occurred in the file) and was redone with a unique replacement. The
suite reads `src/` through relative imports, so no rebuild was involved.

</details>

## Acceptance notes

- **Done-when 2 is shown on the grade path, not on a live round.** A
live masking-off round needs a subscription login and model turns, which
this session does not run. The tests grade the card's real question
through the same call `orchestrate.ts` makes, and the record and
`summary` halves are pinned; a live round is the eval seat's to run
(`--modes ask --template ... --schema-masking off --only
travel_expense,order_to_cash`). NOT MEASURED: a live masking-off round.
- **The existing grader holds the ruled reading.** Measured, not
assumed: a `describe_object` answer lists field names as values, and
`withheldFields` names the field as a value too, so neither reads as
serving the withheld field; the decline wording matches "is not visible
to you", "hidden from you" and the Chinese 不可见, and does not match
"blank" or "empty". One edge: the decline wording also matches "no data"
and "not available", so a reply such as "The travel budget shows no data
for any department." or "The travel budget is blank (not available)."
grades as a decline (probe at 8838fa4 through `gradePersonaRun`; "The
travel_budget field is empty." and "Travel budget: N/A for all
departments." fail as ruled). Reported to the seat; not changed here.
- **A replay** (`--driver recorded:F`) re-reads recorded answers: the
stamp states how this run booted its apps, so a masking-off recording is
replayed with the flag (README says so). The recording itself does not
carry the masking; not changed here.
- **File surface beyond the claim**:
`packages/qa/scenarios/package.json` and `pnpm-lock.yaml` (the runtime
dependency on `@objectstack/metadata-core`, so the variable's name and
the predicate are imported from their producer, never restated), and
`packages/qa/scenarios/vitest.config.ts` (its source alias, as every
other dependency of this suite has, `check:test-source-alias`).
`packages/metadata-core` is not edited.
- **Overlap**: `node scripts/pm/overlap-check.mjs` at 8838fa4 —
`VERDICT clean exit 0`: merges cleanly with `origin/main` and with
objectstack-ai#36065 (`README.md`, `scorecard.ts`, `summary.ts`), objectstack-ai#36092
(`README.md`), objectstack-ai#35129 (`package.json`), objectstack-ai#34223 (`pnpm-lock.yaml`).

## Verification

Read first, by risk:
`packages/qa/scenarios/src/runner/schema-masking.ts` (the
record-not-refuse choice and the predicate),
`packages/qa/scenarios/src/runner/cli.ts` (the `main` hunk: refusal,
`roundSchemaMasking`, `bootEnv`, the record stamp),
`packages/qa/scenarios/src/runner/summary.ts` (the new dimension and its
hidden default).

Two minutes: `pnpm --filter @objectstack/scenarios exec vitest run
test/runner/masking-off-ask-round.test.ts` — expect `Tests 17 passed
(17)`.

<details><summary>Gates at 8838fa4</summary>

- `node scripts/pm/dispatch-gates.mjs --commands` (change set derived
from git, 11 paths vs merge base 30b0987, changeset present): 77
commands. 75 exit 0. Two exit 3, NOT MEASURED: `node
scripts/check-plugin-teardown-shape.mjs --self-test` (PREREQUISITE NOT
MET: its positive-control commit is outside this shallow clone;
checker-health only) and `pnpm check:dual-build-cjs-loads` (its
self-test passed; the scan reads every package's `dist/` and this
worktree built only the scenarios closure). CI runs both.
- `node scripts/pm/dispatch-gates.mjs --ran FILE`: `77 derived
famil(ies) accounted for — 77 run`.
- Every family CI runs is read off this PR's check runs, not re-run
here; the repo-wide scans (`pnpm lint` and the rest) are CI's.

</details>

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 22, 2026
…the expand/collapse button is the one control, Recent lists this app (objectstack-ai#36112) (objectstack-ai#36297)

<!-- claude-projects-attribution: {"github_login":"os-project-manager"}
-->
_Requested by **Leehom** · [project
thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1X6okWxYPWAsooBsJoAhnT1u)_

repo:objectstack#4 · os-project-manager ·
session_01FEkQ5oK4fFfnLADcipbEeT

Fixes objectstack-ai#36112

This is PR B of two for the card: the sidebar's docking model. PR A
(objectstack-ai#36187) moved everything off the desktop top bar.

Clause-②: no
Metadata-protocol: none

Seat claim: [objectstack-ai#36112
claim](objectstack-ai#36112 (comment)).
Ruling: [F1,
7069868269](objectstack-ai#36112 (comment)).

## 维护者速读

- 电脑上打开应用:窗口 1280
宽及以上侧边栏默认展开,更窄默认收起;收起和展开按钮是唯一开关,浏览器按宽窄两边各自记住;「保持侧边栏展开」开关去掉;侧边栏的「最近使用」只列当前应用里的;手机不变。
- 「去掉顶栏、侧栏常驻」这张卡的后一半,按你 11 月 21 日的裁定(1280 起默认展开,更窄才收起)收尾,合并后这张卡关闭。
-
出错时用户看到的是侧边栏开始时的展开或收起不对,点一下按钮就能改回,选择会被记住;只改界面,不动数据,可以直接撤回;以前选过「保持展开」的人在窄窗口上照旧是展开的。
- 无

## Upgrade change and accepted cost

- **Upgrade change (stated as the ruling asks):** on 1280–1415 px
windows, a user who never set 「保持展开」 now starts with the sidebar
expanded (it folded before), unless they had collapsed it on a wide
window.
- **Accepted cost (stated on the card):** on a 1280 px window the list
beside an open record drawer is 304 px wide (560 today), and on
1280–1415 px with the sidebar expanded, opening the comment panel
returns the record page's fields to the tab row; collapsing the sidebar
restores the three columns. The 304 / 560 figures are pinned in
`consoleSidebarRail.width-27593.test.tsx` against the primitive's
sidebar width and plugin-view's drawer width.

## What changes

`@object-ui/app-shell`

- `layout/consoleSidebarRail.ts`
- `CONSOLE_SIDEBAR_RAIL_BELOW_WIDTH` is `1280`, one constant, no longer
derived (`RECORD_DRAWER_MIN_CONTENT_WIDTH` removed; the drawer and list
constants stay, to state the accepted cost).
- The narrow-window choice is `CONSOLE_SIDEBAR_NARROW_OPEN_PREFERENCE`
(was `CONSOLE_SIDEBAR_KEEP_OPEN_PREFERENCE`), stored under the same name
`console.sidebar.keepOpen`, so an existing `on` reads as "expanded on
narrow" with no migration. The wide-window choice keeps its key
(`os:console-sidebar:wide-open`). Wide and narrow stay stored
separately.
- New `startingSidebarOpen(wide)`: the reader's choice for that side,
else expanded on wide and collapsed on narrow. `primeConsoleSidebarOpen`
writes it into the primitive's cookie before the first frame;
`seedWideWindowOpen` is gone (with an explicit wide default it has
nothing to seed).
- `useConsoleSidebarRail` answers `narrowOpen` / `setNarrowOpen` instead
of `keepOpen` / `setKeepOpen`; `railMode` is "narrow and collapsed by
the narrow choice".
- `useConsoleSidebarRailPanel`: `keepOpenControl`, `dock` / `undock` and
the `'dock'` closer are removed. While the sidebar is hidden, a press on
a sidebar trigger (the page header's expand button, or the corner
fallback) now docks it: on a narrow window the capture phase sets the
narrow choice to expanded before the provider's toggle opens it, so the
open is not a float. ⌘B still floats the menu over a collapsed sidebar
(unchanged), and so does the left edge.
- `hooks/useResponsiveSidebar.ts`: gives a window its starting state on
load and when it crosses 1280 px or the phone breakpoint; keeps an
open/close on a wide window as the wide choice (only on a change, so a
default is never recorded as a choice), and a close of the docked
sidebar on a narrow window as the narrow choice; a narrow choice turned
collapsed (this tab or another) collapses an open sidebar. Public
signature unchanged.
- `layout/UnifiedSidebar.tsx`: the 「保持侧边栏展开」 footer row is gone (the
foot holds only the account menu). From 768 px up the Recent group lists
only entries whose address names the current app (resolved by
`matchAppBySegment`, as Home resolves a recent row's app); the phone
drawer is unchanged.

`@object-ui/i18n`: `sidebar.keepOpen` removed from all 11 packs (zh-Hant
regenerated with `gen:zh-hant`).

Text that named 1416 (the ruling's list, plus one more found by grep):

- `ui/packages/plugin-detail/src/synth/recordPageColumns.ts` comment
(also corrected: it still described the retired 48 px icon rail).
Comment only, no bump for plugin-detail.
- `docs/qa/platform-checklist/areas/platform-core.json`
`platform-core.builtin-apps-nav-render` steps[2], revision 17 → 18 with
a history row.
- `examples/app-showcase/e2e/detail-shapes.spec.ts`: its comment cited
1416 and the case docked the sidebar with the retired "Keep sidebar
open"; it now docks with the page header's expand button.

## Tests

New (card-named):

- `layout/__tests__/consoleSidebarRail.docking-36112.test.tsx`:
threshold 1280; first frame at 1279 collapsed and 1280 expanded whatever
the cookie, 768 / 1920 edges, phone keeps the cookie; the mounted layout
at 1279 → 1280; a stored choice beats the default on each side and the
two sides stay apart; a raw legacy `os:pref:console.sidebar.keepOpen`
record `{"value":"on","v":1}` reads as expanded on a narrow window.
- `layout/__tests__/UnifiedSidebar.recentThisApp-36112.test.tsx`: Recent
lists only this app's entries (other app, Setup, Studio item left out),
its five are this app's newest five, no group when this app has none,
and the phone drawer still lists every app's.

Rewritten (they encoded 1416 or the keep-open switch):

- `hooks/__tests__/useResponsiveSidebar.test.tsx`: defaults at 1279 /
1280, no choice recorded by a default, each side's state across the
threshold, wide collapse kept, narrow close kept as the narrow choice, a
narrow choice turned collapsed elsewhere, phone untouched.
- `layout/__tests__/ConsoleLayout.sidebarFirstFrame-28077.test.tsx`:
1280 → 1279 for the collapsed first frame; new cases for 1280 expanded
against a collapsed cookie, a wide collapse, and a narrow expand.
- `layout/__tests__/consoleSidebarRail.width-27593.test.tsx`: no longer
pins the derived 1416; pins 1280, the 256 px width (F2) and the 304 /
560 cost.
- `layout/__tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx`:
narrow width 1280 → 1024; the trigger-floats cases now float with ⌘B;
the "Keep sidebar open" cases are replaced by "the expand button docks
(wide and narrow), a reload keeps it, the collapse button takes it
back", the legacy keep-open read, and "the expand button docks even when
React renders between the capture phase and the trigger's handler" (the
old render-between case, now for the dock).
- `layout/__tests__/UnifiedSidebar.railOverlay-27593.test.tsx`: 1280 /
1360 → 1024; floats with ⌘B; the three "Keep sidebar open" cases and the
Esc-on-keep-open case are replaced by the expand-button dock and the
narrow/wide choices kept apart (objectstack#28079).
- `examples/app-showcase/e2e/detail-shapes.spec.ts` (see above).

Retired: none as a file. The removed cases are the ones that drove the
retired control; each behaviour they pinned that still exists (float,
Esc, focus, fold on navigation, choices kept apart) is pinned in the
rewritten files above.

<details><summary>Local runs (head ce00125)</summary>

All at head `ce00125fc`, under the shared verify lock unless marked
lock-free.

- `pnpm --filter @object-ui/app-shell type-check && pnpm --filter
@object-ui/i18n test && vitest run` the seven changed or new app-shell
test files: VERDICT command-exit 0; i18n `Test Files 105 passed (105)`,
`Tests 1962 passed | 13 skipped`; app-shell `Test Files 7 passed (7)`,
`Tests 71 passed (71)`.
- Earlier, at `114ccd7a7` (source identical to the head; the last commit
adds one import line to a test): `vitest run` app-shell `layout`,
`hooks`, `chrome`: `Test Files 279 passed (279)`, `Tests 2217 passed
(2217)`.
- Derived gate families (`dispatch-gates.mjs`, 65 derived, `--ran`
reconciliation: 65 run, 0 unrun): 62 lock-free families re-run at the
head, exit 0 each; `check:type-check-debt` exit 0 under the lock;
`vitest run scripts/` under `ui/` exit 0 under the lock (the lock-free
attempt was SIGKILLed by the box's memory limit, not a red);
`check:test-source-alias` red on the first run, fixed by `ce00125fc` and
green since.
- NOT MEASURED: `check:dual-build-cjs-loads` exit 3, PREREQUISITE NOT
MET (needs a full `pnpm build` of 36 framework packages this PR does not
touch); CI runs it.
- Declared to CI: `test:repo` and the full lint farm.

</details>

<details><summary>Ablations (one per leg; each mutation committed-first,
landed on disk by `scripts/ablation-replace.mjs`, restored to HEAD and
proven by blob hash)</summary>

Six legs, one lock hold (VERDICT command-exit 0), at head `ce00125fc`.
Each leg red, each restored with `git diff HEAD` empty and the file's
blob equal to HEAD's.

| Leg | Mutation | Suite | Result |
|:---|:---|:---|:---|
| L1 | threshold 1280 back to 1416 | `consoleSidebarRail.docking-36112`
| 4 failed / 8 |
| L2 | the narrow choice (legacy keep-open) read always false |
`consoleSidebarRail.docking-36112` | 2 failed / 8 |
| L3 | the expand press no longer sets the narrow choice |
`UnifiedSidebar.hiddenCollapse-35062` | 2 failed / 20 |
| L4 | Recent filter removed | `UnifiedSidebar.recentThisApp-36112` | 3
failed / 4 |
| L5 | Recent filter applied on the phone too |
`UnifiedSidebar.recentThisApp-36112` | 1 failed / 4 |
| L6 | a narrow-window close no longer kept | `useResponsiveSidebar` | 1
failed / 7 |

The suites import the edited modules by relative path (source), so no
build sits between the mutation and the run.

</details>

## Acceptance notes

Card acceptance, walked against main after PR A (a5a5312) and this
branch:

| Card acceptance line | Met by |
|:---|:---|
| Desktop app page: no top bar; sidebar on the left, content beside it,
not covered | PR A (no top bar); this PR (docked by default from 1280
px; below it collapsed by default, as ruled) |
| Collapse: sidebar disappears, content widens, expand button top-left;
left edge slides it out; still collapsed after refresh | PR A (collapse,
expand button, edge); this PR (the expand button docks instead of
floating; the choice is kept on both sides of 1280) |
| App name opens only the app list (search when many) and 「添加应用」; Setup
for admins only; switching works | PR A |
| Sidebar search works, shortcut works | PR A |
| Avatar at the bottom; its menu has switch organization and sign out |
PR A |
| Bell beside search; panel and count as before | PR A |
| Impersonation banner at the content top, exit works; lost-connection
notice | PR A |
| List, record, dashboard, report, custom page all carry the
page-actions group | objectstack-ai#36111 and PR A (always on) |
| Phone width unchanged | PR A; this PR leaves the phone drawer's Recent
unfiltered and the phone sidebar state untouched |
| Setup and Account use the new shell, menus unchanged | PR A |
| Onboarding walks through | PR A (the walkthrough component renders
nothing on main; no step points at the top bar) |
| PR body: before/after desktop screenshots (expanded, collapsed, app
menu, banner) and the changed components and rewritten tests | this PR
(before/after shots at 1440, 1280 and 1279 (expanded, collapsed, app
menu open, the 1279 expand press, and a reload after it), saved with the
seat's evidence; the banner was not shot, see Acceptance notes;
components and tests above) |
| Item 2: 「保持侧边栏展开」 removed | this PR |
| Item 5: Recent lists this app's items | this PR |

The PR A rows are read from PR A's body and main's code, not re-driven
here except where the screenshots show them.

Browser evidence (showcase booted on a private port, console served by
Vite from this branch; the before set from the same server with the
three sidebar files and the English pack swapped back to the merge base,
then restored to HEAD and checked by blob hash):

- Fresh profile, 1440 px: expanded, before and after. 1280 px: collapsed
before, expanded after.
- 1279 px: collapsed on load in both. Pressing the expand button:
before, the menu floats over the page with the 「Keep sidebar open」 row
at its foot, and a reload brings back the collapsed state; after, the
sidebar docks beside the page (content reflows), and a reload keeps it
docked.
- App menu open at 1440: same in both (Showcase, Setup, Add app).
- The impersonation banner was not shot: it needs a second user to
impersonate on a fresh database, and its surface is PR A's and is not
changed here.
- Recent was not shot: a fresh profile has no recent items; the filter
is pinned by `UnifiedSidebar.recentThisApp-36112` and its ablations L4
and L5.

Reading taken where the ruling is literal, carried as an open question
in the report:

- The expand button's tooltip names ⌘B (it draws the chord the sidebar
primitive answers to), but with ⌘B kept unchanged as ruled, ⌘B over a
collapsed sidebar floats the menu while a press on the button docks it.
Before this PR both floated. Either ⌘B docks too, or the tooltip stops
naming it; this PR does neither and leaves it to the seat.

Out of scope, noted not filed: none.

Overlap: `overlap-check.mjs` exit 1 against objectstack-ai#34223 (a draft from
2026-11-19 that already conflicts with main on another file) in
`docs/qa/platform-checklist/areas/platform-core.json`; not merged
around, per the order. objectstack-ai#36234 and objectstack-ai#36208 share the i18n packs and merge
cleanly.

## Verification

Read first (riskiest first):

1. `ui/packages/app-shell/src/layout/consoleSidebarRail.ts`, the capture
listener in `useConsoleSidebarRailPanel` (expand docks; ⌘B floats) and
`startingSidebarOpen`.
2. `ui/packages/app-shell/src/hooks/useResponsiveSidebar.ts`, the layout
effect (which transitions write which choice).
3. `ui/packages/app-shell/src/layout/UnifiedSidebar.tsx`, the
`recentItems` filter.

Two-minute check: in a fresh browser profile open any app at a 1280 px
window: the sidebar is expanded beside the page. Resize to 1279 px: it
collapses and the page header shows the expand button; press it: the
sidebar docks, and a reload keeps it docked.

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FEkQ5oK4fFfnLADcipbEeT

---------

Co-authored-by: Claude <noreply@anthropic.com>
247257110 pushed a commit to 247257110/objectstack that referenced this pull request Nov 23, 2026
… button does (objectstack-ai#36391)

<!-- claude-projects-attribution: {"github_login":"zhuangjianguo"} -->
_Requested by **Steedos** · [project
thread](https://claude.ai/code/project/chan_018ETKaNwMZCNRYD7D8Q9Ubb?thread=cmsg_018ETKaNwMZCNRYD7D8Q9UbbUq2j5tRRVo3TVY3wcS1Fdg)_
Fixes objectstack-ai#36347

repo:objectstack#7 · zhuangjianguo · session_01QsR2jV3scu6UYPb42n5okQ

Clause-②: no
Metadata-protocol: none
Ruling-ref: 7074574380

## 维护者速读

- 用户能看到什么变化:控制台在 768 像素宽及以上,按 ⌘B / Ctrl+B
与点侧边栏的收起/展开按钮完全一样(展开时收起,收起或临时浮出时放回页面旁边并记住),临时浮出只剩鼠标移到窗口左边缘这一种方式。
- 为什么做:落实维护者对侧边栏快捷键的裁决(⌘B 与按钮一样固定展开),属于「去掉桌面顶栏」这次侧边栏改版的收尾。
- 出错会怎样:最坏情况是按快捷键时侧边栏没有按预期收起或放回,用户仍可点按钮恢复;改动只在界面层,可直接撤回。
- 要你做什么:无

## What changes

Ruling 7074574380 on objectstack-ai#36112 (B, 「B ⌘B 和按钮一样固定展开」): ⌘B / Ctrl+B does what
a press on the sidebar's expand / collapse button does. This replaces
the words "⌘B unchanged" of ruling 7069868269 (F1, on objectstack-ai#36112) and the
shortcut half of "on the top-bar trigger (and its shortcut)" in ruling
6973617688 on objectstack-ai#35062; every other line of both stands.

- **One action, one remembered state.** `useConsoleSidebarRailPanel`
(`consoleSidebarRail.ts`) now answers the chord itself from 768 px up,
with the button's own action: the step a trigger click takes in the
capture phase (`beforeButtonToggle`: on a narrow window, keep the
narrow-window choice expanded before a dock) followed by the provider's
`toggleSidebar`, the same call the trigger makes. So the key and the
button write the same choices by construction: the wide-window choice,
the narrow-window choice and the `sidebar_state` cookie. While the menu
floats, the chord docks it where it is (`dockFloat`), as the ruling's
execution section says; focus does not move.
- **Exactly one listener runs.** Measured before the change: on a
hand-collapsed wide window two listeners ran on one key press (the
console's window-capture listener noted "this toggle floats", then the
primitive's window listener toggled); in every other state only the
primitive's listener ran. Now the console's listener sits on the
`document` in the bubble phase, after every element listener on the way
(an editor that takes the chord still stops it there first), and stops
propagation so the primitive's listener on the `window` does not toggle
a second time. The pin "one ⌘B is one press" holds both halves: nothing
reaches the window from 768 px up, and on a phone the primitive's
listener still opens the drawer.
- **`@object-ui/components` is not changed.** `ui/sidebar.tsx` (a synced
Shadcn primitive, a no-touch zone) keeps its default listener for every
other host; the console overrides it from its own layer instead of
changing the published default. The phone, and a sidebar with the
console's collapse off, keep the primitive's toggle.
- **The float comes only from the left edge.** The `toggleFloats` note,
the `command` opener and the focus-into-float branch it fed are gone
(their only producer was ⌘B). Unchanged: the edge's hover and press
float, Esc / a chosen entry / a press outside fold a float, the phone,
the 1280 px threshold, the width, the head's collapse button inside a
float (it folds the float, as before).
- **Text that follows the ruling.** The tooltip chord now reads the
chord the console answers (`SIDEBAR_TOGGLE_CHORD`, one constant for the
tooltip, the shortcuts dialog's advertisement and the matcher); comments
in `consoleSidebarRail.ts`, `useResponsiveSidebar.ts`,
`LocalizedSidebarTrigger.tsx`, `ConsoleLayout.tsx`,
`advertisedShortcuts.ts` and `UnifiedSidebar.tsx`; step 3 of
`platform-core.builtin-apps-nav-render` (revision 19); a changeset.

Read first, by risk:
1. `ui/packages/app-shell/src/layout/consoleSidebarRail.ts` — the
document keydown effect and `dockFloat` (the stopPropagation is the
load-bearing line).
2.
`ui/packages/app-shell/src/layout/__tests__/UnifiedSidebar.hiddenCollapse-35062.test.tsx`
— the new top-level describe named for objectstack-ai#36347.
3. `docs/qa/platform-checklist/areas/platform-core.json` — step 3
wording and the revision 19 history row.

## Tests

- Flipped pins: the ⌘B cases of
`UnifiedSidebar.hiddenCollapse-35062.test.tsx` and
`UnifiedSidebar.railOverlay-27593.test.tsx` that floated with ⌘B now
float from the left edge; the keyboard walk of a collapsed group docks
with ⌘B and stays docked after Enter.
`UnifiedSidebar.recentThisApp-36112.test.tsx` fires its phone ⌘B where a
real key press lands (the body), not on the window.
- New pins (top-level describe in the shared harness file, per ruling
record 6583487846): ⌘B collapses and docks at 1600 px and at 1024 px
with a reload after each; on either window, from collapsed and from
docked, ⌘B leaves exactly what a button press leaves (state, rail, both
choices, cookie); ⌘B docks a float on both sides of the threshold, moves
no focus, and a reload keeps it; one key press is one press (the window
never sees the chord from 768 px up; on a phone the drawer still opens).

<details><summary>Readings at e374f63</summary>

- `vitest run` of the three sidebar files: `Test Files 3 passed (3)`,
`Tests 47 passed (47)`.
- `vitest run packages/app-shell/src/layout
packages/app-shell/src/chrome packages/app-shell/src/hooks`: `Test Files
280 passed (280)`, `Tests 2229 passed (2229)` (the shortcuts dialog's
wired-only pin and the trigger's app-bar pin included).
- `pnpm --filter @object-ui/app-shell run type-check` (both tsconfigs,
tests included): VERDICT command-exit 0.
- Ablation (the key takes the old path, the provider's toggle):
`ablation-replace` anchor 1 → 0, blob a8a2074 → b3a7f2a5c15a;
`Tests 5 failed | 38 passed (43)` — red: the 1024 px dock, the
button-equals-key comparison, the float dock, the one-press pin, the
keyboard group walk; restore: blob == HEAD (a8a2074), `git diff
HEAD` empty. The 1600 px dock and collapse stay green under the
ablation, as expected: there the provider's toggle alone already docks
and collapses.

</details>

## Acceptance notes

- The ruling's execution reads "in every state ⌘B equals a press on the
button" and "while the menu floats, ⌘B docks it". In a float the page
header's expand button is not drawn (it is drawn only while the sidebar
is collapsed), and the one button shown is the float's own head collapse
button, which folds the float as before. This PR follows the ruling's
execution line for the key and leaves that button unchanged.
- `platform-core.keyboard-shortcut-surface`'s source note still names
`ui/sidebar.tsx` as the ⌘B handler; from 768 px up the console's handler
answers now. Its steps ("⌘B and Ctrl+B toggle the sidebar") stay true;
the note is outside this claim's file surface, so it is left for the
next edit of that item.
- `node scripts/pm/overlap-check.mjs`: origin/main merges cleanly;
objectstack-ai#34223 (stale, last updated 2026-11-19) conflicts on
`platform-core.json` in the same item, and already conflicts with
origin/main there.

## Verification

Two minutes: in the console at 1440 px, press ⌘B (Ctrl+B): the sidebar
collapses; press it again: it comes back beside the page; reload: it
stays there. Narrow the window below 1280 px and press ⌘B: the collapsed
sidebar comes back beside the page instead of floating. Rest the pointer
on the left edge of a collapsed sidebar: the menu floats; press ⌘B: it
stays, docked.

Gates: the local derived subset and its readings are in the os-dev
report on objectstack-ai#36347; every family CI runs is read from this PR's
check-runs.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ

Superseded by #36975: the same change, merged with origin/main and carried to a branch this session can push (this head branch belongs to the clocked-out domain:server#5 session). The maintainer handed card #33933 to this seat; claim comment 7131785382 on #33933 records the order and the reading that lifts the park on objectstack-ai/cloud#4569. Closing this draft; it can be reopened if #36975 is withdrawn.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file 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

1 participant