This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit 3eb3ec1
refactor(app-shell,types,data-objectstack)!: retire the toolbar-to-view write family and DataSource.updateViewConfig (objectui#12504) (#12586)
Fixes #12504
Clause-②: no (narrowing). A published `@object-ui/types` method and the
`@object-ui/data-objectstack` method behind it leave the contract, as
ruled (ruling `6203730732`, letter A). Nothing widens: no type, prop,
export or spec declaration is added.
The maintainer's ruling on objectui#12504 retires the console's
toolbar-to-view write family at once, with no window. Since
objectui#12418 and objectui#12474 the list toolbar's sort, column
layout, density and Hide Fields are each user's own list state
(`ui.list.OBJECT`), so the write had no caller. The explicit save
(`handleViewConfigSave` then `persistRuntimeMetadata`) is now the one
write path to the shared view, and it is unchanged.
## What changed
- **`@object-ui/app-shell`, `ObjectView.tsx`.** Removed
`persistViewPatch` with its debounce timers, pending-patch map and write
chain, `toolbarWriteInputs`, `buildPersistedViewBody`, the
`CONSOLE_MADE_TAB` mark and its guard, the `savedViewsRef` mirror that
only the writer read, the refusal toast, and the `setSystemCapabilities`
push effect. That effect existed only to feed the adapter gate on
`updateViewConfig`, and its own comment said so. The overlay READ path
is unchanged (`loadViewOverrides`, `sanitizeViewOverride`,
`narrowPersonalizationOverlay`), because rows earlier consoles wrote are
still at rest. Docblocks that described the writer as live now describe
it as retired. The same applies to the `viewIdentity.ts` docblock.
- **`@object-ui/types`.** `DataSource.updateViewConfig?` is removed. The
`listViewOverrides` docblock now names `createView` / `updateView` as
the writes that share its key space. The `onDensityChange` docblock in
`objectql.ts` no longer suggests the method.
- **`@object-ui/data-objectstack`.**
`ObjectStackAdapter.updateViewConfig` is removed, together with the gate
that only it read (see the next section). Docblocks that described its
caller are corrected: the overlay marker, `isPersonalizationOverlayRow`,
`VIEW_OVERLAY_OWNED_KEYS`, `listViewOverrides`, `listViews`, the
save-advisory seam and the factory. The marker, its readers and the
owned-key list stay, for the rows at rest.
- **`@object-ui/i18n`.** `console.objectView.viewConfigPermissionDenied`
leaves all ten packs. Its only producer was the retired toast.
- **Docblocks elsewhere, code unchanged.** These comments named the
retired path as live and now name the user's own list state:
`ObjectGrid.tsx` (three places), `ListView.tsx`, `useDensityMode.ts`
(its `@example`), `data-table.tsx` and `ConcurrentUpdateDialog.tsx`. The
`@example` ledger row in `scripts/check-doc-example-types.mjs` now names
the identifiers the example references. This is a data string only; the
row's codes are unchanged.
- **Docs.** `content/docs/utilities/data-objectstack.mdx` drops the
retired `systemCapabilities` factory option. Its member count, which the
change would have made false, is replaced by a pointer to the `Exclude`
expression that lists the members.
- **Published skill (governed).**
`skills/objectui/guides/data-integration.md` listed
`updateViewConfig?(...)` among the `DataSource` view members and told
agents to write a view through it. It now names it beside `saveView` as
a spelling that does not exist. This is its own commit (`6b510d14b0`),
so the seat can split it into a separate pull request. Readings: whole
file 514 lines before, 514 after. Whole package (the sum of every
`SKILL.md`, one file) 142 before, 142 after. The line count does not
grow.
- **Changeset.** `.changeset/12504-retire-view-write-family.md`: `minor`
for `@object-ui/types` and `@object-ui/data-objectstack`, with a
BREAKING paragraph naming `DataSource.updateViewConfig` and
`ObjectStackAdapter.updateViewConfig`. `patch` for app-shell, i18n,
plugin-grid, plugin-list, react, components, plugin-detail and console.
## Beyond the ruling's letter: the gate's public names (a judgement,
please review)
The ruling names `DataSource.updateViewConfig` and
`ObjectStackAdapter.updateViewConfig`. The method opened with a
capability gate, and that gate was published under five names that
nothing else reads: `ObjectStackAdapter.setSystemCapabilities`, the
`systemCapabilities` option of the constructor and of
`createObjectStackAdapter`, `VIEW_CONFIG_CAPABILITY`,
`ViewConfigPermissionDeniedError` and
`isViewConfigPermissionDeniedError`. Measured: the only thrower of the
error was `updateViewConfig`, and the only reader of the capabilities
was the private `maySetViewConfig`, which only `updateViewConfig`
called. The only caller of `setSystemCapabilities` was the `ObjectView`
effect retired above. In objectstack `origin/main` and hotcrm
`origin/main` there are zero hits for any of the five names.
Keeping them would leave a published setter and a constructor option
that do nothing, and an error class nothing throws. That is the
"declared but not honoured" shape the ruling's option C was refused for.
So they retire with the method, and the changeset's BREAKING paragraph
names each one. If the seat's contract review reads the letter narrowly,
the names can come back as their own decision. They live in commit
`b1708d8f6b` beside the method.
## Mechanism assumptions (PM's A1 to A4), measured on base `830eb1f2dd`
- **A1 holds.** A grep of `updateViewConfig` in `packages/*/src` and
`apps/*/src` found one call expression outside tests,
`dataSource.updateViewConfig?.(...)`. It sat inside `persistViewPatch`,
the retired family, with that function's guard read beside it. The other
hits by kind:
- declarations: the `DataSource` member and the adapter method;
- docblocks: in `ObjectView.tsx`, `viewIdentity.ts`, `data.ts`,
`objectql.ts`, `data-objectstack` `index.ts`, `ObjectGrid.tsx`,
`useDensityMode.ts` and `data-table.tsx`;
- tests: the family's pins and harnesses, plus two console probes that
list the name in a stub's method array (no call).
- **A2 holds, and it was wider than one member.** No types API-surface
or exports census pinned `updateViewConfig`. The one presence pin was
`adapterFactoryReturn.types.test.ts`, which asserted
`setSystemCapabilities` (type and runtime) and now asserts the remaining
eight members. The two console probes drop the name from their stub
lists. One addition to A2: an object literal annotated as `DataSource`
that carries the member is now refused as an unknown property. None
exists in this tree, and the type-check is green.
- **A3 holds.** The toast key had one producer, the `persistViewPatch`
catch. `check:i18n-keys`, `check:i18n-drift` and `check:i18n-dead-keys`
accept the removal. `objectView-config-keys-retired-4730.test.ts`
records the key as retired, the way the census expects: 123 retired
became 124, 104 surviving became 103, and the total of 227 is unchanged.
`de-quote-pairing-3876.test.ts` drops one matched pair (87 to 86).
- **A4.** 37 test files are touched:
- (a) 3 deleted, because they pinned only the family:
`ObjectView.viewConfigGate.test.ts`,
`ObjectView.densityInsideConfig-11625.test.ts` and
`viewConfigPermissionGate.test.ts`.
- (b) 33 edited where they mention the family. Write detectors were
re-pointed to the surviving doors (`meta.saveItem`, `updateView` /
`createView` spies). Rows that were written through the method are now
planted at rest in the shape the retired write stored. Firing controls
now use `createView`. Comments were corrected.
- (c) 1 re-pointed: the objectui#12474 census pin in
`ObjectView.overlayPatchOnly.test.ts`, whose `buildPersistedViewBody`
write cases retired with the function.
**Fork condition: not met.** There is no named caller of
`updateViewConfig` outside the retired family. objectstack `origin/main`
has 0 call expressions. Its hits are docblocks and test comments in
`packages/spec` and `packages/metadata-protocol`, a migration entry
string, and one QA checklist step (see Acceptance notes). hotcrm
`origin/main` has 0 hits. In objectui, `apps/*` has only the two stub
lists and `examples/*` has 0.
## Pins
- **Census, re-pointed to absence**
(`ObjectView.overlayPatchOnly.test.ts`, describe "objectui#12504 census
— the toolbar-to-view write family is retired"). It reads code with
comments stripped:
- `ObjectView.tsx` defines and reaches none of `persistViewPatch`,
`buildPersistedViewBody`, `toolbarWriteInputs`, `CONSOLE_MADE_TAB`,
`updateViewConfig`, `setSystemCapabilities`,
`isViewConfigPermissionDeniedError` or the toast key;
- `DataSource` declares no `updateViewConfig`, pinned off `data.ts` and
as a type that `type-check` reads;
- `ObjectStackAdapter.prototype` has no `updateViewConfig` and no
`setSystemCapabilities`, and the package exports none of the three gate
names. The same fact is also pinned as a type.
- **CONTROL**: the explicit save still writes through
`persistRuntimeMetadata('view', vid, buildViewConfigSaveBody(...))`.
This is the same census describe;
`ObjectView.userListState-12418.test.tsx` "the view editor's save still
writes /meta/view" is unchanged and green.
- **CONTROL**: a toolbar sort and a density / Hide Fields change land on
the user's `ui.list.OBJECT` row and write no view. This is the unchanged
`ObjectView.userListState-12418.test.tsx` and
`consoleListStateWall-12418.test.tsx` suites; the wall suite's own
CONTROL now writes through the real adapter's `createView`.
## Ablation (through objectstack `scripts/ablation-replace.mjs`, each
leg restored and proven)
- **Leg A**: the member is re-added to `DataSource` in `data.ts`. Anchor
1 to 0, blob `3b3996403088` to `1acc16bfed4b`. Predicted: only the
DataSource census case goes red. Observed: `Tests 1 failed | 14 passed
(15)`, the red being "`DataSource` declares no `updateViewConfig`
(@object-ui/types)". Restore: blob equals HEAD `3b3996403088`, and `git
diff HEAD` is empty.
- **Leg B**: an `updateViewConfig` method is re-added to
`ObjectStackAdapter`. Anchor 1 to 0, blob `1a202c973005` to
`b87a7a2f451f`. Predicted: the adapter census case and the
`viewOverlayMarker` "no overlay writer left" case go red. Observed:
`Tests 2 failed | 13 passed (15)`, exactly those two. Restore: blob
equals HEAD and the diff is empty.
- **Leg C** (the type-level half, read through the rebuilt `.d.ts`): the
Leg A mutation is held, and `@object-ui/types` is rebuilt (exit 0;
marker in `dist/data.d.ts`: 1). Then app-shell `tsc -p
tsconfig.test.json` exits 2 with exactly one error, TS2322 at the census
`Absent` assertion. Restore: blob equals HEAD and the diff is empty.
After a rebuild, the marker count in dist is 0.
- Baseline on the unmutated tree: `Tests 15 passed (15)`. Controls
stayed green in every leg.
## Local gates (at `3643cc1e6e`, the merge of `origin/main`
`3e09c1e8d5`)
- Dependency closure `pnpm --workspace-concurrency=2 --filter
'@object-ui/app-shell^...' build` under the verify lock: VERDICT
command-exit 0. The packages the gates read (app-shell, plugin-ai,
gantt, map, markdown, timeline, tree, cli) were built after it, and
plugin-list and app-shell were rebuilt after the merge.
- `type-check` of types, data-objectstack, app-shell, plugin-grid,
plugin-list, react, i18n, components, plugin-detail and console: all
`Done`, VERDICT command-exit 0. The app-shell, data-objectstack, react,
i18n, components, plugin-grid, plugin-list and plugin-detail scripts
compile their tests as well.
- Vitest union at `3643cc1e6e` under the lock: every `ObjectView*` and
`InterfaceListPage*` app-shell suite, `view-filter-fold.ratchet`,
`writeRefusalCensus-11583`, `consoleListStateWall-12418`,
`src/context/__tests__/`, four app-shell `__tests__` sweeps, the whole
of `packages/data-objectstack/` and `packages/i18n/`, every touched
plugin, components, types and console test, the readers of the skill
guide and the docs page, the `AFFORDANCE_GRANTS` census
(`affordanceGrantMap-12082`), and the edited gate's own suites. Result:
`Test Files 282 passed (282)`, `Tests 3794 passed | 13 skipped (3807)`,
VERDICT command-exit 0.
- These gates exit 0: `check:i18n-keys`, `check:i18n-drift`,
`check:i18n-dead-keys` (report), `check:i18n-designer-parity`,
`check:readme-exports`, `check:spec-symbols`,
`check:unreferenced-sources`, `check:metadata-write-doors`,
`check:control-bytes`, `check:new-line-citations` (0 new),
`check:test-path-roots`, the three `check:vi-mock-*`,
`check:skills-paths`, `check:skill-examples`, `check:doc-snippets`,
`check:doc-examples`, `check:doc-types`, `check:doc-json`,
`check:doc-fences`, `scripts/check-doc-links.mjs`,
`check:changeset-claims`, `check:pending-changeset-literals`,
`check-changeset-presence` ("57 source file(s) of 10 released package(s)
changed, and this change declares 1 changeset(s)"),
`check-changeset-no-major` and `check-changeset-fixed`.
- ESLint on the 55 changed TS files: 0 errors. `ObjectView.tsx` now
carries 182 warnings, against the 197 the objectui#12474 dev reported at
their head.
- `check-governed-queue-guard --test` on the diff: GOVERNED (one path,
`skills/**`).
## What the landing seat's browser reading should show
On a console over a served object list, as a session WITHOUT
`manage_metadata`:
1. Change the density, hide a field, sort by a header and drag a column
width. The network panel shows no `PUT /api/v1/meta/view/...` and no
error toast. Each change lands as a `sys_user_preference` write of the
user's `ui.list.OBJECT` row, and survives a reload.
2. As an admin, open "Edit view config" and Save. A `PUT` to
`/meta/view` is still sent, and the edit is visible to another user.
3. A view that already carries a personalization overlay row
(`_isOverride: true`, written by an earlier console) still shows that
row's density and columns. It does not appear as a saved view in the
switcher.
4. Nothing anywhere shows the old "View settings apply to everyone who
uses this view..." refusal toast.
## Acceptance notes
- **Not class a/b/c, noted, not filed.** objectstack still describes
objectui's `persistViewPatch` / `updateViewConfig` as the live overlay
writer in prose. The places are two docblocks in
`packages/spec/src/ui/view.zod.ts`, the string of the spec migration
entry `18.view-overlay-judged-by-viewkind-arm`, comments in
`view-metadata-schema.test.ts`, `view-overlay-viewkind-arm.test.ts` and
`metadata-protocol` `protocol.graft-folded-form-sections.test.ts`, and
the platform-checklist step in
`docs/qa/platform-checklist/areas/records-forms.json` that says "or the
persisted view override via dataSource.updateViewConfig". None of these
has a runtime effect, and they are outside this claim (objectstack
files). 承接者:无.
- **Not edited: ADR-0034** names `persistViewPatch`. It is a decision
record and a governed path. 承接者:无.
- **Pending changesets in the same release.**
`11625-density-inside-config`, `11642-toolbar-writes-compose` and
`11643-fallback-tab-session-only` describe the toolbar's view write,
which objectui#12418, objectui#12474 and this change moved away and then
retired. All are still pending (`pre.json` has consumed none), so they
publish beside this one. They are other cards' declarations and are not
edited here. 承接者:无.
- **The overlay read path now serves only rows at rest.** Nothing writes
a personalization overlay any more. Whether to migrate or retire those
rows (the marker, `narrowPersonalizationOverlay`,
`VIEW_OVERLAY_OWNED_KEYS`) is a separate question that no deployment
measurement here informs. 承接者:无.
- `ListView.tsx`'s comment on the forwarded `onColumnStateChange` still
says a parent persists "alongside the view definition". It does not name
the retired method, and objectui#12474's report already noted it. 承接者:无.
- **Repaired in passing, in files this change touches:** the cross-file
line addresses in `gridNonAuthorKeys.test.tsx`'s producer strings, in
`ObjectGrid.tsx`'s columnState docblock and in the `InterfaceListPage`
overlay test's docblock. All are now cited by symbol.
## 维护者速读(草稿)
### 改了什么
控制台列表工具栏里"把改动写进共享视图"的整条代码路径删除了。对外发布的数据源接口去掉了 `updateViewConfig`
方法。只为这个方法服务的权限门接口(5 个公开名字)和一条报错提示文案也一起删除了。发布给客户 AI 的技能文档同步去掉了这个方法。
### 为什么改
自 objectui#12418 / objectui#12474
起,排序、列宽、行高、隐藏字段都已是每个用户自己的列表状态,这条写入路径已无人调用。您在 objectui#12504 上裁定
A:整组立即退役,不留过渡窗口。共享视图从此只有一条写入路径:视图编辑器的显式保存。
### 风险与代价(含回滚)
- 外部若有代码调用 `updateViewConfig`,或引用被删的权限门名字,升级后会编译失败。changeset 已写明
BREAKING,版本号按约定仍为 minor。仓内、objectstack、hotcrm 实测零调用方。
- 权限门的 5 个名字超出了裁决原文的字面范围。它们只为这个方法服务,留下会变成"声明了却不生效"的空接口,席位复核时请确认。
- 旧版控制台已写下的个性化覆盖行仍会被读取,用户看到的效果不变。
- 回滚:revert 本 PR 即可。技能文档改动是单独一个 commit,可单独撤回或拆出。
### 席位意见
### 你要做的
本 PR 改到了发布给客户的技能文档(`skills/**`,受管面),因此需要您在 PR
上留一条批准,才能进入合并队列。若您希望代码先落地、文档另走,告诉席位拆分即可。
---
_Generated by [Claude
Code](https://claude.ai/code/session_01JZnppgHRp4sREcouhkQYDB)_
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: os-zhuang <jack@objectstack.ai>1 parent 1b3b5b1 commit 3eb3ec1
61 files changed
Lines changed: 595 additions & 2090 deletions
File tree
- .changeset
- apps/console/src/__tests__
- content/docs/utilities
- packages
- app-shell/src
- console/__tests__
- utils
- views
- components/src/renderers/complex
- __tests__
- data-objectstack/src
- i18n/src
- __tests__
- locales
- plugin-detail/src
- plugin-grid/src
- __tests__
- plugin-list/src
- __tests__
- react/src/hooks
- types/src
- scripts
- skills/objectui/guides
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | 139 | | |
148 | 140 | | |
149 | 141 | | |
| |||
250 | 242 | | |
251 | 243 | | |
252 | 244 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
258 | 250 | | |
259 | 251 | | |
260 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
266 | | - | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | | - | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
122 | 132 | | |
123 | 133 | | |
124 | 134 | | |
| |||
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
165 | | - | |
| 175 | + | |
166 | 176 | | |
167 | 177 | | |
168 | 178 | | |
169 | 179 | | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
| |||
198 | 203 | | |
199 | 204 | | |
200 | 205 | | |
201 | | - | |
| 206 | + | |
202 | 207 | | |
203 | 208 | | |
204 | 209 | | |
205 | 210 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
213 | 217 | | |
214 | 218 | | |
215 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
299 | 302 | | |
300 | 303 | | |
301 | 304 | | |
| |||
0 commit comments