This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
Commit d3fd5e4
fix(app-shell): page scope collects the missed object arms; interface list reuses the package scope (objectui#12980) (#13003)
Part of #12980
Clause-②: no
Part 5 of #12980: part 1's object-scope leftovers 2 and 3 (ACCEPT
`6253365954`, contract review `6253321662` items ① 7 and ① 9). This PR
does not close the card. Its leftover 1 (the chrome hooks in a
package-less app) and the card's items 2 and 3 are not addressed here.
## What changed
**Leftover 2: the object arms the page derivation missed.**
`pageObjectNames` (`packages/app-shell/src/console/appObjectScope.ts`)
now also collects each arm below. Each one was checked against the
renderer that reads it:
| Arm | Renderer read | Collected |
|---|---|---|
| `data.object` when `data.provider === 'object'` (the `ViewDataSchema`
object arm on `object-grid` / `object-map` / the other view-data blocks)
| `resolveRecordSourceObjectName` in `@object-ui/core`, the record
source every view-data block resolves first | yes |
| `element:metadata_viewer` `properties.object` | `StateMachineView`
reads it with `useMetadataItem('object', object)`. `FlowView` and
`PermissionView` do not read it | yes, only when `properties.type ===
'state_machine'` |
| `record:line_items` `properties.childObject` | `LineItemsPanel`:
`find(childObject)` / `getObjectSchema(childObject)` | yes |
| `record:line_items` `properties.parentObject` | `LineItemsPanel`: the
parent leg of the save batch (`buildMasterDetailEditBatch`) | yes |
| `parentDataSource.object` (`record:related_list`'s parent binding) |
`ParentRecordBinding` resolves it on render | yes (bounded in-place fix,
see Acceptance notes) |
| `addPicker.object` as the card spells it, i.e. `record:related_list`
`add.picker.object` | `RelatedList` reads it only once the user opens
the picker (`pickerOpen` gate), through the data adapter | **no**: it is
never read while the page renders, and collecting it would hold the
route on a read the open does not use |
The derivation reads only string values. An expression envelope, a
non-string, a `data` array of pre-fetched records (the `object-calendar`
arm) and any other `data` provider bind nothing. The per-block arms live
in a `Map` keyed by block type, so a prototype key such as `toString`
cannot match.
`PageView` needs no change because it reads the same derivation through
`readPageObjectScope`.
**Leftover 3: `InterfaceListPage`'s second read.** The list page now
finds the app the same way `nav:menu` does (`useParams().appName`, else
`useNavigationContext().currentAppName`, matched over the active apps).
It reads its source as `readObjectScope({ packageId, names: [source] })`
when the app names a package, and as `{ names: [source] }` otherwise.
`readObjectScope` itself is unchanged.
## Premises, measured
- **P1 (leftover 2).** With the new arm collection removed (the ablation
below, i.e. main's derivation), a page that binds objects only through
these arms draws first with each arm object unknown. `recordHref`
returns `''` for each one, so the object is read by name on demand. None
of the arms was already collected some other way.
- **P2 (leftover 3).** Yes, it is a second request. In a package app the
route's `object?package=app.crm` already returned the source. Without
the `packageId` pass, the list page then issues `object/crm_account`
again. The cause: the names-only scope is a separate scope entry, and
the package list does not fill the provider's by-name cache.
## Pins
- (a)
`packages/app-shell/src/console/__tests__/AppContent.pageScopeArms-12980.test.tsx`
runs the real `MetadataProvider`, `AppContent` and `PageView`. A page
binds five objects of another package, and only through the new arms.
Every arm object is known on the page's first render. Each one is read
once, by name, beside the package list, and there is no whole-registry
`meta/object`.
- (a)
`packages/app-shell/src/console/__tests__/pageObjectNames.arms-12980.test.ts`
is a unit pin for each arm. It also pins what is not collected:
`add.picker.object`, a non-state-machine viewer, expression envelopes,
non-strings, the `value` arm, a `data` array, and a prototype-key block
type.
- (b) and (c) are in
`packages/app-shell/src/views/__tests__/InterfaceListPage.packageScope-12980.test.tsx`,
which uses the real `MetadataProvider` with the real
`readPageObjectScope` as the route's half. (b) In a package app, the
object calls are exactly `object?package=app.crm`. (c) CONTROL: in an
app with no package, the call is exactly `object/crm_account`, once.
- (c) CONTROL: the #12811 app-route call set in
`AppContent.pageRouteObjects-12980` is unchanged (green, including
during ablation A).
## Ablations (one per half; restore proven by blob hash)
Both ablations ran through `ablation-replace.mjs` in wrap mode, under
the shared verify lock:
- **A: new arm collection dropped** (`appObjectScope.ts` back to main's
`dataSource`-only lines). Anchor 1 to 0, blob `8c64252eae8c` to
`c37798f6a25d`. Result: (a) red (the first-render hrefs were all `''`),
4 of the 6 unit pins red (the 2 negative pins stay green, as expected),
and the `pageRouteObjects-12980` CONTROL green. Restored: blob
`8c64252eae8c` == HEAD, `git diff HEAD` empty.
- **B: `packageId` pass dropped** (`InterfaceListPage.tsx` back to `{
names: [cfg.source] }`). Blob `3b887aa20866` to `1f1156780f8e`. Result:
(b) red (it received the extra `object/crm_account`), (c) CONTROL green.
Restored: blob `3b887aa20866` == HEAD, `git diff HEAD` empty.
## Gates (at `3c48263b22`)
- Closure build `turbo run build --filter='@object-ui/app-shell^...'
--concurrency=2`: 28/28 tasks, exit 0.
- `pnpm --filter @object-ui/app-shell type-check` (`tsc --noEmit && tsc
-p tsconfig.test.json`): exit 0. The three new test files are in the
test project (`--listFilesOnly`).
- Targeted vitest (`--maxWorkers=1`) over the new and edited tests plus
every test file naming `pageObjectNames`, `appObjectScope`,
`pageRouteObjects-12980`, `pageObjectReads-12980`, `InterfaceListPage`
or `namesOnlyScope`: 39 files, 611 tests passed. **The whole
`packages/app-shell/` directory is declared to CI** and was not run
locally.
- Lint, narrowed to the 11 changed `.ts`/`.tsx` files with `eslint
--no-inline-config --format json`: 11 files, 0 errors, 110 warnings
(`no-explicit-any` and the like, the files' existing style). Type-aware
linting is not enabled in `eslint.config.js` (no `parserOptions.project`
/ `projectService`), so this diff cannot move any untouched file's
verdict.
- Pre-tsc battery, each exit 0: `check:phantom-deps`,
`check:self-import`, `check:unreferenced-sources`,
`check:doc-example-readers`, `check:handler-key-reads`,
`check:side-effects-array`, `check:element-data-source-declaration`,
`check:spec-symbols`, `check:action-forward-parity`,
`check:designer-field-key-parity`, `check:icon-record-names`,
`check:i18n-keys`, `check:i18n-drift`, `check:i18n-designer-parity`,
`check:control-bytes`, `check-hand-rolled-comment-mask.mjs`.
- `check-changeset-fixed.mjs`, `check-changeset-presence.mjs`,
`check-changeset-no-major.mjs` and `check:new-line-citations` (0 new
citations): exit 0.
## Acceptance notes
- **Bounded in-place fix: `parentDataSource.object`.** It is not on the
order's list. It is the same defect class (an `ElementDataSourceSchema`
object arm the derivation skipped), the fix is mechanical (one key added
beside `dataSource`), it is in the same claimed file, and the same pins
cover it. Evidence: `ParentRecordBinding` resolves it on render, and the
unit pin and pin (a) bind it.
- **Not collected: `add.picker.object`.** See the table. The card's
spelling `addPicker.object` does not exist in `@objectstack/spec` or in
any renderer; the real key is `add.picker.object`. If the seat prefers
to collect it anyway, it is a one-entry addition to `BLOCK_OBJECT_ARMS`.
- **Six test files beside `InterfaceListPage.tsx` were edited**: their
hand-written `react-router-dom` mocks now name `useParams` (one line
each). Before that, 31 tests in those six files failed with `No
"useParams" export is defined on the "react-router-dom" mock`.
- The order's lock section says no whole-package-directory runs, while
its gates section says to run each touched package's directory under the
lock. I followed the lock section and declared the directory to CI.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01XVp19E1MYUTFM3dnkwz8gB)_
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 0d97642 commit d3fd5e4
12 files changed
Lines changed: 572 additions & 14 deletions
File tree
- .changeset
- packages/app-shell/src
- console
- __tests__
- views
- __tests__
| 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 | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 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 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 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 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
0 commit comments