Skip to content

feat(plugin-detail): fold a kept all-empty record section, and an all-empty body (objectui#13386) - #13483

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-9udwgt
Oct 25, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-9udwgt

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Elon · project thread

Fixes #13386
Fixes #12618

Seat: domain:ui#4 · card thread session_01AqaieDWuDnBRyh3u8epGx6 · claim 6391455338
Ruling-ref: 6369306878 (batch #7 item 4, letter C)
Clause-②: no · Metadata-protocol: semantic (the spec side landed as objectstack-ai/objectstack#25612)

What changes

Ruling C: in read-only mode an all-empty section that the page keeps draws its heading plus ONE "Show N empty fields" row, the same toggle a partly-filled section uses, instead of one em-dash row per field. Edit mode is unchanged, and a body whose sections are all empty folds once more (item 2 of #12618).

Where Before After
DetailSection, all-empty section kept (hideEmpty: false, or omitted where no default resolves it), read-only heading + one No value row per field heading + one "Show N empty fields" row; the toggle reveals the rows and "Hide empty fields" folds them back
same, edit mode every field an editable row unchanged
same, print page every row prints unchanged: every row prints, no toggle (#12717)
hideEmpty: true all-empty section renders nothing unchanged
partly-filled section heuristic fold (#7129 Q2-C) unchanged
detail body (DetailView sections) where every section is empty and at least two are kept one folded section after another ONE "Show N empty fields" row for the body (new EmptySectionsFold); revealing it draws each section folded on its own

No key, shape or default moved, and no new i18n key: both rows reuse detail.showEmptyFields / detail.hideEmptyFields. The hideEmpty descriptions in @object-ui/types (DetailViewSection, RecordDetailsSection, the zod mirror) and the two @object-ui/plugin-detail registration texts now say what a kept section draws.

Readings taken (for the seat's review)

  1. "Kept" includes an omitted key where no default resolves it. The ruling names hideEmpty: false. On detail-view, the detail-section node and the record:details direct-fields fallback, omitted already meant the same as false (keep), and their descriptions said so. The fold keeps them equal, so the test is "kept" (!hideAllEmptySection), not === false. On record:details authored sections nothing changes for an omitted key: it still resolves ?? true and hides.
  2. Copy. The ruling's 「N 个空字段 · 展开」 is described as "the same fold the mixed sections use", so the row is that fold's existing copy: Show 4 empty fields (en), 显示 4 个空字段 (zh). No new string.
  3. Body fold threshold. The body folds only when every section that draws anything is all-empty AND at least two are kept: one kept section is already one row, so folding it again would only drop its heading. Section groups (sectionGroups) turn the body fold off, as they draw fields of their own beside the sections. A malformed section (no field array, or a read that throws) turns it off too, so each section still renders or fails inside its own boundary (plugin-detail: an authored sections[].group THROWS and takes every sibling section down (both the spec's and this renderer's own docs predict a silent no-op), and an enumerated sections[].fields resolves labels only through the i18n bundle — with none, every app shows raw field names #8497).

Tests

  • New: packages/plugin-detail/src/__tests__/DetailSection.allEmptyFold-13386.test.tsx — the 「交易说明」 fixture: heading + one "Show 4 empty fields" row and no em-dash; reveal and fold back; untitled section; hideEmpty: true control; edit mode draws four textboxes and no fold; print page prints four rows; mixed sections (small and large) unchanged; body fold counts 8 over three sections, reveals each section folded, folds back; controls for a filled field anywhere, a single kept section, edit mode and print page; emptySectionsFoldCount rules including malformed sections.
  • Reverse check: with DetailSection.tsx at base, 6 of the new file's cases go red (the edit-mode, print, mixed and count cases stay green, as they pin unchanged behaviour).
  • Updated pins that read an all-empty kept section's rows, now through the fold: record-details.hideEmptyRetired-7129 4/4(b), record-details.emptySectionDefault (false keeps; direct-fields fallback), detailSectionAuthoredHideEmpty-10485, the AMPLIFICATION cases of DetailSection.emptyArray-8474 and DetailSection.emptinessAuthority-8376 (now: the fold counts all four rows, so the empty value is not counted as filled), inlineCredentialGate (signature's empty sample reveals the fold before reading the pencil), record-details.unresolvedIdentityFailClosed-9054 (the legacy fieldName entry survives as "Show 1 empty field").

Verification (local)

  • pnpm exec vitest run packages/plugin-detail/ packages/types/ — green after the pin updates (the first full run surfaced the six pins above; their files re-run green: 132 passed).
  • pnpm --filter @object-ui/plugin-detail type-check, pnpm --filter @object-ui/types type-check — clean.
  • pnpm --filter @object-ui/plugin-detail lint — 0 errors.
  • check:new-line-citations 0 new · check:doc-json · check:doc-fences · check:control-bytes · check:i18n-keys · check-changeset-presence — pass.
  • node scripts/check-governed-queue-guard.mjs --test <diff> — NOT GOVERNED.
  • NOT MEASURED: check:doc-snippets / check:doc-examples (need the whole build; CI runs them). NOT MEASURED: screenshots of the HotCRM opportunity record at 1280 px (Record page: a section whose fields are all empty folds like the others instead of showing dashes #12618 acceptance 2), reason: no HotCRM console stack in this container; the 「交易说明」 case is pinned in the DOM test above.

Acceptance notes

  • The hideEmpty describe text on the installed spec pin still carries the pre-#25612 wording; the next pin move picks up the ruled text. Nothing here reads that prose.

  • Adds no product-specific widget, dialog, hook or string (see AGENTS.md › Product-neutral renderer)

🤖 Generated with Claude Code

https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6

…body (objectui#13386)

Ruling C on objectui#13386: in read-only mode an all-empty section that
is kept (hideEmpty false, or omitted where no default resolves it)
draws its heading plus one "Show N empty fields" row, the toggle a
partly-filled section uses, instead of a column of em-dashes. Edit mode
and print pages draw every row, as before. A body whose sections are
all empty folds once more into one row (objectui#12618 item 2).

Claude-Session: https://claude.ai/code/session_01AqaieDWuDnBRyh3u8epGx6
Co-authored-by: Claude <noreply@anthropic.com>
…update pins (objectui#13386)

The body fold reads every section above the per-section error
boundaries, so a malformed section now turns it off instead of throwing
and blanking the body. Pins that read an all-empty section's rows now
reveal the fold first.

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

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 85 chunks) 3014.8 KB 3496.0 KB
Main entry chunk (gzip) 80.3 KB 350 KB
Entry file index-CBbPB3y9.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 (buildIdentity.js) 0.80KB 0.49KB
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 21.41KB 7.90KB
app-shell (runtime-config.js) 24.52KB 8.48KB
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) 45.59KB 12.03KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 20.67KB 6.12KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.72KB 2.24KB
auth (SocialSignInButtons.js) 9.74KB 3.94KB
auth (UserMenu.js) 3.39KB 1.21KB
auth (auth-gate-events.js) 1.62KB 0.83KB
auth (authStyles.js) 5.27KB 1.86KB
auth (createAuthClient.js) 42.84KB 11.66KB
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) 8.84KB 3.61KB
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.26KB 8.03KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.28KB 2.60KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (commentAuthorship.js) 1.39KB 0.78KB
collaboration (index.js) 1.93KB 0.85KB
collaboration (useCollaborationTranslation.js) 6.50KB 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) 614.94KB 150.52KB
core (index.js) 10.18KB 4.04KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 253.04KB 70.68KB
fields (index.js) 295.90KB 75.88KB
i18n (LocalizationContext.js) 2.92KB 1.42KB
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.52KB 2.39KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.35KB 12.88KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 36.87KB 9.88KB
i18n (useSafeTranslation.js) 7.14KB 2.92KB
layout (index.js) 41.17KB 11.96KB
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) 15.35KB 5.51KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.82KB 2.38KB
permissions (ServerReadScope.js) 4.03KB 1.82KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.99KB 0.43KB
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.91KB
plugin-calendar (index.js) 55.41KB 16.19KB
plugin-charts (index.js) 88.30KB 24.33KB
plugin-chatbot (core.js) 5.22KB 2.18KB
plugin-chatbot (index.js) 237.93KB 56.26KB
plugin-dashboard (index.js) 147.15KB 39.95KB
plugin-designer (index.js) 232.83KB 50.01KB
plugin-detail (index.js) 268.92KB 71.56KB
plugin-editor (index.js) 2.21KB 1.04KB
plugin-form (index.js) 185.46KB 48.48KB
plugin-gantt (index.js) 178.19KB 45.06KB
plugin-grid (index.js) 278.30KB 77.57KB
plugin-kanban (index.js) 64.27KB 19.81KB
plugin-list (index.js) 149.60KB 39.26KB
plugin-map (index.js) 27.11KB 8.99KB
plugin-markdown (index.js) 13.79KB 4.79KB
plugin-report (index.js) 46.42KB 13.06KB
plugin-timeline (index.js) 39.30KB 11.87KB
plugin-tree (index.js) 15.25KB 5.38KB
plugin-view (index.js) 94.26KB 24.27KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 12.07KB 3.68KB
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) 129.13KB 42.23KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.71KB 2.11KB
react (schema-input.js) 4.31KB 2.07KB
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.07KB 1.30KB
sdui-parser (index.js) 7.30KB 3.12KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 25.28KB 7.81KB
sdui-parser (provenance.js) 3.84KB 1.90KB
sdui-parser (types.js) 0.29KB 0.24KB
sdui-parser (validate.js) 23.87KB 7.83KB
types (ai.js) 4.39KB 2.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 4.12KB 1.61KB
types (authoring-nodes.js) 0.20KB 0.19KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (cloud.js) 0.20KB 0.18KB
types (complex.js) 4.44KB 2.07KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (dashboard-widget-layout.js) 2.06KB 0.96KB
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) 1.13KB 0.65KB
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) 5.78KB 2.70KB
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 (node-slots.js) 7.18KB 2.34KB
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 (product-blocks.js) 0.20KB 0.19KB
types (record-approval-decision.js) 0.20KB 0.20KB
types (record-components.js) 0.20KB 0.19KB
types (record-panels.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) 4.99KB 1.96KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.93KB 7.26KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.48KB 3.50KB
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

席位核对 — ACCEPT · PR #13483 @ 8914a8c337c45e1d02fabb2ce0977612eb3f4678 · domain:ui#4 · 2026-10-25T01:09Z

Reviewer of record: session_01XWGTsmqrtrt1Zqh1ioWqsT (seat 4). Implemented-by: claude/project-thread-9udwgt (card session session_01AqaieDWuDnBRyh3u8epGx6). Card objectui#13386, claim 6391455338, ruling C 6369306878.

  1. Shape: draft, base main, author objectstack-fleet[bot]. Fixes #13386 and Fixes #12618 — the second is intended: triage (6370301339, 6383373367) says objectui#12618 closes with this card. 19 files (+635 −63), all under packages/plugin-detail/**, packages/types describe texts, the plugin-detail README, content/docs/guide/print-pages.md and one changeset — inside the claimed surface (types/doc describe texts follow the behaviour they describe).
  2. Ruling against diff: read-only, a kept all-empty section draws its heading plus one fold row (foldAllEmptySection in DetailSection.tsx); edit mode and print pages draw every row; hideEmpty: true and mixed sections unchanged; no new key. Item 2 of Record page: a section whose fields are all empty folds like the others instead of showing dashes #12618: EmptySectionsFold folds a body whose sections are all empty (≥ 2 kept) into one row; the seat checked that record:details renders through DetailView (renderers/record-details.tsx imports and mounts it on origin/main), so the fold reaches the record page.
  3. Readings the seat accepts (not new rulings, each follows the ruling's own wording):
    • Copy: the fold reuses the mixed sections' existing detail.showEmptyFields text (「显示 N 个空字段」) rather than a new 「N 个空字段 · 展开」 string. The ruling's operative clause is "the same fold the mixed sections use"; the quoted string in the brief described that fold.
    • Kept = every all-empty section the hide does not take, including an omitted key on detail-view / detail-section / the direct-fields fallback, where omitted already meant keep (DetailViewSection docblock, measured at objectui#8603). Same rendered state, same treatment; record:details still resolves hideEmpty ?? true, so its omitted sections still vanish.
    • The body fold needs ≥ 2 kept sections and stays off beside sectionGroups or a malformed section (it runs above the per-section boundaries, objectui#8497).
  4. Gates on this head: 33 check-runs success (Lint, Type Check, Test shards 1–16 + Test, Test (dist pins), Build & E2E, Build Docs, Repo Gates, changeset family, Line Citation Gate, Governed Surface Queue Guard, Bundle Analysis, label, Live E2E (informational)); 3 skipped. mergeable_state: clean. Six existing pins that read all-empty rows directly were updated to the folded rendering, as the ruling requires.
  5. Out of scope / not measured: HotCRM screenshots at 1280 px (no HotCRM stack in the card session) — the ruling's done-when sentence about HotCRM's 「交易说明」 is carried by the unit pins, not a live reading.
  6. Landing: not governed. Changeset @object-ui/plugin-detail minor, @object-ui/types patch, Metadata-protocol: semantic — the seat read its sentence against the diff and it matches. Landing waits only for the maintainer's word in this seat's project thread.

Generated by Claude Code

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 25, 2026 01:50
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 25, 2026 01:50
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 25, 2026
Merged via the queue into main with commit 46c56ee Oct 25, 2026
37 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-9udwgt branch October 25, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation package: types plugin tests

Projects

None yet

2 participants