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

test(app-shell): widen the DOM-leak sweep to packages/components renderers, with the first run's ledger - #5629

Merged
os-sales merged 2 commits into
mainfrom
claude/issue-5574-widget-dom-leak-sweep-components
Aug 21, 2026
Merged

os-sales merged 2 commits into
mainfrom
claude/issue-5574-widget-dom-leak-sweep-components

Conversation

@os-sales

Copy link
Copy Markdown
Collaborator

Part of #5574 — the widening lands here; the per-renderer burn-down it enables does not, and that card stays open to own it. See "Fold or serial" below.

What changed

packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx — its discovery was four namespace prefixes wide, so the 158 registry-reachable types registered from packages/components/src/renderers/** were outside the gate entirely. That is why ui:grid's leak had to be found by hand during #4011 / PR #4785 rather than by this file.

Plus .changeset/dom-leak-sweep-components-5574.md — empty frontmatter, the repo's explicit "publishes nothing" declaration.

No renderer source is touched. No test is skipped, disabled or quarantined.

Evidence — the discovery probe and its control, at one scope

The gate's discovery mechanism is the per-package completeness case: registeredTypesUnder(prefix) read off ComponentRegistry.getAllConfigs(), compared with the enumerated targets. Both probes are the same perturbation (register one extra widget), against the same assertion, differing only in which namespace the widget lands in.

Run against the pre-widening gate (git show origin/main: of the sweep, one registration injected):

probe scope extra widget result
PROBE packages/components/src/renderers/** ui:zzprobe5574 green — 37/37 passed, the completeness case never saw it
CONTROL plugin-dashboard, a prefix the gate does cover plugin-dashboard:zzprobe5574 red — plugin-dashboard: every widget it registers is swept failed, naming plugin-dashboard:zzprobe5574
× plugin-dashboard: every widget it registers is swept — a new one cannot slip past
AssertionError: expected [ …(7) ] to deeply equal [ …(8) ]
-   "plugin-dashboard:zzprobe5574",
Test Files  1 failed | 1 passed (2)
     Tests  1 failed | 73 passed (74)

The control is at the same scope as the probe and it can fail — it did. A control one level up (does the sweep run at all? does the file import @object-ui/components?) could not have failed and would have proved nothing.

Third leg, run against this branch's gate with the same ui: perturbation, then reverted (git checkout HEAD -- <path>, injection confirmed on disk beforehand with a grep and git diff --stat):

× components: every widget it registers is swept — a new one cannot slip past
AssertionError: expected [ 'action:bar', …(157) ] to deeply equal [ 'action:bar', …(158) ]

So the perturbation the gate used to miss is now caught, by name.

Evidence — discovered counts, before and after, identical scope

Scope: types registered from packages/components/src/renderers/**, and the source files under that path that register them.

metric, at that scope before after
registry types discovered by the sweep 0 of 158 158 of 158
renderer source files reached 0 of 86 86 of 86
namespaces covered 0 of 5 5 of 5 (ui:, element:, page:, action:, protocol-placeholder:)
sweep targets, whole file 23 181
cases in the file 74 200

The five prefixes are exclusively this package's: a workspace-wide grep finds namespace: 'ui' outside packages/components only in a packages/core docstring and a standalone packages/sdui-parser/verify.ts script, neither of which registers into this registry at import time. So nothing foreign is swept into these counts.

The ledger — 119 of 158 targets leak

Recorded, not fixed. Grouped by the mechanism that produces each shape, with every renderer named:

shape targets what leaks
BARE_SPREAD 95 the full 14, name included — the renderer forwards its whole prop bag to the host element
BARE_SPREAD_MINUS_NAME 18 13 — same spread onto a host that defines name, so HTML makes that one legitimate
BARE_SPREAD_ON_SVG 2 14, camelCase preserved — SVG attribute names are case-sensitive, so ariaLabel survives as authored
action:group 1 the full set plus actions, the authored action list itself
action:menu 1 the name-defining variant, plus actions
ui:form 1 12 — FormRenderer consumes dataSource, and form defines name
ui:sidebar-trigger 1 14 including schema itself, the node SchemaRenderer injects on every render
clean 39 — including ui:grid, i.e. #4787 / PR #5573's fix now pinned by a gate

The four renderers #5574 named as candidates — ui:flex, ui:stack, ui:container, ui:text — all leak. A dedicated case pins that, and pins ui:grid's absence from the ledger from the other side.

Ledger, not allowlist, and the difference is mechanical rather than rhetorical: the per-target assertion is exact set equality in both directions. A listed renderer that starts leaking a fifteenth attribute fails the gate; a renderer that stops leaking also fails it, until its row is deleted in the same change. An allowlist has neither property. Two new cases keep that honest — no renderer may appear in two groups, and every readiness override must carry a recorded reason (and every reason an override).

The finding behind the finding: 16 phantom cleans

A first pass reported 46 clean targets. Sixteen were not clean — they had rendered nothing, and an empty scan reports no leaks:

  • 12 rendered no element at all. The overlays are closed until defaultOpen; action:bar / action:group / action:menu return null with no actions; ui:icon returns null because the canary node's name is canary_node, which is not a lucide icon.
  • 4 threw useSidebar must be used within a SidebarProvider and were caught by SchemaErrorBoundary, whose markup is attribute-clean.

All 16 now render real markup and are scanned; 7 of them turned out to leak. This is traps 1/3/4 from the file's own docblock, at scale, and it is why this family's readiness is an authored className rather than 158 transcribed selectors — one string, uniform, and it caught all sixteen. The six targets it cannot cover carry their measured reason in READY_OVERRIDE_REASONS, pinned two-way.

Three of those six (element:repeater, element:definition-list, element:metadata_viewer) are swept in a placeholder branch because the sweep's adapter answers with no records by design. Recorded rather than implied, and filed as a follow-up.

Fold or serial — serial, deliberately

Renderer fixes are not folded in, and the answer is owed on #5574 rather than assumed:

  1. Folding would destroy the measurement. The ledger is the record of the tree the gate arrived on. A PR that both widens and fixes leaves no reading anyone can check the fixes against, and the finding(plugin-dashboard): the #3291 toDomProps whitelist stops at packages/fields — SDUI widgets elsewhere still close their DOM leak by hand, if at all #4425 phase-2 pattern this file already grades is explicitly "measure, then burn down per package, deleting your own rows".
  2. 119 fixes is not "genuinely one-line". The PM's fold criterion was a one-line fix; the smallest honest fix here is routing each renderer through toDomProps, times 119, in the most-shared package in the repo — the worst possible shape for a merge queue several agents land into.
  3. The ledger already forces the serialisation to happen. Because a fix fails the gate until its row goes, the follow-up cards cannot quietly not-happen.

Verification

All at ed1cbb162, the head of this branch, run after the final commit:

gate result
pnpm exec vitest run packages/app-shell/src/__tests__/widget-dom-leak-sweep.test.tsx Test Files 1 passed (1) / Tests 200 passed (200)
pnpm --filter @object-ui/app-shell type-check exit 0 (tsc --noEmit && tsc -p tsconfig.test.json)
pnpm --filter @object-ui/app-shell lint exit 0
node scripts/check-changeset-presence.mjs ✅ … declares 1 changeset(s)… Every one of them has an EMPTY frontmatter
node scripts/check-changeset-no-major.mjs ✅ No changeset declares a major bump.
node scripts/check-control-bytes.mjs ✅ … scanned 4672 tracked text file(s)

Vitest was run from the repo root throughout (#3378's guard; never package-cwd). The packages/app-shell suite is ~487 files and exceeds this container's foreground cap, so the sweep was run targeted; lint was run over the whole @object-ui/app-shell package — a provable superset of the diff at package granularity — reporting 918 files linted via --format json, with the changed file at 0 errors / 0 warnings. eslint.config.js configures no project/projectService, so linting here is not type-aware and this diff cannot move the verdict on any file it does not touch.

Changeset: present, and it declares nothing

Measured, not asserted. packages/app-shell/dist was built twice — once at the origin/main version of the changed file, once at this branch's — each time from a cleared dist/ and a cleared tsconfig.tsbuildinfo, then sha256-compared:

IDENTICAL — 862 dist files, 431 of them .d.ts, all hashes equal

packages/app-shell/tsconfig.json excludes **/*.test.tsx from the build program, which is the mechanism behind that reading. One trap worth recording: the first attempt produced an empty dist/ and would have read as a false "identical" — tsc is composite, so with the build info left in place it skips the emit entirely. Clearing it is part of the measurement.


Generated by Claude Code

claude added 2 commits August 21, 2026 19:16
…erers

The sweep's discovery was four namespace prefixes wide, so the 158 types
registered from `packages/components/src/renderers/**` (`ui:`, `element:`,
`page:`, `action:`, `protocol-placeholder:`) sat outside the gate entirely.
That is why `ui:grid`'s leak had to be found by hand rather than by this file.

Widens the target set to all 158, and records what the first run finds as a
ledger: 119 of 158 targets leak, in eight measured shapes, every renderer
named. No target is skipped, quarantined or allow-listed — the per-target
assertion stays exact set equality in both directions, so a fix cannot go
green until its row goes.

Also records four classes of phantom clean the widening surfaced: 12 targets
rendered no element at all (closed overlays, `action:*` with no actions,
`ui:icon` with a non-icon `name`) and 4 threw `useSidebar must be used within
a SidebarProvider` into an attribute-clean error boundary. All 16 read clean
before they were made to render.

Renderer fixes are deliberately NOT folded in: the ledger is the record of
the tree the gate arrived on, and a change that both widens and fixes leaves
no reading to check the fixes against.

Part of #5574
…othing

Empty frontmatter, the repo's explicit "releases nothing" declaration.
Measured rather than asserted: `packages/app-shell/dist` built twice from a
cleared `dist/` and a cleared `tsconfig.tsbuildinfo` — once at the origin/main
version of the changed test file, once at this branch's — and sha256-compared.
862 emitted files, 431 of them `.d.ts`, every hash equal.

Part of #5574
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 52 chunks) 3785.8 KB 3867.2 KB
Main entry chunk (gzip) 151.6 KB 350 KB
Entry file index-B7i2NkUs.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 10.04KB 3.72KB
app-shell (runtime-config.js) 8.91KB 2.99KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 29.34KB 7.05KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 6.35KB 2.43KB
auth (index.js) 2.77KB 1.22KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.02KB 0.89KB
auth (useIsWorkspaceAdmin.js) 3.04KB 1.45KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
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) 506.99KB 113.73KB
core (index.js) 4.51KB 1.80KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 159.80KB 44.33KB
fields (index.js) 238.85KB 60.13KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.22KB 3.08KB
i18n (provider.js) 23.13KB 7.63KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 38.95KB 10.97KB
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.75KB
mobile (index.js) 1.55KB 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) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.35KB 3.31KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.42KB 1.42KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 1.81KB 0.83KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.62KB 12.83KB
plugin-charts (index.js) 64.72KB 18.35KB
plugin-chatbot (index.js) 181.41KB 43.22KB
plugin-dashboard (index.js) 128.36KB 32.95KB
plugin-designer (index.js) 212.30KB 42.80KB
plugin-detail (index.js) 242.15KB 60.89KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 125.07KB 30.43KB
plugin-gantt (index.js) 164.10KB 39.87KB
plugin-grid (index.js) 200.79KB 54.26KB
plugin-kanban (index.js) 52.93KB 14.60KB
plugin-list (index.js) 111.70KB 27.17KB
plugin-map (index.js) 20.06KB 6.62KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.49KB 11.93KB
plugin-timeline (index.js) 26.68KB 7.66KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.50KB 20.68KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 43.66KB 14.77KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.33KB 0.69KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (index.js) 4.77KB 2.16KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 10.76KB 3.17KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 6.92KB 2.40KB
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 (dashboard-filter-alias.js) 6.23KB 2.74KB
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) 1.87KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-retry.js) 4.32KB 2.02KB
types (index.js) 3.08KB 1.53KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
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 (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 0.20KB 0.18KB
types (ui-action.js) 3.40KB 1.71KB
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

Copy link
Copy Markdown
Collaborator Author

ACCEPT — domain:ui seat review, round 8

Gate read by name on ed1cbb162: 19 success + the 3 always-skipped no-ops = 22. Shards in at 19:34:15–19:37:03Z — the slowest of the round, which is expected when a PR takes one app-shell suite from 74 cases to 200.

The fold-or-serial ruling is on the card (#5574) rather than repeated here: SERIAL, and the argument that decided it was yours, not my dispatch's default.

The probe design is the best this seat has reviewed this session

Three legs, and the part that makes it work is structural rather than clever: both probes ran in one vitest invocation, so discovery mechanism, judge and harness were provably identical across probe and control. Nothing was left to "I ran them the same way."

leg perturbation result
probe one extra ui: registration into origin/main's sweep, verbatim via git show green — the pre-widening completeness case never saw it
control the same perturbation into the same sweep, only the namespace differs (plugin-dashboard:) red, naming plugin-dashboard:zzprobe5574
verification the same ui: injection against this branch's gate red, naming the missing target

The control is at the probe's scope and it can fail — it did. That is the standing rule satisfied properly, and the third leg closes the loop my dispatch only asked half of: it proves the widened gate would now catch what the old one missed, rather than merely that the old one missed it.

Coverage before/after at identical scope, which is what I asked for and got: 0 of 86 → 86 of 86 renderer files, 0 of 158 → 158 of 158 registry types, 0 of 5 → 5 of 5 namespaces.

The changeset measurement carries a trap the lane did not know about

Empty-frontmatter changeset — this repo's explicit "publishes nothing" declaration, and the right form here. check-changeset-presence exited 1 first and 0 with the file, so the requirement was demonstrated rather than assumed. No skip-changeset label was invented or applied; there is none in this repo.

The dist measurement was taken rather than asserted: packages/app-shell/dist built twice, once per leg, sha256-compared — identical, 862 emitted files, 431 of them .d.ts. Mechanism named: tsconfig.json excludes **/*.test.tsx from the build program, so a test-only change cannot move emitted output.

⛔ And the trap, which is new to this lane's notes: the first attempt produced an empty dist/ and would have read as a false "identical". tsc is composite — with tsconfig.tsbuildinfo left in place it skips the emit entirely. Clearing dist/ alone is not enough; the build info has to go too, or you are comparing two empty directories and calling them equal.

That joins the two measurement traps this lane already carries — gzip storing the source filename in its header, and a zero byte-size delta over non-identical content (index.umd.cjs on #5626, differing at char 2083 with equal length). All three have the same shape: a measurement that returns the expected answer for the wrong reason.

The ledger, and the finding inside it

Covered in full on #5574. The two things worth restating on the PR itself:

It is a ledger, not an allowlist, by construction. Exact set equality in both directions — a listed renderer that leaks one more attribute fails, and one that stops leaking also fails until its row is deleted. Nothing is skipped, it.skip-ed or quarantined; all 158 targets render and are scanned every run. The three meta-cases (no renderer in two groups; every readiness override carries a reason and every reason an override; the four card-named renderers ledgered while ui:grid must not be) are what stop it decaying.

The 16 phantom cleans are the real discovery. First pass read 46 clean; 16 of those rendered nothing or threw into an attribute-clean error boundary, and once made to render real markup, 7 leaked. A DOM-attribute gate cannot tell "safe" from "absent" without a rendering-something precondition. Finding that before publishing the ledger is the difference between a census and a comfortable number.

Two details I would have missed and am recording: BARE_SPREAD_ON_SVG preserves camelCase because SVG attribute names are case-sensitive and a lowercased ledger would have dropped those two; and ui:sidebar-trigger leaks schema itself — the node SchemaRenderer injects on every render.

ui:grid clean means #4787 / PR #5573, which this lane landed in round 4, is now pinned by a gate from both sides instead of by hand.

Findings

#5630 and #5631 labelled finding + domain:ui, unassigned. #5631 got a note distinguishing it from #5586 and #5622 — three defects on one resolver, wrong schema key vs wrong name vs wrong resolver table, none a duplicate of the others.

Burn-down: I am not filing eight cards unilaterally. Reasoning and what I will file instead is on #5574.

Not counted as evidence

The bundle bot's PASS; the check_suite.completed bursts.

Landing now.


Generated by Claude Code

@os-sales
os-sales marked this pull request as ready for review August 21, 2026 19:37
@os-sales
os-sales added this pull request to the merge queue Aug 21, 2026
Merged via the queue into main with commit f52d36c Aug 21, 2026
22 checks passed
@os-sales
os-sales deleted the claude/issue-5574-widget-dom-leak-sweep-components branch August 21, 2026 19:38
os-zhuang pushed a commit that referenced this pull request Aug 23, 2026
…s (objectui#5630)

`element:definition-list`, `element:repeater` and `element:metadata_viewer`
were swept by the DOM-leak gate only through their empty-state placeholder
branch, so their clean reading never covered the element each renderer
actually spreads onto once it has real content (objectui#5630, filed against
the widening in #5629/#5574).

Deepens each fixture past the placeholder:
- `element:definition-list`: authors `items` (pure schema, no host needed).
- `element:repeater`: adds a per-target `AdapterCtx.Provider` fixture whose
  `find()` returns a row. Measured, not assumed: `useAdapter()` reads
  `AdapterCtx`, a channel `SchemaRendererProvider`'s `dataSource` prop
  (`FAKE_ADAPTER`) never populates — so the issue's own description of the
  mechanism ("FAKE_ADAPTER answers with no rows by design") undersold it; the
  renderer's effect short-circuits on `!adapter` before ever calling `.find()`
  on ANY fixture, and widening what `FAKE_ADAPTER` returns would have changed
  nothing.
- `element:metadata_viewer`: adds a per-target `MetadataCtx.Provider` fixture
  resolving a `permission` metadata item, the third and independent data
  channel this family uses (`useMetadataItem()`).

`FAKE_ADAPTER`'s empty answer stays exactly as load-bearing for the other 155
targets as before — both new hosts are additive and scoped to one target each.

All three read CLEAN in the populated branch, same as the placeholder branch
— traced, not just measured: neither `basic/data-list.tsx` nor
`basic/metadata-viewer.tsx` spreads `{...props}` (or any rest of the props
`SchemaRenderer` hands these components) onto a DOM element anywhere in
either file, in any branch. Reverse-verified per target: a deliberately
planted leak on each now-reachable populated-branch element failed the gate
under the deepened fixture (confirmed via `git diff --stat` before revert)
and was reverted without being committed — proving the instrument, not just
predicting it.

`READY_OVERRIDE_REASONS` shrinks from six entries to four, by TWO rather than
the three predicted at dispatch time. `element:definition-list` and
`element:repeater` drop their entries entirely: their populated `<dl>`/`<ul>`
both fold `schema?.className` into their own `cn(...)`, so the shared
readiness class reaches the DOM once there is real content, same as any
plain target. `element:metadata_viewer` does NOT drop out — measured against
that expectation, not assumed: its `Shell` wrapper's className is hardcoded
in every branch (`ViewerProps` declares no `className` field at all), so no
fixture depth changes that. Its entry is rewritten to name the real render
instead of the not-found placeholder, not deleted.

Test-only change — no renderer source touched, no published behaviour
changes (empty-frontmatter changeset).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Aug 23, 2026
…s (objectui#5630) (objectstack-ai#5787)

`element:definition-list`, `element:repeater` and `element:metadata_viewer`
were swept by the DOM-leak gate only through their empty-state placeholder
branch, so their clean reading never covered the element each renderer
actually spreads onto once it has real content (objectui#5630, filed against
the widening in objectstack-ai#5629/objectstack-ai#5574).

Deepens each fixture past the placeholder:
- `element:definition-list`: authors `items` (pure schema, no host needed).
- `element:repeater`: adds a per-target `AdapterCtx.Provider` fixture whose
  `find()` returns a row. Measured, not assumed: `useAdapter()` reads
  `AdapterCtx`, a channel `SchemaRendererProvider`'s `dataSource` prop
  (`FAKE_ADAPTER`) never populates — so the issue's own description of the
  mechanism ("FAKE_ADAPTER answers with no rows by design") undersold it; the
  renderer's effect short-circuits on `!adapter` before ever calling `.find()`
  on ANY fixture, and widening what `FAKE_ADAPTER` returns would have changed
  nothing.
- `element:metadata_viewer`: adds a per-target `MetadataCtx.Provider` fixture
  resolving a `permission` metadata item, the third and independent data
  channel this family uses (`useMetadataItem()`).

`FAKE_ADAPTER`'s empty answer stays exactly as load-bearing for the other 155
targets as before — both new hosts are additive and scoped to one target each.

All three read CLEAN in the populated branch, same as the placeholder branch
— traced, not just measured: neither `basic/data-list.tsx` nor
`basic/metadata-viewer.tsx` spreads `{...props}` (or any rest of the props
`SchemaRenderer` hands these components) onto a DOM element anywhere in
either file, in any branch. Reverse-verified per target: a deliberately
planted leak on each now-reachable populated-branch element failed the gate
under the deepened fixture (confirmed via `git diff --stat` before revert)
and was reverted without being committed — proving the instrument, not just
predicting it.

`READY_OVERRIDE_REASONS` shrinks from six entries to four, by TWO rather than
the three predicted at dispatch time. `element:definition-list` and
`element:repeater` drop their entries entirely: their populated `<dl>`/`<ul>`
both fold `schema?.className` into their own `cn(...)`, so the shared
readiness class reaches the DOM once there is real content, same as any
plain target. `element:metadata_viewer` does NOT drop out — measured against
that expectation, not assumed: its `Shell` wrapper's className is hardcoded
in every branch (`ViewerProps` declares no `className` field at all), so no
fixture depth changes that. Its entry is rewritten to name the real render
instead of the not-found placeholder, not deleted.

Test-only change — no renderer source touched, no published behaviour
changes (empty-frontmatter changeset).


Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4m

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.

2 participants