Repository navigation
Commit 7fbfd8f
feat(studio): the Studio menu draws no datasource row, and ADR-0084 writes it as a no-row entry (#37945)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoCsxJcMyC43e5vqVhNB7PYu)_
Fixes #37920
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户能看到什么变化:App Studio 左侧菜单「平台」组里不再有「数据源」这一行,⌘K 搜索面板里也没有了;数据源只在「设置 ›
集成」里管。「全部类型」目录仍列数据源,点开去设置。
- 为什么做:App Studio 改版专题里你的决定 12:连接是绑在环境上的配置,归设置管,Studio 只开发软件包。
- 出错会怎样:只少画菜单里的一行,不动数据、不动设置页,直接撤回即可恢复。
- 要你做什么:这个 PR 改了受管文档(架构决策记录 ADR-0084 的类型表一行),审核通过后请你或 os-zhuang 批准合并。
## What changes
- **The menu draws no `datasource` row, in any scope.**
`studioMenuPlacement.ts` drops the row and adds
`STUDIO_MENU_NO_ROW_TYPES = {'datasource'}`; `buildStudioMenu` skips a
type in that set before it places anything, on a package, on `~org` and
on `~all`. Removing the placement row alone would not do it: the menu's
own rule draws a type with no row in 高级 at the end of its group ("never
invisible", objectstack#37201), so the no-row set is the exception that
rule now names.
- **Retired, because they served only that row:** the `datasource`
branch of `typeEntryPath` (it routed the row to Setup's Datasources
page) with its `SETUP_DATASOURCES_PATH` import, and the row's `Database`
icon in `StudioMenu.tsx`.
- **The ⌘K palette follows.** It lists the menu's own entries
(`buildStudioMenu`), so its `type:datasource` entry goes too;
`StudioPaletteGroups.surfaceScope-36900.test.tsx` is re-pointed.
- **What stays, and why:** `SETUP_DATASOURCES_PATH` (the directory tile
and the area's `datasource/*` redirect read it);
`STUDIO_PALETTE_ITEMLESS_TYPES` (the palette's item reads still run over
the directory-scoped types, which include `datasource`, so it still
keeps the palette from reading datasource items; only its docblock
changes); the type's `system` registration; `HIDDEN_DIRECTORY_TYPES`
(untouched).
- **ADR-0084, the type → group table:** the `datasource` row becomes a
no-row entry like `field`'s (`| — |` for Order and Tier, last in its
group), `external_catalog` moves from 7 to 6, and one dated note under
the table names this card. 平台 Platform still counts 7 table rows (six
with an order, and `datasource`), so no count changes. Drafted by an
isolated contract-review-tier subagent at effort xhigh. The stale
whole-table counts and the `knowledge_source` row are #37740's, not this
PR's.
### Card question (a): does 全部类型 still list `datasource`?
Yes. Read on the booted showcase (this branch):
`/studio/com.example.showcase/metadata` draws a Datasource tile linking
to `/apps/setup/metadata/datasource` (`DirectoryPage.tsx`, `href={host
&& e.type === 'datasource' ? SETUP_DATASOURCES_PATH : undefined}`),
because `scopeDirectoryEntries` hides only `field`, `package` and
`form`. This matches ADR-0084: the amendment's sentence is "**The menu
draws no `datasource` row**", about the menu alone; the directory keeps
one entry for the type in 平台 Platform (one type, one group), and the
tile leads to Setup, so a connection is still managed in Setup alone and
nowhere in Studio. No mismatch to report; the directory is unchanged, as
the claim requires.
## Tests
- `studioMenuModel.test.ts`: a new block "the menu draws no datasource
row" — on a package, `~org` and `~all`, with `setupDirectory` true and
false, a served, counted, settled `datasource` draws no entry and no
entry leads to Setup's Datasources page, while `api` and
`external_catalog` beside it do; a package whose only `system` type is
`datasource` draws 平台 Platform with diagnostics alone, in the fold; on
`~org`/`~all` it leaves no 平台 Platform group. The package-scope keys
test is rewritten on purpose (`system: ['diagnostics']`), marked in a
comment.
- `studioMenuPlacement.test.ts`: the registry pin reads "every listable
type has one row, unless the menu draws no row for it"; a new pin says
`datasource` is registered `system`, the directory lists it, and it has
no row; the 高级 order literal drops it; a new 平台 Platform group pin; the
ADR pin passes against the table as this PR leaves it.
- Local, from `ui/`, under the verify lock: `npx vitest run
packages/app-shell/src/views/studio-design/` — `Test Files 280 passed
(280)`, `Tests 2322 passed (2322)`, `VERDICT command-exit 0`.
`studioMenuPlacement.test.ts` alone on the final ADR text: 19 of 19,
`VERDICT command-exit 0`.
## Acceptance notes
- Two ADR-0084 sentences outside the table become dated history rather
than live text, left as is (the card says no other ADR text): line ~463,
"`datasource`'s and `form`'s still wait for their changes", and the
2026-11-25 silent item 1's order "`translation` · `api` · `datasource` ·
`external_catalog`". Both now point at, or are superseded by, the new
note under the table. carrier: none — noted, not filed.
## Verification
Read first, by risk:
1. `ui/packages/app-shell/src/views/studio-design/studioMenuModel.ts`,
`buildStudioMenu`: the one `continue` on `STUDIO_MENU_NO_ROW_TYPES`.
2. `docs/adr/0084-application-builder-information-architecture.md`, the
平台 Platform rows and the new note.
3. `studioMenuPlacement.test.ts`: `LISTABLE_TYPES` now excludes the
no-row set.
Two-minute check: `cd ui && npx vitest run
packages/app-shell/src/views/studio-design/studioMenuPlacement.test.ts
packages/app-shell/src/views/studio-design/studioMenuModel.test.ts` —
both pass.
Browser (showcase booted from this branch, `ui/` console over HMR,
seeded admin): the showcase holds two datasources (`default`,
`showcase_external`; `GET /api/v1/meta/datasource` 200). On
`/studio/com.example.showcase/metadata/object` with the 高级 fold open, 平台
Platform reads Documentation 8 · Documentation Book 1 · Email Template 1
· API Endpoint 3 · Diagnostics, and no Datasources row; no other group
lists it either. The screenshot is kept with the project thread
(`card-37920/studio-menu-platform.png`).
<details><summary>Local gates</summary>
Derived with `node scripts/pm/dispatch-gates.mjs --commands` at
a45fff4; reconciliation: "48 derived famil(ies) accounted for — 48 run,
0 NOT-MEASURED (a DERIVED zero)".
- `node scripts/check-adr-0087-registration.mjs --base origin/main` ::
exit 0
- `node scripts/check-adr-0087-registration.mjs --self-test` :: exit 0
- `node scripts/check-adr-links.mjs` :: exit 0
- `node scripts/check-adr-links.mjs --self-test` :: exit 0
- `node scripts/check-changeset-no-major.mjs --base origin/main` :: exit
0
- `node scripts/check-closing-keyword-parity.mjs` :: exit 0
- `node scripts/check-closing-keyword-parity.mjs --self-test` :: exit 0
- `node scripts/check-comment-mask-corpus.mjs` :: exit 0
- `node scripts/check-empty-changeset.mjs --base origin/main` :: exit 0
- `node scripts/check-empty-changeset.mjs --self-test` :: exit 0
- `node scripts/check-sdui-manifest.mjs` :: exit 0
- `node scripts/check-sdui-manifest.mjs --self-test` :: exit 0
- `node scripts/ci/plan-test-core-shards.mjs --self-test` :: exit 0
- `node scripts/ci/snapshot-next.mjs --self-test` :: exit 0
- `node scripts/pm/check-governed-queue-guard.mjs --self-test` :: exit 0
- `node scripts/pm/release-rehearsal-clone.mjs --self-test` :: exit 0
- `node scripts/release-pending-publish.mjs --self-test` :: exit 0
- `pnpm --filter @objectstack/lint run check:doc-formula-expressions` ::
exit 0
- `pnpm --filter @objectstack/spec run check:duration-unit-keys` :: exit
0
- `pnpm check:adr-anchors` :: exit 0
- `pnpm check:adr-index` :: exit 0
- `pnpm check:adr-symbol-anchors` :: exit 0
- `pnpm check:changeset-gate-self-tests` :: exit 0
- `pnpm check:ci-filter-parity` :: exit 0
- `pnpm check:closed-ceremony-text` :: exit 0
- `pnpm check:cross-package-test-inputs` :: exit 0
- `pnpm check:dispatcher-error-vocabulary` :: exit 0
- `pnpm check:doc-authoring` :: exit 0
- `pnpm check:driver-memory-census` :: exit 0
- `pnpm check:engine-double-contract` :: exit 0
- `pnpm check:gitlink-declared` :: exit 0
- `pnpm check:nul-bytes` :: exit 0
- `pnpm check:pm-governed-merges` :: exit 0
- `pnpm check:pm-prior-rulings` :: exit 0
- `pnpm check:published-files` :: exit 0
- `pnpm check:query-options-erasure` :: exit 0
- `pnpm check:refd-timer-probe` :: exit 0
- `pnpm check:registry-log-declared` :: exit 0
- `pnpm check:rest-log-spy-declared` :: exit 0
- `pnpm check:skill-identifier-liveness` :: exit 0
- `pnpm check:test-source-alias` :: exit 0
- `pnpm check:tier-file-adoption` :: exit 0
- `pnpm check:type-check-coverage` :: exit 0
- `pnpm check:type-check-debt` :: exit 0
- `pnpm check:undeclared-dep-imports` :: exit 0
- `pnpm check:watch-hint-literal` :: exit 0
- `pnpm check:where-matcher` :: exit 0
- `pnpm --dir ui exec vitest run scripts/` :: exit 0
`node scripts/pm/overlap-check.mjs` at a45fff4: `VERDICT clean exit 0`
(origin/main f926dfa merges cleanly; #37927, which shares the ADR file,
merges cleanly).
</details>
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01L9qibwtMGwDL8KdXqqaLLT
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibwtMGwDL8KdXqqaLLT)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 73d0240 commit 7fbfd8f
9 files changed
Lines changed: 124 additions & 28 deletions
File tree
- .changeset
- docs/adr
- ui/packages/app-shell/src/views/studio-design
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
197 | | - | |
| 196 | + | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | 71 | | |
73 | 72 | | |
74 | 73 | | |
| |||
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | | - | |
194 | 192 | | |
195 | 193 | | |
196 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | | - | |
| 73 | + | |
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
76 | 79 | | |
77 | | - | |
78 | | - | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
133 | 180 | | |
134 | 181 | | |
135 | 182 | | |
| |||
210 | 257 | | |
211 | 258 | | |
212 | 259 | | |
213 | | - | |
| 260 | + | |
214 | 261 | | |
215 | 262 | | |
216 | 263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
177 | | - | |
178 | | - | |
179 | 178 | | |
180 | 179 | | |
181 | 180 | | |
| |||
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
| 190 | + | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | | - | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
53 | 67 | | |
| |||
66 | 80 | | |
67 | 81 | | |
68 | 82 | | |
69 | | - | |
| 83 | + | |
70 | 84 | | |
71 | 85 | | |
72 | 86 | | |
| |||
184 | 198 | | |
185 | 199 | | |
186 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
187 | 209 | | |
188 | 210 | | |
189 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
25 | 35 | | |
26 | 36 | | |
27 | 37 | | |
| |||
42 | 52 | | |
43 | 53 | | |
44 | 54 | | |
45 | | - | |
46 | | - | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
101 | 111 | | |
102 | 112 | | |
103 | 113 | | |
104 | | - | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| |||
112 | 121 | | |
113 | 122 | | |
114 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments