Skip to content

defaultMapFromObject derives no marker-title binding, unlike every sibling deriver — interface-page maps show undefined titles whenever the display field is not name #5909

Description

@claude

packages/app-shell/src/views/InterfaceListPage.tsx derives a default binding for every visualization an ADR-0047 page whitelists, so the switcher can actually offer and render it. Five of the six bind their display field. map binds only coordinates:

exportfunctiondefaultMapFromObject(objectDef: any): {locationField: string}|undefined{constfield=firstFieldMatching(objectDef,(_n,f)=>LOCATION_TYPES.has(f.type))??firstFieldMatching(objectDef,(n)=>/location|address|geo|coords?|place|venue/i.test(n));returnfield ? {locationField: field} : undefined;}

Compare the siblings, which do bind the field the user actually reads off the rendered item:

  • defaultKanbanFromObject{ groupByField }
  • defaultCalendarFromObject{ startDateField }
  • defaultGalleryFromObject{ coverField }

Consequence

With no titleField derived and none declared, plugin-map's getMapConfig falls back to its own default:

titleField: schema.titleField||'name',

So on any interface page that whitelists map against an object whose display field is not literally name, every marker's popup title reads undefined. The object does not have to be exotic — showcase_task in the framework's examples/app-showcase has title, not name, and its Work Map page is exactly this case (filed as objectstack#11443, which can be fixed narrowly by hand-declaring the block; this card is the general half).

Why it is a design call, not a one-liner

Picking "the title field" needs a rule, and the repo already has candidates rather than one obvious answer — detectStatusField-style detection, the object's NAME_FIELD / display-field convention, or the first searchable text field. defaultGalleryFromObject's choice of coverField is the closest precedent for how such a rule gets picked here. Worth deciding deliberately rather than defaulting to title because one example app uses it.

Noticed while implementing objectui#5042 (PR #5908), which makes the declared map block reach the renderer but deliberately adds no new derivation — out of that card's scope. Unassigned; filed plainly for triage to grade.


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions