Skip to content

fix(app-shell): both Create View doors build the persisted view through one builder, so "Save as view" saves a kanban the spec accepts (objectui#11581) - #11589

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-11581-one-view-builder
Oct 4, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/issue-11581-one-view-builder

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #11581

Clause-②: no
Why no: the new symbols (buildNewViewSpec in the new packages/app-shell/src/views/newViewSpec.ts, buildAddViewSpec in ObjectView.tsx, offeredViewTypes in CreateViewDialog.tsx) are module exports for the pins only. Nothing is added to packages/app-shell/src/index.ts (the package exports only .), and views/index.ts re-exports CreateViewDialog and ObjectView by name, not these.

What changed

The Create View dialog persists through two doors: "Save as view" on the object data page, and the add-view door on the object page (handleViewCreate: the tab bar's add button and the view-config panel's create mode). They assembled the spec separately from the same payload, and only the add-view door mirrored the columns into kanban.columns / gallery.visibleFields. Measured on the cut (f1c9379) with the installed @objectstack/spec 17.6.0: "Save as view" with Kanban is refused, invalid_type at kanban.columns; every other offered type parses at both doors, but a gallery from "Save as view" carries no visibleFields while the same payload through the tab bar does.

  • One builder: buildNewViewSpec(config, { fallbackColumns, filter }). It resolves columns (the payload's, else the door's fallback), places filter (no rules, no key), and owns every type-specific rule through COLUMN_MIRRORS, a TOTAL record over ListViewVisualization: kanban (required columns), gallery (visibleFields when the payload has none), null for the other seven, so a new visualization fails the build until its block is decided.
  • Door 1 buildSaveAsViewSpec(config, columns, urlFilters) keeps its signature and pins; it now resolves only its inputs (page columns, URL triples folded to spec rules) and calls the builder.
  • Door 2 handleViewCreate's inline body moves to buildAddViewSpec(config, objectDef), which supplies defaultListColumnsFromObject(objectDef, 5) and calls the builder. This door's body is byte-identical to before.
  • CreateViewDialog.offeredViewTypes(): a pure read of the picker's rows (buildViewTypeMeta with an identity translator), so the pin enumerates at collection time.
  • Behaviour change, "Save as view" only: a kanban now persists kanban.columns (was a 422 at the view write door); a gallery now persists gallery.visibleFields = the view's columns when it declares none, as the tab-bar door always did, so its cards show those fields.
  • objectui#11578's refusal toasts and the dialog's await, and objectui#11576's chart dataset binding, are unchanged. The other write sites objectui#11583 lists are not touched.
  • One @object-ui/app-shell patch changeset: .changeset/11581-one-view-builder.md.

Pins

  • CreateViewDialog.viewTypeParse-11581.test.tsx
    • enumeration: PARSE_ROWS names exactly offeredViewTypes(), and offeredViewTypes() is the type grid the dialog renders;
    • one row per offered type (it.each(offeredViewTypes())): the real dialog is rendered and submitted with that row's picks, the payload goes through buildSaveAsViewSpec and buildAddViewSpec, each wrapped by viewEnvelope; ListViewSchema must accept the envelope's config and ViewItemSchema the envelope, at both doors (soft, so a row names every refusing door), and the two doors must build the same envelope from the same columns;
    • the builder's mirror pins (kanban.columns, gallery.visibleFields kept when declared, nothing for other types or a prototype-chain name);
    • "Save as view" with Kanban through ObjectDataPage, against the spec's view gate replayed at the network boundary: 200, kanban.columns equal to the persisted columns, lands on the draft.
  • ObjectView.createKanbanView-11581.test.tsx: the add-view door through the real ObjectView and dialog; the saved body parses and carries the mirror.

Evidence

  • Red before (1a8dc9a, the pin plus door 2 moved unchanged into buildAddViewSpec, no builder): 3 failed, 10 passed. Kanban row: DOOR 1 refused, invalid_type at kanban.columns. Gallery row: "the two doors built different bodies from one payload". Page case: expected 422 to be 200.
  • Green after at 168f819: the new file 17 passed; the door-2 page pin 1 passed.
  • Ablation 1, the kanban mirror set to null in the builder (anchor 1 to 0, injection 0 to 1, on disk): 5 failed, 13 passed. The kanban row fails at BOTH doors, both schemas (kanban.columns / config.kanban.columns, "expected array, received undefined"); both builder kanban pins; both page cases. Restored with git checkout HEAD; blob accf26f1db91 equals the HEAD blob, git diff HEAD empty.
  • Ablation 2, a fake type appended to buildViewTypeMeta's record (injection 0 to 1 on disk): 2 failed, 16 passed: the PARSE_ROWS enumeration and the row fake_ablation_type ("no parse row for the offered view type"). The rendered-grid check stays green, since the grid and offeredViewTypes() both carry it. Restored; blob aa96b493d04b equals the HEAD blob, git diff HEAD empty.

Gates (head 168f819)

  • pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build (29 packages): exit 0.
  • pnpm --filter @object-ui/app-shell type-check (tsc --noEmit && tsc -p tsconfig.test.json, which includes src/**/*.test.tsx): exit 0.
  • vitest, narrowed: the 75 test files that import a changed module by name (git grep for ObjectView, ObjectDataPage, CreateViewDialog, runtime-metadata-persistence, newViewSpec across packages/** and apps/** tests, minus the 46 hits in packages/plugin-view, which import that package's own ObjectView): 75 files, 857 tests passed. It includes every CreateViewDialog.*, ObjectDataPage.* and ObjectView.create* suite.
  • eslint on the 7 changed .ts/.tsx files, --no-inline-config --format json: 7 files, 0 errors. The narrowing is a measurement: the population is the config's **/*.{ts,tsx} rule objects; the rule set is tseslint.configs.recommended with no type-aware parser options, and no eslint-rules/* rule reads another file, so the diff cannot move a verdict on an untouched file.
  • check:control-bytes, check:new-line-citations (0 new), check:changeset-claims (2 pending bodies name ObjectView.tsx / ObjectDataPage.tsx; both re-read and still true), check:pending-changeset-literals, check:metadata-write-doors, check:vi-mock-specifiers, check:vi-mock-inherit, check:vi-mock-override-shape, check:test-path-roots, check:unreferenced-sources, check:self-import, check:esm-specifiers, check:phantom-deps, check:unused-deps, check-changeset-presence, check-changeset-no-major, check-governed-queue-guard --test (NOT GOVERNED): all exit 0.
  • NOT MEASURED: the whole packages/app-shell suite (988 test files). One run died with its process, without a verdict, about 20 minutes in, at --maxWorkers=2; CI's pnpm test runs it. check:eager-closure: PREREQUISITE NOT MET (it reads a built console bundle); CI owns it.

Acceptance notes

  • The grid type card's test id, create-view-type-grid, is also the test id of the grid that holds the cards. The new pin reads cards by tag. No user effect; noted, not filed (carrier: none).
  • The dialog's key pattern accepts a one-character key, while the spec ListViewSchema name needs two. Not reachable as a refusal: viewEnvelope strips name from config, and the envelope's name is the qualified object-dot-key, which ViewItemSchema accepts (measured with a one-character key). Observation only.
  • origin/main moved to 0c012a7 after the cut (objectui#10872's README, objectui#11511's skills guide). Neither touches these files, so the branch is not merged with it.

Generated by Claude Code

claude added 4 commits October 4, 2026 00:43
…d on "Save as view" kanban (objectui#11581)

The Create View dialog's payload is submitted once per type it offers
(`offeredViewTypes()`, a pure read of the picker's rows) and run through
both persisting doors' spec builders: "Save as view"
(`buildSaveAsViewSpec`) and the add-view door, whose inline body moves,
unchanged, into `buildAddViewSpec`. Each envelope must parse against the
installed `ListViewSchema` and `ViewItemSchema`, and the two doors must
build the same body from the same payload.

Red on this commit, as predicted: the kanban row ("Save as view" is
refused at `kanban.columns`), the gallery row (only the add-view door
mirrors `visibleFields`), and the "Save as view" page case (422 at the
replayed view gate). The one builder lands next.

Claude-Session: https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2
Co-authored-by: Claude <noreply@anthropic.com>
…gh one builder, so "Save as view" saves a kanban the spec accepts (objectui#11581)

`buildNewViewSpec` (new, `views/newViewSpec.ts`) is the one builder of
a new view's list-view spec. Each door resolves only its own inputs:
"Save as view" (`buildSaveAsViewSpec`) its page columns and the URL
conditions folded to spec filter rules; the add-view door
(`buildAddViewSpec`, behind `handleViewCreate`) the object's default
business columns. The builder owns every type-specific rule: the
resolved columns are mirrored into `kanban.columns` (required by
`KanbanConfigSchema`) and into `gallery.visibleFields` when the gallery
declares none, through a total record over the visualizations, so a new
visualization fails the build until its block is decided.

"Save as view" therefore stops persisting a kanban the view write door
refuses at `kanban.columns`, and a gallery saved there now shows the
view's columns on its cards, as the same payload through the tab bar
always did. The add-view door's body is unchanged.

Pins: the per-type enumeration over both doors turns green, plus the
builder's mirror pins and the add-view door through its page
(`ObjectView.createKanbanView-11581.test.tsx`).

Claude-Session: https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2
Co-authored-by: Claude <noreply@anthropic.com>
…alued records, not any (objectui#11581)

AGENTS.md #6 (no `any`): `buildNewViewSpec` reads its payload as
`Record<string, unknown>` and narrows `type` before it indexes the
mirror table. Both doors' resolvers keep their `Record<string, any>`
signatures, so no caller changes.

Claude-Session: https://claude.ai/code/session_01FjqrwXPfSMkSfkKYDSRkN2
Co-authored-by: Claude <noreply@anthropic.com>
…, not the first (objectui#11581)

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

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 2 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/7070-no-invented-gantt-date-fields.md

  • names app-shell/src/views/ObjectView.tsx → packages/app-shell/src/views/ObjectView.tsx — edited by this change

    • app-shell/src/views/ObjectView.tsx — the console object page. The inline branch becomes ganttViewOptions, the sibling of calendarViewOptions and timelineViewOptions: the declared block spread whole, title floored at 'name', no date field invented. - plugin-list/src/ListView.tsx — the render branch AND the capability gate. - plugin-view/src/ObjectView.tsx — generateViewSchema, the authored object-view element route, which bypasses ListView entirely.

.changeset/app-shell-page-header-subtitle-4761.md

  • names ObjectDataPage.tsx → packages/app-shell/src/views/ObjectDataPage.tsx — edited by this change

    | gauge | result | |---|---| | exports of dist/index.d.ts, through the TypeScript checker | 226 symbols; PageHeader and PageHeaderComponentProps are not among them (controls: AppShell reachable, a nonsense name not) | | exports map | declares exactly . and ./styles.css | | Node resolving @object-ui/app-shell/layout, …/dist/layout/PageHeader.js, …/src/layout/PageHeader.js | ERR_PACKAGE_PATH_NOT_EXPORTED for all three, while the declared entry resolves | | in-repo call sites | 2, both inside this package (ObjectView.tsx, ObjectDataPage.tsx) | | emitted declarations that change | dist/layout/PageHeader.d.ts only — dist/index.d.ts and dist/layout/index.d.ts are byte-identical across the change (8c886251…, f9f4862b…, both legs) |

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 0c012a7f4 (merge-base with origin/main): 7 file(s) changed outside .changeset/, read against 2101 pending declaration(s) that publish a body (2737 pending in total). · run

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 331 chunks) 3312.1 KB 3330.4 KB
Main entry chunk (gzip) 151.2 KB 350 KB
Entry file index-BpXWemEj.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) 17.22KB 6.37KB
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.11KB 7.97KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.28KB 2.60KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
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) 572.97KB 137.34KB
core (index.js) 10.00KB 3.96KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 232.57KB 64.51KB
fields (index.js) 261.62KB 66.20KB
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.35KB 12.88KB
i18n (translateFn.js) 0.20KB 0.18KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 35.66KB 9.49KB
i18n (useSafeTranslation.js) 7.14KB 2.92KB
layout (index.js) 39.47KB 11.25KB
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.04KB 3.92KB
plugin-calendar (index.js) 53.17KB 15.46KB
plugin-charts (index.js) 83.60KB 22.89KB
plugin-chatbot (index.js) 198.22KB 46.97KB
plugin-dashboard (index.js) 142.83KB 38.55KB
plugin-designer (index.js) 231.28KB 48.76KB
plugin-detail (index.js) 245.60KB 64.57KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 175.44KB 45.28KB
plugin-gantt (index.js) 179.16KB 45.06KB
plugin-grid (index.js) 235.69KB 64.78KB
plugin-kanban (index.js) 49.59KB 15.58KB
plugin-list (index.js) 116.46KB 28.93KB
plugin-map (index.js) 25.60KB 8.62KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 44.12KB 12.29KB
plugin-timeline (index.js) 38.80KB 11.71KB
plugin-tree (index.js) 14.51KB 5.15KB
plugin-view (index.js) 90.23KB 22.73KB
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) 120.63KB 39.56KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.50KB 2.06KB
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.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 (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.16KB 1.96KB
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) 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) 5.07KB 2.39KB
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) 4.99KB 1.96KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 19.93KB 7.25KB
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
objectstack-fleet Bot marked this pull request as ready for review October 4, 2026 02:52
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 4, 2026 02:52
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit b65aa5e Oct 4, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-11581-one-view-builder branch October 4, 2026 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant