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

fix(plugin-detail): a related-list toolbar action authored visible: false is hidden (objectui#11244) - #11275

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-11244-related-toolbar-visible-gate
Sep 30, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-11244-related-toolbar-visible-gate

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #11244

Clause-②: no

What this does

RelatedToolbarButton (the list_toolbar header button of a related list, in packages/plugin-detail/src/RelatedList.tsx) decided whether an action declared a visible gate by truthiness: if (visiblePred && !isVisible) return null;. A literal visible: false is falsy, so the gate was skipped and the button rendered for everyone.

It now asks the question with the existing hasDeclaredVisibilityGate, imported from @object-ui/components like the rest of the action family (objectui#3812): if (hasDeclaredVisibilityGate(visiblePred) && !isVisible) return null;. No second gate helper was added. The useCondition(..., { throwOnError: true }) evaluation from PR objectui#11237 is unchanged, so a predicate that faults still hides the button and is reported once.

@object-ui/plugin-detail already imported from @object-ui/components (a peer and dev dependency), so no manifest changed. RelatedRecordActionsBridge's deriveActions and the record:related_list renderer (PR objectui#11263) are not touched. The authored actions of that renderer render through this same button, so the fix reaches them.

authored visible before after
false shown hidden
true / absent shown shown
'' shown (no gate) shown (no gate)
' ' (whitespace only) hidden shown (no gate)
CEL that answers true / false shown / hidden shown / hidden
CEL that faults hidden, reported once hidden, reported once

The whitespace row moves too. The helper reads a blank predicate as no gate (objectui#3960), as every other action surface already does, so a whitespace-only visible no longer hides the button from everyone. The changeset says so.

Pins

A new describe block for objectui#11244 sits in related-toolbar-visible.test.tsx, next to the objectui#11212 visible pins. It covers visible: false hides (the DETECTOR), visible: true shows, a blank visible ('' and whitespace) shows, and a CEL string that answers true shows while one that answers false hides. The fault leg stays pinned by the existing objectui#11212 block in the same file ("hides a toolbar action whose predicate faults, and reports it once, naming the action"). It is also pinned by the related-list toolbar block in app-shell's currentUserCan-failClosed-11212.render.test.tsx. Both are green on this branch.

Evidence

All commands ran from the worktree root. Heavy runs went through the shared verify lock.

  • Red first at d9f1e02782 (the pins committed before the fix): pnpm exec vitest run packages/plugin-detail/src/__tests__/related-toolbar-visible.test.tsx gave Tests 2 failed | 10 passed (12). The failures were "hides a toolbar action authored visible: false (DETECTOR)" (expected BUTTON to be null) and the whitespace row.
  • After the fix (2abde71912): the same file gave Tests 12 passed (12).
  • Reverse verification on the committed fix, through objectstack's scripts/ablation-replace.mjs in wrap mode, under the lock. The anchor if (hasDeclaredVisibilityGate(visiblePred) && !isVisible) return null; was replaced by the truthiness spelling (anchor x1 to x0, blob 66ad00d94746 to 39e8edddf778). The run gave Tests 2 failed | 10 passed (12), the same two tests. The restore was proven: blob after restore == blob at HEAD (66ad00d94746), and git diff HEAD was empty. The direction was the expected one (turns red). The subject resolves from source (../RelatedList), so no dist/ leg applies.
  • Same-day churn: main was merged at 18d1a0abd3. It carries PR objectui#11264 (f61dab169f, which edits RelatedList.tsx at the emitted reference key, a disjoint hunk), PR objectui#11265, PR objectui#11267 and PR objectui#11268. The merge commit is c0d0a869b9. Everything below ran on c0d0a869b9, after the merge.
    • pnpm --workspace-concurrency=2 --filter '@object-ui/plugin-detail^...' build: Scope: 12 of 47 workspace projects, exit 0.
    • pnpm --filter @object-ui/plugin-detail type-check (echoed tsc --noEmit && tsc -p tsconfig.test.json): exit 0. tsc -p tsconfig.test.json --listFiles lists related-toolbar-visible.test.tsx (1 hit), so the type-check covers the new pins.
    • pnpm exec vitest run packages/plugin-detail/ packages/app-shell/src/providers/__tests__/currentUserCan-failClosed-11212.render.test.tsx: Test Files 228 passed | 1 skipped (229), Tests 2292 passed | 8 skipped (2300), exit 0. A verbose rerun of the two named files gave Tests 40 passed (40). The outside suite was found with git grep -l RelatedToolbarButton, and it is the only one outside the package.
    • Repo checks, each exit 0. check:action-forward-parity printed "action forward parity: 5 surfaces checked … 0 known gaps". check:handler-key-reads printed OK. check:new-line-citations printed "0 new citation(s)". check:control-bytes printed OK. node scripts/check-changeset-presence.mjs found 1 changeset added for the released source. check:changeset-claims printed "Every package declared … is either not negated". It also listed a pending changeset that names RelatedList.tsx (plugin-detail-8937-parent-scope-residue.md, about the parent-scope pointer comment). This diff does not touch that comment, so the paragraph still holds. check:phantom-deps, check:pending-changeset-literals, check:test-path-roots, check:action-ref-convention and check:vi-mock-specifiers all exited 0.
    • Lint was narrowed to the one package this diff touches: pnpm exec eslint . --format json in packages/plugin-detail, the package's own lint script scope. It linted 280 files with 0 errors. Type-aware linting is not enabled (eslint.config.js sets no parserOptions.project or projectService), so this diff cannot move a verdict in any file outside it. The repo-wide pnpm lint is left to CI.

Acceptance notes

These came from the sweep of packages/plugin-detail/src that the dispatch asked for. None of them is changed here.

  • No other truthiness gate in the package. I grepped the package's non-test source for a visible / disabled / enabled / hidden value or verdict joined by &&. At this branch it finds only the gate fixed here. At the base commit f4ed2387e9 it finds the old if (visiblePred && !isVisible), which is the control. The header built-ins in DetailView.tsx read userActions.*.visibleWhen ?? true and disabledWhen != null && …. Those are null checks, not truthiness, so visibleWhen: false hides there.
  • A detail-view tab's string visible is never evaluated. This is a different class, not truthiness. DetailTabs returns true for any string visible, with the comment "Simple expression evaluation could go here". I measured it once with a throwaway jsdom probe through the real DetailView (not committed): a tab with visible: '1 == 2' rendered, and a tab with visible: false was hidden. objectui's own DetailViewTabSchema.visible admits a string and describes it as "Tab visibility condition". I found no named producer and did not measure it through a public door. The two in-repo producers of a detail-view node emit no tabs. Noted here for the seat. Nobody carries it.
  • The list_item row path asks "declared?" with its own check. It uses components' isCustomRowActionVisible and plugin-grid's twin, which test pred == null || pred === ''. That is not truthiness, so visible: false hides a row action. But it is a second definition next to hasDeclaredPredicate, whose header says nothing else in the repo asks the question. On a whitespace-only visible the two can disagree. I read this and did not measure it. Nobody carries it.

Session: session_0122Knsowci76D2rBWReCzzZ (objectui domain:ui seat 1, dispatched os-dev).


Generated by Claude Code

…eclaredness (objectui#11244)

Red before the fix: a `list_toolbar` action authored `visible: false`
renders through the real `RelatedToolbarButton`, and a whitespace-only
`visible` hides it.

Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ
Co-authored-by: Claude <noreply@anthropic.com>
… gate is declared with `hasDeclaredVisibilityGate` (objectui#11244)

`RelatedToolbarButton` tested the gate by truthiness, so a `list_toolbar`
action authored `visible: false` skipped the verdict and rendered. It now
asks the question the rest of the action family asks (objectui#3812):
`visible: false` hides, a blank predicate is no gate, a CEL string is
evaluated, and the objectui#11212 fail-closed leg on a fault is unchanged.

Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ
Co-authored-by: Claude <noreply@anthropic.com>
… toolbar `visible` gate (objectui#11244)

Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ
Co-authored-by: Claude <noreply@anthropic.com>
…gate

Same-day churn: PR objectui#11264 (f61dab1) edits RelatedList.tsx at the
emitted `reference` key, disjoint from the toolbar gate; PR objectui#11265,
objectui#11267 and objectui#11268 ride along.

Claude-Session: https://claude.ai/code/session_0122Knsowci76D2rBWReCzzZ
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 1 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/plugin-detail-8937-parent-scope-residue.md

  • names RelatedList.tsx → packages/plugin-detail/src/RelatedList.tsx — edited by this change

    • packages/plugin-detail/README.md (it is in files[], so it ships). It said the node's filter is AND-combined with { [relationshipField]: parentId }, full stop. Since objectui#7299 the parent condition is compiled to match the relationship field's arity, so a multi-valued relationship gets { [relationshipField]: { $contains: parentId } } instead. The paragraph now states both spellings and names the arbiter (@objectstack/spec/data's isMultiValueField). - The claim that the SQL driver decides arity on that same predicate. It does not: driver-sql gates the equality family on its own storage question, which reads multiple as truthy on ANY type. The two rules therefore disagree for a type outside MULTI_CAPABLE_TYPES carrying multiple: true. objectui#9184 moved the arity compiler into @object-ui/core's parent-scope seam and carried the claim with it, so the correction is recorded there — the seam now states the driver's measured rule, records the divergence as a divergence, and points at the upstream card that owns which of the two rules is right (objectstack#17469). RelatedList.tsx's pointer comment and the objectui#7299 test header carried the same sentence and are corrected to match.

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 1cb3732ce (merge-base with origin/main): 2 file(s) changed outside .changeset/, read against 1847 pending declaration(s) that publish a body (2459 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 330 chunks) 3583.9 KB 3607.4 KB
Main entry chunk (gzip) 150.0 KB 350 KB
Entry file index-DOwo7ics.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 (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.88KB 6.25KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.11KB 3.87KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.22KB 10.61KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.17KB 5.40KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.70KB 3.93KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.70KB 10.94KB
auth (createAuthenticatedFetch.js) 8.54KB 3.46KB
auth (index.js) 3.63KB 1.64KB
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.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
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) 570.09KB 136.40KB
core (index.js) 10.00KB 3.96KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 228.86KB 63.53KB
fields (index.js) 261.11KB 66.26KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.35KB 9.18KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 41.23KB 11.53KB
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.99KB 0.87KB
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) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.86KB 5.00KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.52KB 2.26KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 52.17KB 15.06KB
plugin-charts (index.js) 84.09KB 22.93KB
plugin-chatbot (index.js) 198.22KB 46.97KB
plugin-dashboard (index.js) 138.72KB 37.05KB
plugin-designer (index.js) 216.32KB 44.56KB
plugin-detail (index.js) 244.72KB 64.45KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 173.61KB 44.59KB
plugin-gantt (index.js) 173.03KB 43.07KB
plugin-grid (index.js) 231.28KB 63.53KB
plugin-kanban (index.js) 48.62KB 15.21KB
plugin-list (index.js) 116.42KB 28.89KB
plugin-map (index.js) 23.50KB 7.82KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.04KB 12.21KB
plugin-timeline (index.js) 33.05KB 9.67KB
plugin-tree (index.js) 11.20KB 3.89KB
plugin-view (index.js) 90.32KB 22.76KB
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.81KB 3.58KB
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) 4.47KB 1.63KB
react (SchemaRenderer.js) 119.55KB 39.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.50KB 1.99KB
sdui-parser (codegen.js) 9.45KB 3.76KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 6.06KB 2.68KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 21.42KB 7.05KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 3.19KB 1.62KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.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 (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.26KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 2.52KB 1.31KB
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 (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 21.59KB 7.71KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: c0d0a869b95bd20c13073a20bd88114d9a3624a0
Local-runs: none

Inputs, and nothing else: card objectui#11244 (body; triage 5917804144; claim 5919596741; dev report 5920356661), PR objectui#11275 (body, /files: 3 files, +75 / −1), the net diff git diff 18d1a0abd3 c0d0a869b9 (18d1a0abd3 is the head's merge base with current origin/main), and the head's check-runs, read twice. Read-only context: objectui#3812, objectui#3842, objectui#3960, objectui#11212, PR objectui#11237. No worktree, build, test or gate run.

The head is a merge commit (c0d0a869b9 = branch 58ff0831ef + main 18d1a0abd3). git diff-tree --cc on it is EMPTY, so it carries no conflict-resolution edit; the +/− lines of the pre-merge diff (f4ed2387e9..58ff0831ef) and the post-merge diff (18d1a0abd3..c0d0a869b9) are byte-identical. Main's own hunk in RelatedList.tsx between the two bases is @@ -1573,13 +1573,13 @@ (PR objectui#11264's reference key), disjoint from the gate at :456. The three PR files are the whole net diff.

① Derived judgments

  1. The gate. packages/plugin-detail/src/RelatedList.tsx:456 reads if (hasDeclaredVisibilityGate(visiblePred) && !isVisible) return null;, replacing the truthiness test. The helper is imported from @object-ui/components (:28), where the barrel re-exports core's one definition hasDeclaredPredicate (components/src/index.ts:60, visibility-gate.ts); no copy, no second helper, no new function anywhere in the diff. That is triage's direction (5917804144) word for word: hasDeclaredVisibilityGate(visiblePred) for the test, ⛔ no second gate helper honoured. Right.
  2. The fault leg is unchanged. useCondition(toPredicateInput(visiblePred), undefined, { throwOnError: true, label }) at :452–455 is untouched by the diff (only the if line and the header comment moved). PR objectui#11237's fail-closed policy on a fault stands. Right.
  3. Accept-set. RelatedRowActionDef (react/src/context/RelatedRecordActionsContext.tsx:39) admits visible through its index signature [k: string]: unknown; no type, zod mirror, prop or export changed. A value the surface already accepted (visible: false) changes verdict from shown to hidden: a bug fix on an existing accept-set, not a widening. Clause-②: no is the right reading. Right.
  4. Whitespace-only visible: hidden before, shown after. Follows from the ruled helper: hasDeclaredPredicate folds '', whitespace-only text and a blank-source envelope to "not declared" (objectui#3850 / objectui#3960, core/src/evaluator/declaredPredicate.ts). It IS the family's rule on the sibling surfaces: DeclaredActionsBar.tsx:346 and useNavRunAction.ts:170 both ask the same helper, so whitespace is "no gate" there too, and the helper's own docblock records the same ' ' HIDDEN to shown move on action:button. Disclosed in the changeset ("A whitespace-only visible used to hide the button; it now shows"), in the PR's before/after table, and pinned by the it.each blank row in related-toolbar-visible.test.tsx. The one new side effect the helper brings, a once-per-spelling [blank] report on a blank gate (ADR-0137 D4), is family-wide and the pin's console.warn spy covers it. Right, and correctly disclosed.
  5. The three pins triage asked for are present in one new describe block, rendering the real component from ../RelatedList through PredicateScopeProvider: visible: false hides (the DETECTOR, with a companion button proving the render), visible: true shows, '' and ' ' show as no gate, a CEL string is evaluated ('1 == 1' shows, '1 == 2' hides). The dev's red-first run reports exactly the two rows the truthiness gate gets wrong (false, whitespace), and the ablation turned the same two red again. Right.
  6. The fault leg needs no new pin. Both existing pins exercise this exact component at the head: the objectui#11212 block in the same file imports RelatedToolbarButton from ../RelatedList and renders visible: 'nope.deep == 1'; app-shell's currentUserCan-failClosed-11212.render.test.tsx:74 imports it from ../../../../plugin-detail/src/RelatedList (source, not dist) and drives it through VISIBLE_LEGS (not-loaded / granted / denied, plus the unbound-root fault at :349–357). After the change the helper answers true for any non-blank string, so a faulting predicate still reaches !isVisible and the hide still depends on throwOnError; removing that option would fail-soft to shown and turn both pins red, independently of the helper. Right.
  7. Public surface and reach. RelatedToolbarButton is not a package export (plugin-detail/src/index.tsx exports RelatedList and RelatedListProps); it is mounted from permittedToolbarActions at RelatedList.tsx:2292–2293, which the related-list / related_list registry types and renderers/record-related-list.tsx:442 all reach through RelatedList. So the record:related_list public door named on the card is covered without touching that renderer or deriveActions, as the claim forbade. @object-ui/components was already a peer (workspace:^) and dev dependency of @object-ui/plugin-detail; no manifest changed. Right.
  8. Sweep. A grep of packages/plugin-detail/src non-test source at the head for a visible / disabled / enabled / hidden value joined by && finds only :456, now the helper. The pending changeset that names RelatedList.tsx (plugin-detail-8937-parent-scope-residue.md) is about the parent-scope pointer comment at :474–500, which this diff does not touch. Right.

② Semver level

.changeset/11244-related-toolbar-visible-gate.md declares '@object-ui/plugin-detail': patch. The diff publishes one behaviour fix in one package's shipped source and consumes an already-exported helper of a package it already depends on; no export, type, manifest or accepted shape changes, so nothing else needs a bump and patch is the level. The changeset text names both verdict moves (false now hides; whitespace now shows) and the unchanged fault leg. The PR body and the claim both carry Clause-②: no, and ① item 3 confirms it. Check-runs Changeset Declaration, Changeset Bump Policy, Changeset Fixed Group Check, Changeset Claim Re-read and Changeset Overwrite Report all concluded success. Right.

③ Boundary flags

Dev deviations (5), open_questions (none), out_of_scope_findings (3), and the head's check-runs:

  • Deviation 1, whitespace flip. Answered in ① item 4: the family's rule, disclosed and pinned. Not a separate change. Accepted.
  • Deviation 2, no new fault-leg pin. Answered in ① item 6: both existing pins render this component from source at the head and remain detectors of throwOnError. Accepted.
  • Deviation 3, commit trailers. The four branch commits carry the Claude-Session trailer plus a co-author line that names no model; a process note under objectui AGENTS.md, with no bearing on the contract. Noted.
  • Deviation 4, worktree removed after the PR opened. Process; no bearing. Noted.
  • Deviation 5, resume notice. The PR head is c0d0a869b9, which already merges main 18d1a0abd3; main has since moved to 1cb3732ce2 with no change under packages/plugin-detail, and the PR reads mergeable: true. The merge queue rebuilds on main. Noted.
  • Finding 1, no other truthiness gate in plugin-detail. Confirmed by my own grep (① item 8). Acceptance notes; nothing to file.
  • Finding 2, DetailTabs never evaluates a string visible. Confirmed by reading: DetailTabs.tsx:28–33 returns true for any string ("Simple expression evaluation could go here"), while DetailViewTabSchema.visible admits z.union([z.boolean(), z.string()]) (types/src/zod/views.zod.ts:146) and DetailView.tsx:2023–2024 passes schema.tabs through unfiltered. It is NOT this card's family: the objectui#3812 class mis-classifies a DECLARED gate by truthiness (a boolean false renders), whereas here the boolean is honoured and the authorable string is inert, never evaluated (an unenforced authorable key, the enforce-or-remove class). As it stands it fails the filing gate on both legs: the dev's jsdom probe went through the DetailView component, not the registered detail-view node, and no in-repo producer emits tabs. It belongs in Acceptance notes, where the dev put it, and would become fileable on its own card (not a rider on objectui#11244) with one probe through the registered detail-view renderer carrying authored tabs, or a named producer. Not blocking.
  • Finding 3, isCustomRowActionVisible as a second "declared?" definition. Read-only inference, and the reading holds at the head: components/src/renderers/complex/data-table.tsx:286 and plugin-grid/src/components/RowActionMenu.tsx:248 ask pred == null || pred === '', then evalRowActionVisibility hands a whitespace-only string to evalRowPredicate with fallback: false, which returns the fallback on !source.trim() (core/src/evaluator/listConditional.ts:253). So on the row path a whitespace-only visible HIDES the action, while the helper's family (and this PR's toolbar) SHOW it: a verdict-level divergence, the objectui#3960 blank-spelling class, contradicting declaredPredicate.ts's claim that nothing else in the repo asks the question. Unmeasured and without a named producer, it belongs in Acceptance notes as it stands; it is one row-menu probe away from fileable on its own card. Not blocking here.
  • Check-runs on c0d0a869b9 (42 runs): 31 concluded success (including Lint, Type Check, Test (shard 1/8), Test (dist pins), Build & E2E, Build Docs, Bundle Analysis, the five changeset gates, Line Citation Gate, Control Byte Scan, Governed Surface Queue Guard, label); 3 skipped (Test (coverage), the templated coverage-shard lane, dependabot, the usual skip lanes); none failure. Not concluded, named and not adopted either way: Test (shard 2/8), Test (shard 3/8), Test (shard 4/8), Test (shard 5/8), Test (shard 6/8), Test (shard 7/8), Test (shard 8/8), Spec Main Shape Gate, all still in_progress at the second read. This verdict is on the contract; the merge queue holds on those eight.

Implemented-by: claude/issue-11244-related-toolbar-visible-gate
Reviewed-by: session_0122Knsowci76D2rBWReCzzZ

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 30, 2026 22:02
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 30, 2026
Merged via the queue into main with commit e420df3 Sep 30, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-11244-related-toolbar-visible-gate branch September 30, 2026 22:18
huangyiirene pushed a commit that referenced this pull request Sep 30, 2026
Carries main through PR #11275. No conflicts.

Claude-Session: https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh
Co-authored-by: Claude <noreply@anthropic.com>
akarma-synetal pushed a commit to akarma-synetal/objectui that referenced this pull request Oct 7, 2026
…, mirror two chatbot keys, file eighteen runtime slots by name (objectui#6152, round 4) (objectstack-ai#11285)

Refs objectstack-ai#6152
Clause-②: yes (narrowing). The two mirrors widen `@object-ui/types/zod`
and the strict authoring face to keys the TypeScript face already
invited and the renderers read (`requestBody`, `floatingConfig`). The
four retirements (`label.content`, `report.chartConfig`,
`report.reportType`, `detail-view.autoDiscoverRelated`) narrow both
faces at once, under the startup no-gradualism rule. It is priced in
`.changeset/6152-unmirrored-round4.md` as `minor`, with the break
stated.

Round 4 of objectui#6152, dispatched under claim `5919877490` (the
`domain:devx` seat 2, session `session_01TdiauJaVCHuj45EzZGUxHh`, on the
maintainer's direct order). The rulings are the seat review
`5914490915`: Q1 B, Q2 A, Q3 B. ⛔ This is a draft from a dispatched dev:
do not mark it ready and do not enable auto-merge. The card stays open,
because `ObjectGridSchema`, the spec-derived pairs and three
`DataTableSchema` keys (below) are not this round's.

## What changed

1. **Q1 B: `LabelSchema.content` is retired.** It is `?: never` on
`form.ts` and a `retirementTombstone` on `form.zod.ts` that names the
kept spellings `text` and `label`. The `label` renderer drops its third
read limb (`schema.text || schema.label`). Re-measured: 0 documents
author it (JSON, Markdown JSON fences and typed literals); its only
author was a test in `form-renderers.test.tsx`, which now pins the
refusal. Which of `text` / `label` is canonical is not decided here.
2. **Q2 A: `DetailViewSchema` `activities`, `comments`, `history` and
`recordNavigation` go to `RuntimeOnlyDeclared` by name.** Each has a row
with its reason on `RuntimeOnlyNamedAllowList`, in round 3's shape. They
carry host-fetched runtime data, and `recordNavigation.onNavigate` is a
required function.
3. **Q3 B, under objectui#7654 ruling B: `displayMode` keeps its
TypeScript-only refusal.** It gets no zod arm, because stored designer
documents carry `displayMode: 'floating'` (pinned by
`chatbot-display-mode-retired.test.ts`). The ledger entries no longer
call the mirror half "owed"; the key stays listed by decision.
Separately, after a reader census for each:
- `ChatbotSchema.requestBody` is mirrored through the shared pick. All
three chatbot registrations read it (`body: schema.requestBody`).
- `ChatbotFloatingSchema.floatingConfig` is mirrored through a
module-private restatement of `FloatingChatbotConfig`. That restatement
judges the six members `FloatingChatbot` destructures, and carries the
`triggerIcon` tombstone's runtime half that the objectui#7654 tripwire
asked for.
4. **The three zero-read candidates are retired on both faces.** They
are `ReportComponentSchema.chartConfig`,
`ReportComponentSchema.reportType` and
`DetailViewSchema.autoDiscoverRelated`, each `?: never` plus a
`retirementTombstone`. `reportType`'s one in-code producer,
`specReportToPresentation` in `spec-report.ts`, no longer writes it, and
`LegacyReportPresentationLike` no longer declares it.
5. **`DataTableSchema`: 14 of 17 keys go to `RuntimeOnlyDeclared` by
name.** They are produced only in code, by `ObjectGrid`'s in-code
`data-table` node or `RelatedList`'s, and authored by no document. Three
keys fit none of the classes, so the round stopped at them (see
"Stopped" below).
6. **The pagination corpus fix, carried from round 3.**
`components-basic-pagination/with-item-count.json` no longer authors
`pageSize` / `totalItems`, which neither face declares and nothing
reads. The plaintext interface block on
`content/docs/components/basic/pagination.mdx` stops listing them, and
its section is retitled from "With Page Size" to "On a Later Page".
7. **Changesets.** One new: `.changeset/6152-unmirrored-round4.md`
(`@object-ui/types` minor, `@object-ui/components` minor, with the break
stated). Four dated, append-only corrections were added, each 2 lines
with frontmatter unchanged: `6639-objectgrid-title-mirrored.md` (the
stale "97 + 1 + 23" sentence),
`7654-floating-chatbot-trigger-icon-tombstone.md`,
`7655-chatbot-registration-authoring-faces.md` and
`9447-detail-view-handler-key-refusal.md`. Every other pending changeset
was re-read after the merges, including the 8 that landed since the
base, and none is made false by this round.

## Ledger totals, before and after

These are read by the file's own pins (`objectui#7279` derives every
figure) and re-counted with the TypeScript parser on the final head.

| ledger | before (`origin/main` `e420df3`) | after (`2cc4ab9`) |
| --- | --- | --- |
| `UnmirroredDeclared` | 9 entries / 44 keys: 3 / 14 spec-derived, 6 /
30 local | **6 / 20**: 3 / 14 spec-derived, 3 / 6 local |
| `RuntimeOnlyDeclared` | 4 / 9 | **4 / 27** |
| `RuntimeOnlyNamedAllowList` | 1 entry / 2 rows | 3 / 20 |
| cross-ledger | 2 of the 4 are in `UnmirroredDeclared`; union 11 = 9 +
2 | **1 of the 4**; union **9** = 6 + 3 |
| `KnownDrift` | 49 / 86 | 49 / 86, unchanged. This round does not edit
its total line; PR objectstack-ai#11269's 87 to 86 edit is kept as merged. |
| `WiderThanDeclared`, `MirroredUndeclared` | 3 / 3, 2 / 2 | unchanged |

The 24 keys that left `UnmirroredDeclared` moved by three routes, which
must not be added up as one repair: 2 were mirrored, 4 were retired, and
18 were reclassified by name. The reclassification is one move seen from
both ledgers: it is not new debt, and it mirrors nothing.

## Per-key table

| pair · key | measured (type-checker read census over 5548 sources;
authored census over tracked JSON, Markdown JSON fences and `type`
literals) | route |
| --- | --- | --- |
| `label` · `content` | 1 read (the third limb in `label.tsx`), 0
documents (1 test) | retired on both faces; the read is dropped |
| `report` · `chartConfig` | 0 typed reads. The untyped
`widget?.chartConfig` hits are plugin-dashboard's `DatasetWidget`
(`widget: any`, a dashboard widget), which plugin-report never imports.
0 documents | retired on both faces |
| `report` · `reportType` | 0 reads; one in-code producer
(`specReportToPresentation`); 0 documents | retired on both faces; the
producer write is removed |
| `detail-view` · `autoDiscoverRelated` | 0 reads (typed or untyped), 0
documents | retired on both faces |
| `chatbot` · `requestBody` | 3 reads (all three chatbot registrations)
| mirrored (shared pick) |
| `chatbot-floating` · `floatingConfig` | 1 read
(`floatingConfig={schema.floatingConfig}`); 6 of 7
`FloatingChatbotConfig` members read, and `triggerIcon` 0 | mirrored,
with a `FloatingChatbotConfig` restatement |
| `chatbot`, `chatbot-floating` · `displayMode` | 0 reads; stored
documents carry it | unchanged by ruling (TypeScript-only refusal) |
| `detail-view` · `activities` (7 reads), `comments` (4), `history` (7)
| host-fetched rows; 0 documents | `RuntimeOnlyDeclared` by name |
| `detail-view` · `recordNavigation` | 11 reads; its value carries a
required function | `RuntimeOnlyDeclared` by name |
| `data-table` · `disableInnerScroll`, `manualPagination`,
`manualSearch`, `manualSorting`, `page`, `rowActionDefs`,
`rowClassName`, `rowCount`, `rowStyle`, `search`, `selectionResetKey`,
`showAddRow`, `showSelectionCount`, `sort` | read by `data-table`;
produced only in code (`ObjectGrid`, `RelatedList`); 0 docs and 0
catalog documents | `RuntimeOnlyDeclared` by name; the reasons are on
the allow-list |
| `data-table` · `editable`, `singleClickEdit` | read; produced in code
by `ObjectGrid`; 0 documents, but `data-table.mdx` lists both and
teaches `editable: true` | **stopped**, ruling needed |
| `data-table` · `selectionStyle` | read; 0 producers and 0 documents (0
hits in objectstack too) | **stopped**, ruling needed |

## Runtime probe for the three zero-read retirements

AGENTS.md requires more than a source census, because leftover keys
reach a renderer as spread props. So the probe used the real
`SchemaRenderer` and the real registry, and varied only the key. It was
a one-off: the files were deleted afterwards and `git diff HEAD` is
empty.

- `report`: the DOM is identical with and without `chartConfig` plus
`reportType` (797 = 797 characters, byte-equal). Lit control: changing
`title` changes the DOM (805).
- `detail-view`: the DOM is identical with and without
`autoDiscoverRelated: true`, after normalising React's `useId` tokens.
The only raw difference was `radix-_r_5_` against `radix-_r_d_`. The
data-source and `fetch` call log is identical:
`getObjectSchema(account)` and two `security/explain` fetches. Lit
control: changing `title` changes the DOM (5943 against 5951).

## Ablations

The predictions were written at `4c272dc` before any run, and every leg
was restored with the blob equal to `HEAD` and `git diff HEAD` empty.

- **A1:** plant a `LabelSchema` literal carrying `content` into
`label.tsx`. Components `tsc --noEmit` exits 2 with exactly one TS2322
there (`'string' is not assignable to type 'undefined'`), as predicted.
This red direction also shows the consumer read the rebuilt `.d.ts`.
- **A2:** restore the four `zod/*.zod.ts` files to base `f61dab1`.
`unmirrored-declared-round4-6152.test.ts` reads `27 failed | 6 passed
(33)`, exactly as predicted, and `tsc -p tsconfig.test.json` exits 2
with its only error in the ledger reconciliation of
`zod-mirror-parity.test.ts`.
- **A3:** rename the allow-list row `rowCount` to `rowCountRenamed`.
`tsc -p tsconfig.test.json` exits 2 with exactly two TS2344, at the two
allow-list pins, as predicted.

## Verification on the final head `2cc4ab9`

This round resumed after two container restarts, so every run below was
redone on `2cc4ab9`. That head carries `origin/main` `e420df3`, merged
twice (never rebased): once through PR objectstack-ai#11275, and before that through
PRs objectstack-ai#11267, objectstack-ai#11268, objectstack-ai#11269, objectstack-ai#11271, objectstack-ai#11273 and objectstack-ai#11274. Each run went
through the shared verify lock with at most 2 workers.

- `@object-ui/types`: `type-check` (the `--noEmit`,
`tsconfig.examples.json` and `tsconfig.test.json` legs) exits 0; `vitest
run packages/types/` gives 299 files and 7498 tests passed; `build`
exits 0 (138 emitted files verified).
- Consumers, from the type-checker census: `type-check` exits 0 with 0
TS errors for `components`, `plugin-report`, `plugin-detail` and
`plugin-chatbot`. `vitest run packages/plugin-report/
packages/plugin-chatbot/` plus `form-renderers.test.tsx` gives 78 files,
827 passed and 7 skipped. All 228 `plugin-detail` test files, run in two
halves, give 227 files passed plus 1 skipped, and 2264 tests passed plus
8 skipped.
- Zod-face consumers: `vitest run examples/schema-catalog/
packages/cli/` plus the 17 app-shell files that import
`@object-ui/types/zod` or sit in `metadata-admin/previews/__tests__`
give 77 files and 2741 tests passed.
- Gates, all exit 0: `check:changeset-claims`,
`check:pending-changeset-literals`, `check-changeset-presence` (16
source files of 2 released packages, 1 changeset),
`check-changeset-no-major`, `check-changeset-fixed`,
`check-changeset-overwrite` (report-only; its 4 findings are the 4 dated
appends above), `check:control-bytes` (9717 files), `check:doc-fences`,
`check:doc-snippets` (697 of 697 blocks judged, 0 failed),
`check:doc-examples`, `check:doc-types`, `check:doc-example-ids`,
`check:doc-example-readers`, `check:skill-examples`,
`check:handler-key-reads`, `check:component-surface-parity`
(report-only), `check:designer-field-key-parity`,
`check:element-data-source-declaration`, `check:new-line-citations` (0
new), `check:prompt-keys`, `check:readme-exports`, `check:spec-symbols`,
`check:test-path-roots`, `check:unreferenced-sources` and
`check-type-check-coverage`. `doc-snippets` and `doc-examples` ran after
the scoped build their own `--build-filter` names (35 turbo tasks, all
successful).
- Lint, narrowed: `eslint --no-inline-config --format json` over the 16
lintable changed files gives 0 errors. All 16 were judged and 0 were
ignored, a population read from eslint's own output. The 39 warnings are
pre-existing `no-explicit-any`, and the diff adds no explicit `any`.
`eslint.config.js` declares no `parserOptions.project` or
`projectService`, and no custom rule in `eslint-rules/` reads the disk,
so this diff cannot move any untouched file's verdict. The repo-wide
`pnpm lint` is CI's.
- Governed surface: `check-governed-queue-guard.mjs --test` over the 23
paths reports NOT GOVERNED.
- NOT MEASURED:
- `check:sdui-registration-pins`: it needs a console build, and this
diff changes no registration.
  - The full `pnpm test` farm and repo-wide lint: CI's.
- `plugin-grid`: its code and tests are untouched. The 14 reclassified
keys moved between two test ledgers and no declaration changed.

## Stopped (ruling needed; reported in the card report with options)

- `DataTableSchema.editable` and `singleClickEdit`. `data-table` reads
both and `ObjectGrid` sets both in code, while no document authors them.
But `content/docs/components/complex/data-table.mdx` lists both in its
interface block and teaches `editable: true`. Filing them runtime-only
would contradict that page. Mirroring them would rest on no authored
document, and, from the source, an authored `editable: true` stages cell
edits locally and persists nothing without the `onRowSave` /
`onCellChange` function slots.
- `DataTableSchema.selectionStyle`. `data-table` reads it (`'always'` or
`'hover'`), and nothing authors or produces it in either repository.
- Noted, not narrowed: `ChatbotSchema.floatingConfig` has 0 reads on the
`chatbot` node (only `chatbot-floating` reads it), which makes it an
ADR-0049 narrowing candidate. The `chatbot` half of
`floating-chatbot-trigger-icon-retired.test.ts` pins its absence as a
tripwire.

## Parallel discipline

PR objectstack-ai#11269 and PR objectstack-ai#11273 edited `zod-mirror-parity.test.ts` in disjoint
hunks: the `KnownDrift` total line, the Kanban entry and one
`EXCLUSIONS` row. Both merges were clean. This round's ledger edits stay
in the `UnmirroredDeclared` / `RuntimeOnlyDeclared` /
`RuntimeOnlyNamedAllowList` blocks, their prose totals and its own
pairs' entries. Every prose total was reconciled to the measured count
above. The diff does not touch `zod/objectql.zod.ts`,
`zod/index.zod.ts`, `zod/nested-component-walk.ts`,
`strict-authoring-face.ts`, `zod/README.md`, `field-types.ts`, the
`DetailViewField` member, or `data-table.tsx` (read only).

## Acceptance notes

- 23 files, under the ~25-file size guard, so no pair was cut.
- Every pending changeset this round made false carries a dated append.
The ones it leaves true were re-read:
`7654-chatbot-display-mode-tombstone.md`, `6150-…`, `7804-…`, `6175-…`,
`7722-…`, `7947-…` and `8072-…`.

Session: `https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh`

---
_Generated by [Claude
Code](https://claude.ai/code/session_01TdiauJaVCHuj45EzZGUxHh)_

---------

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

Projects

None yet

2 participants