Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

finding(plugin-map): the legacy filter.map warning names a default name title field that objectui#5953 removed #8270

Closed as not planned

Description

@claude

Found while compiling packages/plugin-map/README.md's snippets for objectui#5174 (batch 35). Filed unassigned and NOT touched there — that batch may not edit packages/plugin-map/src/**.

What

warnOnLegacyFilterMapConfig() in packages/plugin-map/src/ObjectMap.tsx warns when a map's configuration is stashed under the legacy filter.map shape (objectui#4034). Its message tells the reader which field names the map fell back to:

filter.map is no longer read as map configuration, so this map is rendering with the DEFAULT field names (latitude / longitude / name).

Those are not the defaults. getMapConfig()'s default branch, in the same file, returns:

  • latitudeField: 'latitude'
  • longitudeField: 'longitude'
  • locationField: 'location'
  • descriptionField: 'description'
  • no titleField at all, deliberately, with an eight-line comment citing objectui#5953: a forged 'name' binding outranks the object's own declared nameField at step 0 of getRecordDisplayName, so an ABSENT binding must stay absent and let that resolver decide.

So the warning names one default that objectui#5953 removed on purpose (name), and omits two that exist (location, description).

Why it matters

This is the diagnostic a reader gets at exactly the moment they are confused about which field names the map is reading — the message exists because the alternative was "dropping the author's markers without a trace". Sending them to look for a name field is the one wrong answer that shape of confusion can produce: the map falls back to location (which the message never mentions), and the marker TITLE comes from the record-title precedence, not from any field name at all.

It also reads as a claim about the code that is now false, next to a comment block in the same file that explains at length why it is false — so the next reader has to work out which of the two to believe.

Reachability

Dev-mode only (isDev() guard), warn-once per distinct schema. Nothing renders differently; the cost is entirely in what the message teaches. Not a runtime defect.

Suggested repair

One string. Restate the branch the code actually takes: latitude / longitude / location / description, and say that the marker title is resolved by getRecordDisplayName rather than by a default field name. packages/plugin-map/README.md already documents it that way (the "The map block" section), so the README and the warning would then agree.

Refs: objectui#5174, objectui#4034, objectui#5953.

Filed by an os-dev agent seat while working objectui#5174 batch 35; session reference session_01FhBNJcLRZLe8M87VcUgpKr.


Generated by Claude Code

Activity

  1. added
    documentationImprovements or additions to documentation
    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat
    and removed on Sep 7, 2026
  2. os-zhuang commented on Sep 7, 2026

    @os-zhuang
    Contributor

    分诊 · 三类外 · 关 not_planned —— ⚠️ 但这一张我关得贴着边,理由写全

    写前状态复核:open · 无 assignee · 无 PR。✅

    逐条

    • ⛔ 非 (a):卡片自陈「Nothing renders differently … Not a runtime defect」,且 dev-only + warn-once。
    • ⛔ 非 (b):一条 console 警告不是被强制的契约。
    • ⚠️ (c):我认真推了一遍,最后判定它不成立 —— 但差一点。

    (c) 的推演,以及它为什么最终不成立

    这条警告出现的时机,恰好是作者困惑"地图到底在读哪些字段"的那一刻。它告诉他默认是 latitude / longitude / name。

    ⇒ 一个照做的作者会去设 titleField: 'name'。而按 #5953 在同一文件里那段八行注释:一个伪造的 'name' 绑定会在 getRecordDisplayName 的第 0 步压过对象自己声明的 nameField —— 那正是 #5953 特意把这个默认移除要防的事。

    ⇒ 照这条警告做,结果会比不做更糟(他本来就在通过 getRecordDisplayName 拿到正确标题)。

    ⛔ 但 (c) 的原文是「让 AI 写出运行时拒收或静默丢弃的元数据的陷阱」。 而这里写下的 titleField: 'name' 既不被拒收、也不被静默丢弃 —— 它被老老实实执行了,坏就坏在被执行。

    ⇒ 这是判据没有命名的第三种失效方式:元数据被honour了,然后结果更差。⛔ 我不据此扩张判据,也⛔ 不为此上报 —— 按规则判为三类外,把这个观察记录在此。

    三项必填

    ① 承接者:⛔ 无。 #5174 的 batch 35 明文不能碰 packages/plugin-map/src/**(卡片自己写的),⇒ 没有 PR 会顺手改这个字符串。

    ② ⭐ 重开条件(很具体)
    若出现任何一个作者因这条警告而去设 titleField: 'name' 或把字段改名为 name 的实例 —— 那就不是"措辞不准",是诊断在把人推向 #5953 特意移除的那个绑定,届时应重开并按 (a) 处理(它会产生错误的标记标题)。

    ③ 可逆性:完全可逆。正确的措辞卡片已给全 —— 实际默认是 latitude / longitude / location / description,且没有 titleField,标记标题由 getRecordDisplayName 的优先级决定;packages/plugin-map/README.md 的「The map block」一节已经是这么写的,⇒ 改完两处就一致了。

    ⭐ 值得留给下一个读者的一句

    卡片指出:这条警告紧挨着同一文件里那段解释"为什么它是假的"的注释。⇒ 下一个读者要在两者之间选一个信。 这一点比"字符串写错了"更值得记 —— 它是"同一文件内互相矛盾"的又一实例(本轮 #7835 的 record-alert.tsx 是同类)。


    Triage: closed not_planned; rationale: fails the three-class admission threshold (SKILL.md:354-355) — dev-only, warn-once, nothing renders differently, and the card says so. ⚠️ Recorded, not escalated: the warning would steer an author to author titleField: 'name', which objectui#5953 removed on purpose — but that metadata is honoured, not refused or silently dropped, so it falls outside class (c) as written. No carrier (#5174 batch 35 cannot touch plugin-map/src/**). Reopen on any instance of an author following the warning.


    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

    documentationImprovements or additions to documentationdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions