Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

feat(plugin-tree): add tree / tree-grid object view type (#1885) - #1892

Merged
xuyushun441-sys merged 3 commits into
mainfrom
feat/plugin-tree-view
Jun 22, 2026
Merged

xuyushun441-sys merged 3 commits into
mainfrom
feat/plugin-tree-view

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

What

Adds a tree / tree-grid object view type — renders a self-referencing object as an indented, expand/collapse tree-grid. The right view for arbitrary-depth hierarchies (business unit / org chart, category trees, BOMs, nested comments) that fixed-depth grouping can't express.

Closes #1885. Pairs with framework PR (spec tree type + showcase example).

Changes

  • packages/plugin-tree (new): ObjectTree tree-grid renderer + object-tree/tree registration. Builds a nested forest from flat records via a single-parent pointer, auto-detects the parent field from the object's tree/self-reference field, depth-seeded expand/collapse, keeps orphan rows as roots. When a live object dataSource is present it fetches its own full records (the host's column-scoped data omits the parent pointer and would flatten the tree).
  • types: ViewType + zod enum gain tree; ObjectTreeSchema added to the ObjectQL component union (interface + zod).
  • Dispatch: plugin-list/ListView (the console path) and plugin-view/ObjectView both route tree → object-tree; app-shell/ObjectView passes the view's tree config through options.tree. Both ViewSwitchers get a tree icon/label.
  • apps/console: lazy-register object-tree/tree, dep + vite alias + manualChunk.

Testing

  • 5 unit tests in plugin-tree (forest building, depth indentation, expand/collapse, defaultExpandedDepth, orphan handling) — all green.
  • Typecheck clean for plugin-tree + types.
  • Browser e2e: ran the showcase backend + this console and confirmed showcase_business_unit → "Organization Chart" renders a 3-level indented tree-grid with working expand/collapse (Acme → Product & Engineering → Platform / Frontend Guild → Design Systems; Go-To-Market → Sales → Enterprise Sales).

🤖 Generated with Claude Code

os-zhuang and others added 2 commits June 22, 2026 14:32
Adds a new `tree` view type that renders a self-referencing object as an
indented, expand/collapse tree-grid — the right view for arbitrary-depth
hierarchies (business unit / org chart, category trees, BOMs, nested comments)
that fixed-depth grouping can't express.

- packages/plugin-tree: new ObjectTree (tree-grid) renderer + registration
  (object-tree / tree component types), builds a nested forest from flat
  records via a single-parent pointer, auto-detects the parent field from the
  object's `tree`/self-reference field, expand/collapse + depth seeding.
- types: ViewType + zod enum gain 'tree'; ObjectTreeSchema added to the
  ObjectQL component union (interface + zod).
- plugin-view: ObjectView dispatches 'tree' -> object-tree; ViewSwitcher icon/label.
- plugin-list: ViewSwitcher icon/label.
- apps/console: lazy-register object-tree/tree, dep + vite alias + manualChunk.

Refs #1885

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… full records

The console renders object views via app-shell ObjectView -> plugin-list
ListView (not plugin-view ObjectView), so the tree view needs wiring there too:

- ListView: add a 'tree' case to the view-component switch (-> object-tree),
  allow 'tree' as a resolvable/whitelisted viewType, and re-run on tree config.
- app-shell ObjectView: pass the view's `tree` config through options.tree so
  parentField/labelField/fields/defaultExpandedDepth reach the renderer.
- ObjectTree: when a live object dataSource is present, fetch the tree's OWN
  full records instead of the host's column-scoped `data` — the host pre-fetches
  only display columns, which omit the parent-pointer field and flatten the tree.

Verified end-to-end in the showcase console: showcase_business_unit 'Organization
Chart' renders a 3-level indented tree-grid with working expand/collapse.

Refs #1885

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Jun 22, 2026 7:20am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

❌ Console Performance Budget

Metric Value Budget
Main entry (gzip) ** KB** KB
Entry file `` —
Status FAIL —

📦 Bundle Size Report

Package Size Gzipped
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 17.16KB 3.44KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 4.79KB 1.88KB
auth (LoginForm.js) 5.11KB 1.92KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.63KB 2.15KB
auth (SocialSignInButtons.js) 8.89KB 3.61KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 24.74KB 6.00KB
auth (createAuthenticatedFetch.js) 3.33KB 1.32KB
auth (index.js) 1.75KB 0.76KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.01KB 0.79KB
auth (useIsWorkspaceAdmin.js) 1.28KB 0.70KB
collaboration (CommentThread.js) 18.38KB 4.49KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 3.65KB 1.42KB
collaboration (PresenceProvider.js) 2.42KB 0.96KB
collaboration (index.js) 1.25KB 0.53KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 414.90KB 88.15KB
core (index.js) 1.48KB 0.54KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 97.65KB 24.24KB
fields (index.js) 166.22KB 40.09KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.46KB 0.96KB
i18n (pickLocalized.js) 1.31KB 0.67KB
i18n (provider.js) 5.37KB 1.72KB
i18n (useObjectLabel.js) 21.15KB 4.68KB
i18n (useSafeTranslation.js) 2.68KB 0.98KB
layout (index.js) 36.30KB 10.04KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 4.42KB 1.27KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 1.77KB 0.77KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 4.87KB 1.77KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.11KB 0.87KB
permissions (evaluator.js) 4.00KB 1.23KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.42KB 0.68KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-charts (index.js) 42.60KB 12.02KB
plugin-chatbot (index.js) 150.06KB 36.49KB
plugin-editor (index.js) 2.38KB 1.06KB
plugin-map (index.js) 16.02KB 4.98KB
plugin-markdown (index.js) 13.58KB 4.64KB
plugin-timeline (index.js) 25.37KB 7.20KB
plugin-tree (index.js) 8.04KB 2.70KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.55KB 0.67KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 15.64KB 5.08KB
react (index.js) 0.76KB 0.42KB
tenant (TenantContext.js) 0.31KB 0.25KB
tenant (TenantGuard.js) 1.04KB 0.43KB
tenant (TenantProvider.js) 2.76KB 0.98KB
tenant (TenantScopedQuery.js) 0.77KB 0.44KB
tenant (index.js) 0.75KB 0.38KB
tenant (resolver.js) 2.64KB 0.76KB
tenant (useTenant.js) 0.50KB 0.32KB
tenant (useTenantBranding.js) 0.62KB 0.39KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 0.77KB 0.41KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 1.54KB 0.68KB
types (layout.js) 0.20KB 0.18KB
types (mobile.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.26KB 1.96KB
types (tenant.js) 0.20KB 0.18KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 0.75KB 0.46KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 58.9 KB 350 KB
Entry file index-U4-toMUz.js —
Status PASS —

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 6.25KB 2.18KB
app-shell (runtime-config.js) 4.72KB 1.69KB
app-shell (types.js) 0.01KB 0.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 17.16KB 3.44KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 4.79KB 1.88KB
auth (LoginForm.js) 5.11KB 1.92KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.63KB 2.15KB
auth (SocialSignInButtons.js) 8.89KB 3.61KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 24.74KB 6.00KB
auth (createAuthenticatedFetch.js) 3.33KB 1.32KB
auth (index.js) 1.75KB 0.76KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 4.01KB 0.79KB
auth (useIsWorkspaceAdmin.js) 1.28KB 0.70KB
collaboration (CommentThread.js) 18.38KB 4.49KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 3.65KB 1.42KB
collaboration (PresenceProvider.js) 2.42KB 0.96KB
collaboration (index.js) 1.25KB 0.53KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 414.90KB 88.15KB
core (index.js) 1.48KB 0.54KB
create-plugin (index.js) 9.28KB 2.98KB
data-objectstack (index.js) 97.65KB 24.24KB
fields (index.js) 166.22KB 40.09KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 2.46KB 0.96KB
i18n (pickLocalized.js) 1.31KB 0.67KB
i18n (provider.js) 5.37KB 1.72KB
i18n (useObjectLabel.js) 21.15KB 4.68KB
i18n (useSafeTranslation.js) 2.68KB 0.98KB
layout (index.js) 36.30KB 10.04KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.74KB
mobile (index.js) 1.50KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 4.42KB 1.27KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.71KB 0.42KB
mobile (useResponsiveConfig.js) 1.36KB 0.63KB
mobile (useSpecGesture.js) 1.77KB 0.77KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 4.87KB 1.77KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.11KB 0.87KB
permissions (evaluator.js) 4.00KB 1.23KB
permissions (index.js) 0.91KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.52KB
permissions (usePermissions.js) 1.42KB 0.68KB
plugin-ai (index.js) 15.71KB 3.79KB
plugin-calendar (index.js) 45.98KB 12.65KB
plugin-charts (index.js) 42.60KB 12.02KB
plugin-chatbot (index.js) 150.06KB 36.49KB
plugin-dashboard (index.js) 104.62KB 26.04KB
plugin-designer (index.js) 213.42KB 42.94KB
plugin-detail (index.js) 195.59KB 47.19KB
plugin-editor (index.js) 2.38KB 1.06KB
plugin-form (index.js) 93.24KB 22.71KB
plugin-gantt (index.js) 122.48KB 30.19KB
plugin-grid (index.js) 114.67KB 30.78KB
plugin-kanban (index.js) 48.82KB 13.13KB
plugin-list (index.js) 93.72KB 22.06KB
plugin-map (index.js) 16.02KB 4.98KB
plugin-markdown (index.js) 13.58KB 4.64KB
plugin-report (index.js) 35.93KB 9.50KB
plugin-timeline (index.js) 25.37KB 7.20KB
plugin-tree (index.js) 8.04KB 2.70KB
plugin-view (index.js) 84.45KB 20.36KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.55KB 0.67KB
providers (UploadProvider.js) 11.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 15.64KB 5.08KB
react (index.js) 0.76KB 0.42KB
tenant (TenantContext.js) 0.31KB 0.25KB
tenant (TenantGuard.js) 1.04KB 0.43KB
tenant (TenantProvider.js) 2.76KB 0.98KB
tenant (TenantScopedQuery.js) 0.77KB 0.44KB
tenant (index.js) 0.75KB 0.38KB
tenant (resolver.js) 2.64KB 0.76KB
tenant (useTenant.js) 0.50KB 0.32KB
tenant (useTenantBranding.js) 0.62KB 0.39KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 0.20KB 0.18KB
types (crud.js) 0.20KB 0.18KB
types (data-display.js) 0.20KB 0.18KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 0.77KB 0.41KB
types (disclosure.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (index.js) 1.54KB 0.68KB
types (layout.js) 0.20KB 0.18KB
types (mobile.js) 0.20KB 0.18KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.26KB 1.96KB
types (tenant.js) 0.20KB 0.18KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 0.75KB 0.46KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@xuyushun441-sys
xuyushun441-sys merged commit 4eb9cb6 into main Jun 22, 2026
9 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the feat/plugin-tree-view branch June 22, 2026 07:44
os-zhuang added a commit that referenced this pull request Jul 26, 2026
…#2817)

`bridgePage`, `bridgeDashboard`, and the `SpecBridge#transformPage` /
`#transformDashboard` methods had no runtime consumer: pages render through
their own renderer and dashboards through `DashboardView → DashboardRenderer →
DatasetWidget` (ADR-0021), neither routing through `SpecBridge`. The dashboard
bridge's input shape (`object`/`categoryField`/`valueField`/`aggregate`) is the
pre-ADR-0021 widget model, which the strict `DashboardWidgetSchema` now rejects,
so the bridge could not receive a spec-valid dashboard even in principle.

Flagged dead by the metadata-liveness audit (framework #1878 / #1892). The
`list` and `form` bridges are the live authoring path and are untouched.

BREAKING CHANGE: removes the public exports `bridgePage`, `bridgeDashboard`,
and `SpecBridge#transformPage` / `#transformDashboard`.

Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
os-warren pushed a commit that referenced this pull request Sep 10, 2026
…d (objectui#8784)

The contract review on `fc1ab897c` returned FAIL on a factual point, and it is
right. This commit changes prose and two hardening details; the census, the
identity matching, the ledger rows, the firing controls and the derived floor
are untouched.

WHAT WAS WRONG. The docblock filed `507b61bf7` (PR #8763, objectui#8499) under
the barrel's SILENT failure modes, beside `d908a82f4`'s collateral drop and PR
#1892's omission, and `ABSENT_PENDING_RULING`'s comment argued from "the same
evidence objectui#7917 used to conclude its two omissions were accidental".
That is refuted by three records, re-derived here rather than taken on trust:

  1. `.changeset/8499-node-slot-registered-arms.md`, present in this very tree
     (blob c055695 on origin/main), declares the omission and its reason —
     exporting a `SemanticElementSchema` / `HtmlElementSchema` pair "would
     publish a NAMED authoring surface (`z.enum` families, not per-tag schemas)
     that this card's ruling does not cover", so "the metric is left to move and
     said out loud instead", and "whoever wants the number back down should
     treat naming these families as its own decision". It also declares the
     movement it caused: `unexportedNodeSchemas` from `[breadcrumb,
     object-tree]` to 49 node types, "Measured at this branch's head, not
     estimated."
  2. objectui#8499's ceiling review raised exactly this as blocking F1
     (`5597569641`: the four "are published by the union but unreachable by name
     from any published entry"), with the eight barrel lines named as the
     remedy.
  3. That review then PASSed the deferral "on the surface-widening reason
     alone" (`5598263402`).

So the omission was declared, reasoned and reviewed. The state "a decision is
owed" is correct and the rows stay; their stated BASIS was wrong.

WHAT CHANGED. The docblock gains a third, non-silent way an arm loses its barrel
line and says why the pin still earns its place against it: the declaration
lives in a `.changeset/*.md`, which is consumed and deleted at release
(measured: `59f61cfb8` "chore: release packages (#4655)" removes the batch it
versioned), so the absence outlives its own explanation. `ABSENT_PENDING_RULING`
becomes `ABSENT_PENDING_DECISION`, and its comment now carries the recorded
argument AGAINST naming these families rather than only the case for it. The
failure message names all three acceptable answers. Timing corrected: PR #8763's
`merged_at` is 2026-09-09T08:11:20Z; `07:53:59Z` was the squash commit's
committer date, and the "48 minutes" arithmetic built on it is gone. The
"13 sub-unions" aside is corrected to 12 sub-unions plus one object arm.

HARDENING, both nits the review raised. `hasRow` replaces `key in LEDGER`, so an
arm declaring `type: 'constructor'` cannot ledger itself off `Object.prototype`;
`Object.hasOwn` does not compile under this package's `"lib": ["ES2020", "DOM"]`
(tsc TS2550), so the `.call` form stands with that measurement recorded beside
it. The walk's `if (!def || seen.has(schema)) return` is split: a member with no
zod definition is now pushed to `unresolved` instead of being dropped, which is
what the docblock already promised.

Readings unchanged after both: types suite 172 files / 3385 tests green,
`type-check` exit 0, eslint 0/0 on the file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Sep 17, 2026
…objectui#8784) (objectstack-ai#9070)

* test(types): pin every AnyComponentSchema arm to a named zod export (objectui#8784)

objectui#7917 found two arms with no named export on the `./zod` barrel, so
`breadcrumb` and `object-tree` could not be validated on their own. PR objectstack-ai#8777
repaired both and nothing kept it repaired.

Each blindness was re-measured on this base rather than inherited:
`zod-mirror-parity.test.ts` builds its export population with
`/^export const NAME/m`, which matches a DECLARATION and can never match
`export { NAME } from './x.js'` — so it is structurally blind to a missing
re-export even though `index.zod.ts` is one of the files it reads; no test
pinned a list or a count on the barrel; and `scripts/measure-strict-authoring-face.mjs`,
the only script that computes the census, is a self-described MEASUREMENT
THROWAWAY wired into no `package.json` script and no workflow.

The pin derives the arm list on every run — flatten the union recursively
through nested unions and `z.lazy`, then match each leaf arm to a named export
BY IDENTITY. Both properties are controls in the file rather than claims in a
comment: a walk that stops at the top-level sub-unions scores exactly
`options.length` arms, and a name-based match is satisfied by
`export { NavigationSchema as BreadcrumbSchema }`, the parent sub-union under
the arm's name, which passes every behavioural leg of objectstack-ai#8777's pin. No count is
hard-coded; the only bound asserted against the real union is a floor read off
that union's own top-level option count.

Red on arrival, ledgered rather than repaired: `507b61bf7` (PR objectstack-ai#8763,
objectui#8499) armed four arms in `layout.zod.ts` and `form.zod.ts` and touched
no barrel, 48 minutes after objectui#8784 was filed on a census reading 107
arms / 107 named / 0 unnamed. This base reads 111 arms / 154 type literals /
106 named / 5 unnamed. Four rows point at objectui#9067, which holds the
ruling, because exporting them mints new names on a published surface; the
fifth, `RetiredKanbanNodeSchema`, is a refusal arm the barrel already declares
deliberately internal. A stale-row leg deletes any row the moment its arm is
exported or stops existing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

* test(types): correct the pin's account of why four arms are unexported (objectui#8784)

The contract review on `fc1ab897c` returned FAIL on a factual point, and it is
right. This commit changes prose and two hardening details; the census, the
identity matching, the ledger rows, the firing controls and the derived floor
are untouched.

WHAT WAS WRONG. The docblock filed `507b61bf7` (PR objectstack-ai#8763, objectui#8499) under
the barrel's SILENT failure modes, beside `d908a82f4`'s collateral drop and PR
objectstack-ai#1892's omission, and `ABSENT_PENDING_RULING`'s comment argued from "the same
evidence objectui#7917 used to conclude its two omissions were accidental".
That is refuted by three records, re-derived here rather than taken on trust:

  1. `.changeset/8499-node-slot-registered-arms.md`, present in this very tree
     (blob c055695 on origin/main), declares the omission and its reason —
     exporting a `SemanticElementSchema` / `HtmlElementSchema` pair "would
     publish a NAMED authoring surface (`z.enum` families, not per-tag schemas)
     that this card's ruling does not cover", so "the metric is left to move and
     said out loud instead", and "whoever wants the number back down should
     treat naming these families as its own decision". It also declares the
     movement it caused: `unexportedNodeSchemas` from `[breadcrumb,
     object-tree]` to 49 node types, "Measured at this branch's head, not
     estimated."
  2. objectui#8499's ceiling review raised exactly this as blocking F1
     (`5597569641`: the four "are published by the union but unreachable by name
     from any published entry"), with the eight barrel lines named as the
     remedy.
  3. That review then PASSed the deferral "on the surface-widening reason
     alone" (`5598263402`).

So the omission was declared, reasoned and reviewed. The state "a decision is
owed" is correct and the rows stay; their stated BASIS was wrong.

WHAT CHANGED. The docblock gains a third, non-silent way an arm loses its barrel
line and says why the pin still earns its place against it: the declaration
lives in a `.changeset/*.md`, which is consumed and deleted at release
(measured: `59f61cfb8` "chore: release packages (objectstack-ai#4655)" removes the batch it
versioned), so the absence outlives its own explanation. `ABSENT_PENDING_RULING`
becomes `ABSENT_PENDING_DECISION`, and its comment now carries the recorded
argument AGAINST naming these families rather than only the case for it. The
failure message names all three acceptable answers. Timing corrected: PR objectstack-ai#8763's
`merged_at` is 2026-09-09T08:11:20Z; `07:53:59Z` was the squash commit's
committer date, and the "48 minutes" arithmetic built on it is gone. The
gpgsig -----BEGIN PGP SIGNATURE-----
 
 wsFcBAABCAAQBQJqo01mCRC1aQ7uu5UhlAAANFoQAHOYAYecIHPZ1I9+k/D1sK3b
 Zms9VlD2R12QwgsGa21vPsCgq+P5RuNX6d9BJVa8iBWOGaypdVGspbEl282oC5hb
 Fn7YAenpnx8dbL7W0CqaFcfS8j4gxy/f2SBb5zaE95O8X9UDcgJJqYw42aWRJMG3
 qV7s7/Baxzzaj2MxkFmJe1BxHpkcod96F9qOrOqLICrEE1nBPprjZaQjUBRlyRwn
 F2Xs8Wu9pzYoAJv1/LuzJ2Rh+75Ocj2TTBz44gidx75MfPJFn/T2Y53ALWKBgM99
 BKcaBib8fRvyAR5Iph9RDF3h9zigUOY7w1ATkqbv96SKclQOjY6KDzSrd7tJWtq2
 QXDKKBxfZKGP5k8NOdjzlr2v/unfad2l+7mm/k8mZSrzHGtEyNjNBMDtcjjPqXh3
 6FVU/zyauWJt4H4f25UXEoktVrH7tWllP/IIc1ChbH4xuCSZdWPgUObrdLrzxW5q
 OlzPIL69AZk3eYPW/mJNaRIQUNf1i/0BiB0J3JyJYmn570ZVqRUYt09y0fgNOraL
 d/0wUUrZpC8bvRMTbwSSi7FfQMQu8X4aAi/IBePpd577i5XQL8uTGASRxRSa4yQP
 9fZ6X92A7BUBLxOZrUSfIIul3eTfhrRhqAg6nnvJg6bvcgl2pNaqRpIO8gTAOE/t
 XcXjY5ZDBxd89ICTEoJO
 =CAPn
 -----END PGP SIGNATURE-----
 
"13 sub-unions" aside is corrected to 12 sub-unions plus one object arm.

HARDENING, both nits the review raised. `hasRow` replaces `key in LEDGER`, so an
arm declaring `type: 'constructor'` cannot ledger itself off `Object.prototype`;
`Object.hasOwn` does not compile under this package's `"lib": ["ES2020", "DOM"]`
(tsc TS2550), so the `.call` form stands with that measurement recorded beside
it. The walk's `if (!def || seen.has(schema)) return` is split: a member with no
zod definition is now pushed to `unresolved` instead of being dropped, which is
what the docblock already promised.

Readings unchanged after both: types suite 172 files / 3385 tests green,
`type-check` exit 0, eslint 0/0 on the file.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

* docs(changeset): drop the withdrawn "48 minutes" clause from the 8784 changeset

One clause, on the seat's ruling. `.changeset/8784-arm-named-export-pin.md` is
release-note input — it is consumed into `packages/types/CHANGELOG.md` at the
next publish — so it outlives the PR body that already carries the correction,
and it was the last place in this branch still reading off the committer date.

Replaced: "and touched no barrel — 48 minutes after objectui#8784 was filed on a
census reading 107 arms / 107 named / 0 unnamed."
With:      "and touched no barrel deliberately (PR objectstack-ai#8763 merged
2026-09-09T08:11:20Z; the omission and its reason are declared in
`.changeset/8499-node-slot-registered-arms.md`)."

⛔ The interval is not restated as 66 minutes. Measured here — card created
2026-09-09T07:05:02Z, PR objectui#8763 `merged_at` 2026-09-09T08:11:20Z, so the
true figure is 66.3 rather than the 48 that came off `507b61bf7`'s committer
date 07:53:59Z — but the framing that made an interval meaningful was the
accident premise, and that premise is withdrawn: the barrel omission was
declared in objectui#8499's own changeset, raised as blocking F1 (`5597569641`)
and passed on the surface-widening reason (`5598263402`).

Nothing else in the file moves. Gates on the edited tree: check-changeset-presence
exit 0 ("Every one of them has an EMPTY frontmatter"), check-changeset-no-major
exit 0, check-changeset-fixed exit 0, check-changeset-overwrite exit 0 ("No
pre-existing changeset was modified or deleted"), check-control-bytes exit 0,
plus a direct `grep -naP` control-byte scan of the edited file (exit 1, no lines).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

* docs(changeset): match the changeset's top-level-member wording to the pin's docblock

One clause, on the seat's ruling. Round 2 corrected this fact in the pin's
docblock and did not carry the correction into the changeset, so the PR shipped
two faces disagreeing about the same thing — and the changeset is the face that
is published into `packages/types/CHANGELOG.md` and outlives the docblock's
audience.

Before: "a walk that stops at the top-level sub-unions scores exactly
`options.length` arms"
After:  "a walk that stops at the 13 top-level members — 12 sub-unions plus one
object arm (`AppComponentSchema`, an arm at depth 1), not 13 sub-unions — scores
exactly `options.length` arms"

The wording is taken from the docblock rather than paraphrased, and the match is
measured rather than eyeballed: with jsdoc leaders stripped and whitespace
collapsed, the phrase "12 sub-unions plus one object arm (`AppComponentSchema`,
an arm at depth 1), not 13 sub-unions" occurs exactly once in each file.

⛔ The claim itself is unchanged — such a walk does still score exactly
`options.length` arms, which is the property the derived floor rests on.
⛔ Nothing else in the file moves: "Red on arrival, reported rather than declared
away" stays byte-unchanged (it asserts nothing false and is a borrowed repo
idiom, `.changeset/4971-declared-arm-subset-gate.md`), and the withdrawn
interval stays dropped rather than restated.

Gates on the edited tree: check-changeset-presence exit 0 ("Every one of them has
an EMPTY frontmatter"), check-changeset-no-major exit 0, check-changeset-fixed
exit 0, check-changeset-overwrite exit 0 ("No pre-existing changeset was modified
or deleted"), check-control-bytes exit 0, plus a direct `grep -naP` control-byte
scan of the edited file (exit 1, no lines).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jmxdo7bmeqCQHLSfmLVX9w

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a tree / tree-grid object view type for self-referencing hierarchies (business unit, org chart)

2 participants