Skip to content

fix(app-shell): all CEL-hosting inspectors block Save on parse faults (#4527) - #4547

Merged
yinlianghui merged 1 commit into
mainfrom
claude/issue-4527-inspector-family-wiring
Aug 13, 2026
Merged

fix(app-shell): all CEL-hosting inspectors block Save on parse faults (#4527)#4547
yinlianghui merged 1 commit into
mainfrom
claude/issue-4527-inspector-family-wiring

Conversation

@yinlianghui

Copy link
Copy Markdown
Collaborator

Part of #4527.

Part of, not Fixes: the card names five inspectors and this wires two of them. The other three cannot reach the shipped contract at all, which is a decision for the PM rather than something to guess at — see "What is NOT wired, and why" below.

What was wired

CelPredicateField has always reported its verdict through onLintChange; these two shared editors passed no listener, so a predicate that does not parse rendered its inline error and Save still saved — the #4306 defect, one family over. Both editors gain an optional callback surfacing their blocking-error count (severity: 'error' only, matching the RLS editor and #4306), and the inspectors above them aggregate and report through MetadataInspectorProps.onBlockingIssuesChange, the channel PR #4536 shipped.

editor aggregation inspector reaches Save via
ConditionBuilder (raw-expression mode) single site, derived against the mode PageBlockInspector (visibleWhen) ResourceEditPage
ConditionalFormattingEditor (one condition per rule) per-rule map, pruned by rule count ViewVariantInspector (conditionalFormatting), forwarded through ViewInspector ResourceEditPage

Counts are derived, never repaired by reset effects (#4527 ruling item 2, mirroring #4536):

  • ConditionBuilder's CEL editor is mounted only in raw mode; the row builder has no CelPredicateField at all. The adopt effect flips the builder back to rows in the same commit when an externally-changed value round-trips as a simple predicate, which unmounts the editor and cancels its pending debounced lint — nothing will ever report 0 for it again. The count is therefore read as 0 whenever the raw editor is not mounted, or Save wedges shut with no editor on screen to fix it.
  • ConditionalFormattingEditor keys a per-rule map and counts only indices below the current rule count. One shared counter would let whichever rule linted last overwrite the others, so fixing one of two broken rules would hand back a writable Save while the other was still malformed; and a deleted rule's remembered error would wedge Save.

ViewInspector forwards the host callback on the scoped path. Without that one hop the channel stops one component short of the editor and the whole wiring is inert, so it is pinned by its own test.

Red-first

Predicted the split in writing before running, then ran the new suites against unfixed code. Predicted red signature (inherited from #4536): the reporter is never called, so the count a host would hold is undefined and every assertion fails, the 0 cases included.

Measured, unfixed — 16 failed / 2 passed across the four editor+inspector suites:

AssertionError: expected undefined to be 1 // Object.is equality
AssertionError: expected undefined to be +0 // Object.is equality

The 2 that passed are the "the prop stays optional" cases, predicted green on both sides. After the fix: 20/20 green including the host suite.

Reverse verification took the fix out with git diff + git checkout -- (never git stash — objectui#3430), re-ran all five suites, and restored with a sha256 check on all five files. Direction was the ordinary one, as predicted: 5 files failed, 18 failed / 2 passed with the fix removed.

Full regression over the metadata-admin + studio-design trees: 173 files, 1691 passed, 1 skipped, 0 failed — both #4536 suites included and untouched.

Host-level coverage

ResourceEditPage.celGate.test.tsx is new: no test in this repo rendered MetadataResourceEditPage before (the console suites stub it out), so this host's Save gate had never been exercised end to end. It drives the real registered PageBlockInspector, the real ConditionBuilder and the real host gating; only the page canvas is stubbed, and only to emit the selection, since turning a click into a MetadataSelection is PageBlockCanvas's own tested concern.

The ruling also asked for a StudioDesignSurface host case. That is not possible within this card's surface and no test claims it: the design pillar's scoped inspector render passes no onBlockingIssuesChange at all (only DataPillar's object inspector does, from #4536), and StudioDesignSurface.tsx is on the do-not-touch list. So on the Studio design surface this fix is inert until that render site is wired — recorded here rather than papered over.

What is NOT wired, and why

Measured on post-#4536 main: there are two inspector registries and #4536 extended only one. MetadataInspectorProps carries onBlockingIssuesChange; MetadataDefaultInspectorProps has no such member. Repo-wide there are exactly two host call sites passing the channel — ResourceEditPage (scoped path) and StudioDesignSurface's DataPillar.

named site props type wired here
PageBlockInspector MetadataInspectorProps yes
ViewVariantInspector (scoped, via ViewInspector) forwarded from MetadataInspectorProps yes
HookDefaultInspector MetadataDefaultInspectorProps no — no channel
ActionDefaultInspector MetadataDefaultInspectorProps no — no channel
widgets.tsx condition widget WidgetProps — a SchemaForm widget, not an inspector no — no channel
ViewVariantInspector (home path, via ViewDefaultInspector) MetadataDefaultInspectorProps no — no channel

Wiring those needs MetadataDefaultInspectorProps extended and the two forbidden host files edited, plus three further hosts nobody has modelled that render default inspectors and own their own Save: ObjectSettingsPanel, ObjectActionsPanel, ObjectHooksPanel. That is a contract decision, so it is escalated rather than guessed. A sixth ConditionBuilder consumer also exists that the card does not list: studio-design/ObjectValidationsPanel.

Changeset

@object-ui/app-shell: patch, by .d.ts measurement both ways (dist/ and tsconfig.tsbuildinfo cleared between builds). dist/index.d.ts is byte-identical before and after; only four module-local per-file .d.ts change, and the package declares no subpath exports, so none of it is consumer-reachable. (#4536 graded minor because it added a member to the exported MetadataInspectorProps; this card adds none.)

Gates

Both tsc passes green (tsc --noEmit and tsc -p tsconfig.test.json). ESLint net zero new warnings, measured both ways on the same scoped set: 37 with the fix, 37 on origin/main content — derivation rather than effects, so no set-state-in-effect warnings. New test files lint clean. check-control-bytes OK, check:phantom-deps OK, changeset gates OK.

Surface

Touched: the two editors, PageBlockInspector, ViewVariantInspector, ViewInspector, five new test files, one changeset. ViewInspector.tsx is the one file outside the card's listed surface — a single forwarding line, without which the ViewVariantInspector half cannot work; declared rather than silent. Not touched: StudioDesignSurface.tsx, ResourceEditPage.tsx, inspector-registry.ts, ObjectFieldInspector.tsx, PermissionAdvancedFacets.tsx, PermissionMatrixEditor.tsx, permission-slice.ts, and nothing under content/docs/releases/. No client.get( call site was touched (#4271 is in flight).


Generated by Claude Code

…#4527)

CelPredicateField has always reported its lint verdict through onLintChange,
but ConditionBuilder and ConditionalFormattingEditor passed no listener, so a
predicate that does not parse rendered its inline error and Save still saved --
the objectui#4306 defect, one editor family over.

Both editors gain an optional callback surfacing their blocking-error count
(severity 'error' only), and the inspectors above them aggregate and report
through MetadataInspectorProps.onBlockingIssuesChange, the channel PR #4536
shipped. PageBlockInspector gates on a page block's visibleWhen;
ViewVariantInspector gates on a view's conditionalFormatting rules, forwarded
through ViewInspector on the scoped path.

Counts are DERIVED from what they describe, never repaired by reset effects.
ConditionBuilder's CEL editor exists only in raw mode and can vanish while its
last verdict was an error -- the adopt effect flips back to rows in the same
commit, unmounting it and cancelling its pending lint -- so the count is read
as 0 whenever that editor is not mounted. ConditionalFormattingEditor keys a
per-rule map and counts only rules that still exist: a shared counter would let
whichever rule linted last overwrite the others, and a deleted rule's
remembered error would wedge Save shut with no editor left to fix it in.

Three sites named in the report are NOT wired: HookDefaultInspector,
ActionDefaultInspector and the view's home panel are
MetadataDefaultInspectorProps components whose contract has no blocking-issues
member, and widgets.tsx's condition widget is a SchemaForm widget rather than
an inspector. Wiring those needs a second contract decision plus edits to the
hosts, so they are escalated rather than guessed.

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

vercel Bot commented Aug 13, 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 Aug 13, 2026 7:51am

Request Review

@github-actions github-actions Bot added the tests label Aug 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Main entry (gzip) 24.7 KB 350 KB
Entry file index-LWFpGyHt.js
Status PASS

📦 Bundle Size Report

Package Size Gzipped
app-shell (index.js) 9.56KB 3.59KB
app-shell (runtime-config.js) 7.42KB 2.32KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 8.92KB 3.41KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 1.17KB 0.53KB
auth (AuthProvider.js) 25.13KB 5.40KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.13KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.64KB 2.21KB
auth (SocialSignInButtons.js) 9.60KB 3.89KB
auth (UserMenu.js) 3.40KB 1.22KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 38.46KB 10.17KB
auth (createAuthenticatedFetch.js) 6.34KB 2.43KB
auth (index.js) 2.35KB 1.07KB
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.88KB
auth (useIsWorkspaceAdmin.js) 1.61KB 0.85KB
collaboration (CommentThread.js) 26.07KB 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.65KB 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) 489.32KB 108.45KB
core (index.js) 3.37KB 1.34KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 158.47KB 43.13KB
fields (index.js) 230.18KB 57.13KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (i18n.js) 4.32KB 1.77KB
i18n (index.js) 3.35KB 1.38KB
i18n (pickLocalized.js) 3.69KB 1.73KB
i18n (provider.js) 23.12KB 7.62KB
i18n (useDisplayLocale.js) 2.84KB 1.45KB
i18n (useObjectLabel.js) 27.59KB 6.63KB
i18n (useSafeTranslation.js) 7.77KB 3.13KB
layout (index.js) 38.98KB 10.85KB
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) 6.96KB 1.98KB
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) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 8.75KB 3.06KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 3.67KB 1.12KB
permissions (evaluator.js) 4.41KB 1.44KB
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.55KB 0.71KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.86KB 12.91KB
plugin-charts (index.js) 62.10KB 17.67KB
plugin-chatbot (index.js) 181.21KB 43.14KB
plugin-dashboard (index.js) 120.95KB 31.53KB
plugin-designer (index.js) 212.58KB 42.83KB
plugin-detail (index.js) 239.88KB 59.99KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 114.58KB 27.68KB
plugin-gantt (index.js) 164.26KB 40.01KB
plugin-grid (index.js) 189.34KB 50.32KB
plugin-kanban (index.js) 48.62KB 13.42KB
plugin-list (index.js) 111.13KB 27.12KB
plugin-map (index.js) 18.16KB 5.81KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 41.16KB 10.96KB
plugin-timeline (index.js) 26.68KB 7.66KB
plugin-tree (index.js) 8.50KB 2.88KB
plugin-view (index.js) 84.08KB 20.55KB
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.71KB 3.53KB
providers (index.js) 0.44KB 0.22KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.67KB 2.37KB
react (LazyPluginLoader.js) 3.77KB 1.33KB
react (SchemaRenderer.js) 23.73KB 7.96KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 1.23KB 0.66KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 4.09KB 1.74KB
sdui-parser (index.js) 4.47KB 2.03KB
sdui-parser (parse.js) 10.04KB 2.82KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 4.69KB 1.48KB
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.05KB 1.52KB
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

PM step-7 复核 — ACCEPT(本 PR 为 #4527 的第一批,卡保持开放)(session_017Qqyix2QcnpUC9XeYVDzx3)

  • What the shipped contract could reach is wired exactly right: ConditionBuilder's raw-mode site with the load-bearing derivation (the adopt effect unmounts the editor in the same commit — a remembered count would wedge Save), ConditionalFormattingEditor's per-rule map with prune-by-derivation and the two-faulty-rules decisive case, PageBlockInspector and ViewVariantInspector with stamped counts, and the ViewInspector forwarding line — a declared out-of-list deviation that is obviously necessary (without it half the wiring is inert) and pinned by its own case.
  • Red-first 16/2 matching the prediction exactly with the fix(app-shell): inspectors can block Save — the field inspector gates on CEL errors (#4306) #4536 red signature; reverse verification 5-file sha256-verified; 173-file regression green; NET ZERO warnings; ResourceEditPage.celGate is the first test in the repo to render MetadataResourceEditPage at all — new load-bearing coverage.
  • Grading shows the discipline working in both directions: patch, NOT minor, because unlike fix(app-shell): inspectors can block Save — the field inspector gates on CEL errors (#4306) #4536 nothing exported grew — the fix(app-shell): organization & invitation UI translates its six English holdouts (#4474) #4496 precedent applied against the more generous reading.
  • The honest boundary is the right call: Part of #4527, no test claiming StudioDesignSurface coverage it couldn't have, and the three unwired sites escalated with a measured census instead of silently narrowed scope.

Phase-2 ruling is posted on #4527 — the same dev continues. Auto-merge armed (squash), landing verified per the merge-queue discipline.


Generated by Claude Code


Generated by Claude Code

@yinlianghui
yinlianghui marked this pull request as ready for review August 13, 2026 08:03
@yinlianghui
yinlianghui added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit dd3adbd Aug 13, 2026
21 checks passed
@yinlianghui
yinlianghui deleted the claude/issue-4527-inspector-family-wiring branch August 13, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants