Repository navigation
fix(settings)!: offer the knowledge settings only where the knowledge service is mounted - #34223
objectstack-fleet[bot] wants to merge 9 commits into
Conversation
… 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
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
…nswer Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
📓 Docs Drift CheckThis PR changes 3 package(s): 23 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 7 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 13 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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
|
…dge entry Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract-review-claim: session_01L9qibxTeW8xHnxoHxWNHWW · head ba9ec45 · 2026-11-16T04:02Z |
|
review#2 · os-tesla · session_01L9qibxTeW8xHnxoHxWNHWW Contract reviewServed-tier: 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
② Semver level
CI completed before posting: 72 check-runs on this head, 61 success, 11 skipped, none failed. ③ Boundary flags
④ Design judgmentThe 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) — 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 No must-fix. Should-fix: S1, S2. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Recorded 2026-11-19T19:34Z. Pre-landing notice for this PR's next owner: card #33933 is |
…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>
…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>
… 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>
|
repo:cloud#1 · os-warren · session_01JQwxbZWBDHDjKnpVLP5aCQ Superseded by #36975: the same change, merged with Generated by Claude Code |
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/knowledgeandPOST /api/settings/knowledge/testanswer404 UNKNOWN_NAMESPACE; a write of anai.embedder_*key answers400 UNKNOWN_KEY;POST /api/settings/ai/test_embedderanswers400 SETTINGS_ACTION_FAILED(no handler registered); the hub list dropsknowledgeand the Setup sidebar dropsnav_settings_knowledge.Metadata-protocol: none
Skills-docs: none — no skill under
skills/**teaches the knowledge settings page or theai.embedder_*keys;skills/objectstack-aiteaches wiringKnowledgeServicePlugin, 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
KnowledgeServicePluginis mounted besideSettingsServicePlugin. Storedknowledge.*/ai.embedder_*rows are untouched. The changeset carries the ADR-0087 not-required marker (no-migration-prescription).维护者速读
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 个用例全绿(挂载有、不挂载无)。ai.embedder_*读取。What changes
@objectstack/service-settingsbuiltinSettingsManifestsdropsknowledgeSettingsManifest(10 → 9).aiSettingsManifestdrops its embedder section; the section is exported asaiEmbedderSettingsSpecifiers, withwithAiEmbedderSection(manifest)to join it (idempotent).actionHandlersmap no longer registersknowledge.testorai.test_embedder.knowledgeSettingsManifest,knowledgeTestActionHandler,aiSettingsManifest,aiEmbedderSettingsSpecifiers,withAiEmbedderSection,aiTestEmbedderActionHandler.settings.ai.descriptionno longer names the knowledge base, in all 11 bundled locales.@objectstack/service-knowledgecontributeKnowledgeSettings(ctx, version), called fromKnowledgeServicePlugin.init(). It registers theknowledgemanifest andknowledge.test, and joins the embedder section plusai.test_embedderto theainamespace. It joins them only when the servedaipage is the bundled one, or already declares the embedder keys. A host's ownaimanifest is left untouched, and the plugin logs a warning saying why. It also registers thenav_settings_knowledgeSetup entry as anavigationContributionsbundle through themanifestservice.optionalDependenciesnamescom.objectstack.service.settings(literal, ADR-0116), so "no settings service" at init is a fact of the composition.@objectstack/service-settings; devDependency@objectstack/platform-objectsfor the merged-Setup-tree test.@objectstack/platform-objects: the staticnav_settings_knowledgeentry leavesSETUP_NAV_CONTRIBUTIONS. Its label stays keyed in the Setup bundles.docs/qa/platform-checklist/areas/platform-core.json:builtin-apps-nav-render(rev 16) andsettings-hub-roundtrip(rev 9) restated for 9 builtins and the knowledge page's new source.Tests
service-settings/src/knowledge-settings-default-absent.pin.test.tspins the default boot (8 cases, refusals by status +error.code):knowledgein the aggregate or the hub list;GET knowledgeanswers 404UNKNOWN_NAMESPACE;aipage;PUT ai {embedder_provider}answers 400UNKNOWN_KEY;POST ai/test_embedderanswers 400SETTINGS_ACTION_FAILED, judged against the hub's own no-handler answer, andPOST knowledge/testanswers 404UNKNOWN_NAMESPACE;service-knowledge/src/__tests__/knowledge-settings-contribution.test.tsuses a LiteKernel withKnowledgeServicePlugindeliberatelyused BEFORESettingsServicePlugin, against a bare control kernel (7 cases):nav_settings_knowledgeappears exactly once with the service and never without it;settings-default-action-handlers.pin.test.ts.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.tsandsettings-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
KnowledgeServicePlugin. The test kernel above stands in for one, as ruled;examples/app-todois unchanged.ai.embedder_*without it.UNKNOWN_NAMESPACE/UNKNOWN_KEY(the route envelope's spelling of the service'sUnknownNamespaceError/UnknownKeyError).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 forservice-settings,typesandplatform-objects, ascheck:test-source-aliasrequires.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.shand quote the lock'sVERDICT command-exit 0line. Final head isf27aef7db8:1b210ee4f6plus a merge oforigin/main.Package tests and typecheck on the final head f27aef7
@objectstack/service-settingstest: Test Files 76 passed (76), Tests 1484 passed (1484); typecheck exit 0.@objectstack/service-knowledgetest: Test Files 5 passed (5), Tests 56 passed (56); typecheck exit 0.@objectstack/platform-objectstest: Test Files 122 passed (122), Tests 2007 passed (2007).334f6da447:@objectstack/plugin-auth: the 5 files that readbuiltinSettingsManifests, Tests 133 passed (133).@objectstack/spec:settings-manifest.test.ts, Tests 86 passed (86).@objectstack/platform-objectstypecheck: exit 0.Dogfood battery (narrowing): green at 1b210ee
pnpm --filter '@objectstack/dogfood^...' build(exit 0). Thenpnpm --filter @objectstack/dogfood testunder the lock, with no shard and no path: Test Files 467 passed, 3 skipped (470); Tests 3962 passed, 42 skipped (4004); exit 0.origin/main, which brings main's own commits; CI runs the battery on the merge.driver-turso, because a dependency arrived with a merge beforepnpm 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.
builtinSettingsManifests: red, 5 failed.GET knowledge404, both test-button doors.aipage: red, 4 failed (no embedder key/button;PUT embedder_provider400; population; handler reach).nav_settings_knowledgeback: red in the absent pin (stock nav) and in the knowledge suite (the merged tree holds the entry twice when mounted, once when bare).enAI description naming the knowledge base again: red, 1 failed (locale description).actionHandlersregisteringai.test_embedderagain:contributeKnowledgeSettingsnot called: red, 6 of 7 failed (only the bare-hub non-vacuity case stays green).com.objectstack.service.settingsdropped fromoptionalDependencies: red, 6 of 7 failed.useorder alone does not put settings first.ablation-replace: ok restored: blob == HEAD, and_DIFF_HEAD_LINES=0at the end.Gates
node scripts/pm/dispatch-gates.mjs --commandsat1b210ee4f6: 90 families, all exit 0.--ran: 90 derived, 90 run, 0 NOT-MEASURED (a derived zero).f27aef7db8(91 families,check:adr-anchorsadded):check:i18nfirst read exit 1 on aplatform-objectsdist built before the merge. Afterpnpm --filter '@objectstack/platform-objects...' buildit 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-configon the changed.tsfiles: exit 0.git merge-tree --write-tree origin/main HEAD: exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01QsR2jTEivi2wogPpeo3xd5