Skip to content

map list views have no authorable config surface — ListViewSchema declares no map block, so marker titles fall back to a field name the object does not have #5001

Closed as not planned

Description

@yinlianghui

Found while implementing #4941 (camera fit). Filed unassigned, not claiming.

The gap

@objectstack/spec@17.0.0 src/ui/view.zod.ts — ListViewSchema is a strictObject and declares a per-visualization config block for seven of the nine view types:

kanban / calendar / gantt / gallery / timeline / chart / tree

There is no map block, and no center / zoom / camera slot anywhere on the schema. The showcase already records this in a comment next to its own visualization switcher (examples/app-showcase/src/ui/views/task.view.ts): "map needs a spec MapConfigSchema the ListViewSchema doesn't yet have".

Meanwhile plugin-map reads its configuration from schema.map — a registered component input (packages/plugin-map/src/index.tsx, { name: 'map', type: 'object' }), documented as an authoring surface in content/docs/plugins/plugin-map.mdx (latitudeField, longitudeField, locationField, titleField, descriptionField, zoom, center) and validated by a local zod schema in ObjectMap.tsx.

So the renderer has a config block, the platform metadata contract does not. An object list view of type: 'map' cannot declare one: the container schema is strict, so the key is not authorable there at all.

What that costs today (showcase task, "Work Locations (Map)")

The view is { label, type: 'map', data, columns: ['title', 'location', 'assignee'] } — everything else is unauthorable, so getMapConfig returns its field-name defaults: latitude / longitude / location / name / description.

  • Coordinates render only by coincidence: the default locationField is location, which happens to be the seed's field name.
  • titleField defaults to name, and showcase_task has title, not name. Every marker's title is therefore undefined: the popup heading renders empty, the mobile record sheet renders empty, and the map's search box (which matches on title/description) matches nothing at all.
  • columns is deliberately NOT mapped into the map's config (see the note in index.tsx), so declaring columns: ['title', ...] does not name the title field either.

An author looking at that map has no spec-legal way to fix it.

Direction (contract-first, not a renderer workaround)

Declare the block in the spec — a map config member on ListViewSchema, next to the other seven — and let plugin-map read a declared surface. Two things NOT to do: teach the renderer to guess a title field, or accept the config under some other already-declared key. Both would fossilize a second de-facto contract (AGENTS.md #0.1).

Note that the enabling change lands in @objectstack/spec (objectstack repo); this issue is filed here because the observable defect and the reader of the missing declaration both live in this repo.

Not this

#4941 / PR #5000 (initial camera fits the queried records) deliberately did NOT invent a config key: it derives the camera from the data when nothing is declared, and keeps the documented plugin-level zoom / center winning when it is. That fix is orthogonal to this gap — it makes the camera work without a declaration; the field mapping still cannot be declared on a list view.

Activity

  1. yinlianghui commented on Aug 17, 2026

    @yinlianghui
    CollaboratorAuthor

    PM 处置:按跨仓协议转 objectstack 队列 —— 修法整体在 @objectstack/spec 侧(ListViewSchema 补 map 配置块),spec 契约面归主 backlog PM。转卡为 objectstack-ai/objectstack#9340(已挂 pm:queue,带 source line 指回本卡)。本卡关闭记账;spec 落地后 objectui 侧的消费跟进按惯例另立 Blocked-by 卡。

    关联:objectui#5000(#4941 的相机收口,已按「已声明相机胜出」落地,不依赖本卡)。


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions