Skip to content

fix(plugin-map): a lookup-typed marker description renders its display name instead of crashing the popup - #10525

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-10456-objectmap-description-lookup
Sep 25, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-10456-objectmap-description-lookup

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #10456
Clause-②: no

What changed

ObjectMap copied the raw descriptionField value onto each marker, and three readers treated it as text. The desktop popup and the mobile record sheet put it in JSX, and the search filter called .toLowerCase() on it. The map's own object fetch expands every declared relation (buildExpandFields(objectSchema?.fields), no column list), so a lookup-typed description arrives as { id, name }, and the first marker click threw Objects are not valid as a React child. A number or a boolean description made the search box throw on the first keystroke.

One line changes behaviour, in the marker transform in packages/plugin-map/src/ObjectMap.tsx:

const description = recordDisplayValueAt(record, mapConfig.descriptionField);

recordDisplayValueAt is @object-ui/core's shared reader in utils/record-title. The marker TITLE already runs it for an authored titleField (step 0 of getRecordDisplayName), and @object-ui/plugin-detail's header and dedupe ladder use it too. So no new resolver is written, and the two text slots of one marker now share one rule. MarkerData.description was already typed as a string and now really is one, so the popup, the sheet and the search all read the same value.

description value before after
expanded lookup { id: 'a1', name: 'Acme' } the popup throws on click; the search throws Acme; the search matches acme
bare id 'a1' (the control) a1 a1
number 42 42; the search throws 42; the search matches
boolean false dropped by the truthiness gate; the search throws false
expanded record with no display key { id: 'a1' } the popup throws no description line
whitespace only an empty-looking line no description line

No spec key changes. descriptionField stays out of ListView's $expand collector: objectui#10454 excluded it on purpose, and that file is untouched.

In the same comment block, three bare line addresses that pointed into other files ((:301), (:356), (:600)) are dropped, and the symbol names beside them stay (AGENTS.md Commandment 11, repair when touched). The hunks are the import list, that comment and the description derivation. None is near the docblock paragraph that draft PR objectui#10508 edits.

Tests (head 6134028a5)

  • Reproduction at base 9eea12a2b. The pin file, run before the fix (it had 7 arms then), gave Tests 6 failed | 1 passed (7). The one pass was the bare-id control. The errors were:
    • Objects are not valid as a React child (found: object with keys {id, name}) for the popup, the reach path and the mobile sheet;
    • TypeError: m.description?.toLowerCase is not a function for both search arms;
    • expected null to be 'false' for the boolean arm.
  • Pin file ObjectMap.descriptionDisplay-10456.test.tsx has 8 arms:
    • the card's expanded lookup;
    • the reach path through the map's own object fetch, which asserts that $expand names the lookup, then clicks;
    • the bare-id control;
    • a nameless expanded record and a blank value;
    • the mobile sheet;
    • the search on an expanded lookup;
    • number and boolean rendering;
    • the search over a number and a boolean.
  • Package suite: pnpm exec vitest run packages/plugin-map/ from the repo root gave Test Files 26 passed (26) and Tests 155 passed (155).
  • Type-check: I built the closure first (turbo run build --filter="@object-ui/plugin-map^..." --concurrency=2, 13/13 tasks). Then pnpm --filter @object-ui/plugin-map run type-check (tsc --noEmit && tsc -p tsconfig.test.json) exited 0. --listFilesOnly on the test project lists the new pin file.
  • eslint (with and without --no-inline-config; --format json counts 2 files):
    • ObjectMap.tsx has the same per-rule counts as base: 13 no-explicit-any warnings, 0 errors.
    • The new pin carries 4 no-explicit-any warnings, all on the react-map-gl stub props. The sibling ObjectMap.markerTitle.test.tsx carries 7 of the same kind.
    • eslint.config.js sets no parserOptions.project or projectService. There is no type-aware linting, so this diff cannot move an untouched file's result.
  • Gates, all exit 0:
    • check:control-bytes
    • check:new-line-citations (0 new)
    • check-changeset-presence, check-changeset-no-major and check-changeset-overwrite
    • check:changeset-claims: report-only. It names one pending changeset that mentions ObjectMap.tsx, 6939-objectql-record-source-refinement.md. Its paragraph is about the record-source order in getDataConfig, which this diff does not touch.
    • check:vi-mock-specifiers, check:vi-mock-inherit and check:vi-mock-override-shape
    • check:test-path-roots, check:pending-changeset-literals and check:unreferenced-sources
  • NOT MEASURED: the repo-wide pnpm test and pnpm lint, which CI runs.

Ablation (head 6134028a5)

This used objectstack's scripts/ablation-replace.mjs in WRAP mode, under the shared verify lock. The mutation put the raw read back: the anchor recordDisplayValueAt(record, mapConfig.descriptionField) became mapConfig.descriptionField ? record[mapConfig.descriptionField] : undefined.

  • Landed on disk: the anchor went from 1 to 0, the replacement from 0 to 1, and the blob from 6cac44151b68 to 161639bc651e.
  • Result, verbose reporter: Tests 7 failed | 1 passed (8). The one pass is a bare id renders as text, so the expanded-row pin goes red with the throw and the control stays green.
  • Restored: the blob after restore equals the blob at HEAD (6cac44151b68), and git diff HEAD is empty.

No rebuild was needed. The pin imports ./ObjectMap from source, and the root vitest config aliases @object-ui/core to packages/core/src.

Acceptance notes

  • "Its display name, or its id." The card's bare-id state (an unexpanded lookup) renders its id, as the control pins. An expanded record with none of the resolver's display keys renders no description line, because recordDisplayValueAt rules a bare { id } payload empty. The grid's lookup cell falls back to the id instead, but that fallback lives in a private helper in @object-ui/fields, which this package does not depend on. Copying it here would be the third spelling the card forbids. The arm an expanded record with no display name, and a blank value, render no description line records this choice so it can be flipped deliberately.
  • Multi-value descriptions (a multi-lookup or multi-select array) read as empty under the same resolver, so no line shows. Before, a string array rendered its items concatenated with no separator, and the search threw on it. Not pinned.
  • false and 0. false now shows as false. 0 now renders inside the description paragraph; before, the truthiness gate leaked a stray 0 text node beside the title.
  • Docs. The README row for descriptionField ("Field shown under the title in the marker popup.") stays true, so it is unchanged.
  • Sibling finding, not fixed here: ObjectTimeline has the same shape. Its own fetch expands every relation, and it passes item[descField] straight to the renderer as a React child. A one-shot uncommitted probe (a lookup-typed descriptionField, the real renderer) threw Objects are not valid as a React child (found: object with keys {id, name}), with $expand: ["account"]. The bare-id control passed. It is reported to the seat for filing.

domain:ui seat 1, session https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC.


Generated by Claude Code

ObjectMap copied the raw descriptionField value onto each marker, and
the popup, the mobile record sheet and the search box all treated it as
text. A lookup-typed description arrives expanded as { id, name } from
the map's own object fetch, so the first marker click threw "Objects
are not valid as a React child"; a number or a boolean made the search
box throw on the first keystroke.

The marker transform now derives the description once through
@object-ui/core's recordDisplayValueAt, the resolver the marker title
already uses for an authored titleField. A new pin file covers the
expanded lookup, the map's own fetch path, the bare-id control, the
mobile sheet, the search, and number, boolean and blank values.

Also drops three bare line addresses from the title comment above it.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
Drops the one no-explicit-any warning the pin added beyond the
react-map-gl stub props its siblings share.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
@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/6939-objectql-record-source-refinement.md

  • names plugin-map/src/ObjectMap.tsx → packages/plugin-map/src/ObjectMap.tsx — edited by this change

    Both renderers resolve their records from one of three keys, in this order — getDataConfig in plugin-map/src/ObjectMap.tsx and plugin-gantt/src/ObjectGantt.tsx: data, then staticData, then objectName. Both mirrors required objectName alone, so a document authored on staticData drew correctly and was refused by safeValidateSchema — six catalog entries, three per component.

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3044.6 KB 3104.5 KB
Main entry chunk (gzip) 147.8 KB 350 KB
Entry file index-DeZUczoL.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.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
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.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
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) 544.62KB 130.17KB
core (index.js) 9.22KB 3.71KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 223.86KB 62.25KB
fields (index.js) 256.68KB 65.01KB
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 (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.28KB 11.09KB
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.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
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) 51.38KB 14.60KB
plugin-charts (index.js) 74.95KB 20.88KB
plugin-chatbot (index.js) 198.36KB 47.20KB
plugin-dashboard (index.js) 133.59KB 35.39KB
plugin-designer (index.js) 216.25KB 44.39KB
plugin-detail (index.js) 232.25KB 61.40KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 146.50KB 37.51KB
plugin-gantt (index.js) 169.37KB 41.83KB
plugin-grid (index.js) 215.49KB 58.91KB
plugin-kanban (index.js) 49.30KB 15.39KB
plugin-list (index.js) 114.55KB 28.29KB
plugin-map (index.js) 23.82KB 7.42KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.64KB 8.94KB
plugin-tree (index.js) 10.52KB 3.69KB
plugin-view (index.js) 88.00KB 21.97KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 114.58KB 37.60KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.03KB 1.86KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
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.25KB
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) 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 (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) 17.15KB 6.32KB
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 September 25, 2026 06:54
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit c5d715f Sep 25, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-10456-objectmap-description-lookup branch September 25, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant