Skip to content

refactor(plugin-view): read the three declared object-view keys without a cast - #27273

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-jiez8z
Oct 28, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/project-thread-jiez8z

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Warren · project thread

Part of #25918 (the ListView reads and the lint rule stay open on the card).

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

  • ui/packages/plugin-view/src/ObjectView.tsx: inside the #region object-view HOST-COMPOSITION SURFACE (objectui#5097) fence, the three keys in OBJECT_VIEW_DECLARED_FORWARDED_KEYS (data, navigation, searchableFields) are now read as schema.K. All three are declared on ObjectViewSchema (data through BaseSchema), so the cast hid nothing. The 27 OBJECT_VIEW_HOST_COMPOSITION_KEYS reads keep their cast, per the objectui#5097 ruling. The fence comment, the two docblocks that described all 30 reads as casts, and the data rung comment (which wrongly called node data one of the 27) now say what the code does.
  • objectViewHostSurface.test.tsx: the fence pin now derives the cast set and the uncast set separately. It asserts the cast reads are exactly the 27 exempt keys, and that each declared key is read uncast. The named-view section's count drops from 27+3 to 27 for the same reason.
  • object-view-unmirrored-keys-7779.test.ts (@object-ui/types): three literal source-text pins (the searchableFields read twice, the data read once) follow the new text. Its census regex already matched both spellings, so no count changed.

ObjectGrid.tsx is unchanged. Both of its (schema as any) reads are on keys that a real producer writes onto an object-grid node, so neither read can stop here:

  • rowActionDefs: DevRowActions.tsx (console dev page, an object-grid node literal), ListView's grid hand-off, RelatedList and app-shell's objectViewListRenderer. The key is declared on DataTableSchema but not on ObjectGridSchema, and ComponentPropsMap['object-grid'] refuses it by name.
  • hideRowHeightToggle: ListView's baseProps set it to true on the object-grid node it builds. It is declared nowhere.

Both are already recorded as ruled non-author surface (objectui#5091) and pinned by gridNonAuthorKeys.test.tsx. They are reported to the seat as findings and not filed here.

Tests

Run on head 4c0dabbb (merge of origin/main 1e8e5296):

  • Closure build pnpm --workspace-concurrency=2 --filter '@object-ui/plugin-view^...' build under os-verify-lock: VERDICT command-exit 0.
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-view/ plus every test outside the package that reads plugin-view/src/ObjectView.tsx off disk (six @object-ui/types census files, plugin-form affordanceGrantMap-12082, plugin-list ViewSwitcher.i18n-4024, two plugin-map files, react navigationOverlayConsumers.onRowClickArity-9357, schema-catalog catalog-gallery-render): Test Files 89 passed (89), Tests 1738 passed (1738).
  • pnpm --filter @object-ui/plugin-view run type-check exit 0, and pnpm --filter @object-ui/types run type-check exit 0. Both scripts include tsc -p tsconfig.test.json, so the edited tests are compiled.
  • No ablation: no read was stopped and no runtime behaviour changed. Dropping an as any emits the same JavaScript, and the existing forwards all 30 reads render test still pins every value end to end.

Acceptance notes

  • (activeView as any)?.data and (activeView as any)?.rowActionDefs in the same fence are casts on the host views prop entry, not on schema. They are outside this card's surface and are left as they are.
  • No changeset (skip-changeset): the emitted code of both published packages is unchanged. Only comments and type-level casts moved, and the @object-ui/types change is test-only.

Verification

node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 24 gate commands on this diff, and all 24 exited 0 (reconciled with --ran). Also pnpm run check:new-line-citations (ui): 0 new citations. dispatch-gates --tier: no path-derived mandate.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic.
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; pnpm lint passes. (No formatter ran; lint was not run locally, CI Lint UI reads it.)
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. (Not applicable: nothing published changes; skip-changeset.)
  • 6. packages/spec touched: its generated artifacts are regenerated and committed. (Not applicable: packages/spec untouched.)
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JQwxbaGCrvY8peSVMF3rQw


Generated by Claude Code

…ut a cast

`data`, `navigation` and `searchableFields` are declared members of
`ObjectViewSchema`, so the `renderListView` relay reads them as
`schema.K`. The 27 objectui#5097 host-composition reads keep their cast.
The fence pin now derives the cast set (27) and the uncast declared set
separately; the 7779 census pins follow the new source text.

Claude-Session: https://claude.ai/code/session_01JQwxbaGCrvY8peSVMF3rQw
Co-Authored-By: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Oct 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

席位核对

ACCEPT · seat domain:ui#1 · session_01JQwxbZeBv2y91towxasSUT · head 4c0dabbb · 2026-10-28T14:31Z

席位意见:ObjectView 里三个已在类型上声明的键(data、navigation、searchableFields)不再用 (schema as any) 读取;objectui#5097 裁定为宿主组合面的 27 个键保持原样。ObjectGrid 两处读取都有真实生产者,不动。纯类型收紧,无行为变化。

  1. Shape: Part of #25918; 3 files, +50/−26: ui/packages/plugin-view/src/ObjectView.tsx (three casts dropped, the fence comment and the constants' docs made true), objectViewHostSurface.test.tsx and object-view-unmirrored-keys-7779.test.ts (pins adjusted to the uncast reads). skip-changeset: no emitted behaviour or published type changes.
  2. Premise measured: the three keys are members of OBJECT_VIEW_DECLARED_FORWARDED_KEYS (data via BaseSchema); the 27 OBJECT_VIEW_HOST_COMPOSITION_KEYS reads keep their cast, as objectui#5097 binds. One stale comment that called the node's data one of the 27 is corrected. ObjectGrid.tsx: rowActionDefs and hideRowHeightToggle both have producers onto object-grid nodes (ListView hand-off, DevRowActions, RelatedList, objectViewListRenderer; ListView baseProps), already ruled non-author on objectui#5091, so the order's "producer ⇒ leave the read" branch applies; reported under out_of_scope_findings, nothing filed.
  3. Gates / check-runs: PR check-runs on 4c0dabbb: 44 success, 16 skipped, 0 failure; mergeable_state clean. Dev's local run: 89 test files / 1738 tests green, both type-checks exit 0, 24/24 derived gates exit 0.
  4. Accepted deviations: none. Seat trial merge with origin/main is clean; open PR feat(spec,types,plugin-list,app-shell)!: retire the list view's options bag; stored bags fold onto the top-level blocks, and the renderers read the blocks alone #27206 also edits ObjectView.tsx, in other hunks.
  5. Out of scope: ListView.tsx (seat 2's package, feat(spec,types,plugin-list,app-shell)!: retire the list view's options bag; stored bags fold onto the top-level blocks, and the renderers read the blocks alone #27206 in flight) and the no-explicit-any rule stay on lint/types: 14,366 no-explicit-any warnings can never red CI — make it an error on packages/types/src, delete the vestigial (schema as any) reads, and type ComponentRendererProps with unknown #25918. Skills-docs: none — internal cast removal.
  6. Landing: not Tier H; the seat readies and arms auto-merge.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 28, 2026 14:32
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 38bbc2f Oct 28, 2026
61 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-jiez8z branch October 28, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants