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.

观察:RecordPickerDialog 的 baseFilterColumns memo 与 baseFilter prop 无关,命名误导同文件读者 #3898

Closed as not planned

Description

@yinlianghui

观察类发现(finding,不进 pm:queue),发现于 #3831 的前提复核过程 —— 纯命名问题,今天没有任何用户会撞到。

机制

packages/fields/src/widgets/RecordPickerDialog.tsx 里有两个名字挨得很近、语义完全无关的东西:

baseFilterColumns 的 base 指的是「未经 i18n options 补全的原始列」(相对于 effectiveFilterColumns),不是 baseFilter。两者在同一文件里相距 160 行,而 mergedFilter(:590-601)同时读 baseFilter 和 effectiveFilterColumns,所以三个名字在同一个 memo 里交汇。

有害在哪(只有可读性)

在 baseFilter 这条线上改代码的人,grep baseFilter 会命中 baseFilterColumns 及其两个下游,读起来像是「baseFilter 也参与筛选栏列的派生」——即「作者的硬约束会显示成筛选栏里的列」,恰好是 baseFilter 注释明确否认的语义。运行时行为完全正确,纯粹是命名带来的误读成本。

落地建议

把 baseFilterColumns 改名为语义准确的名字(如 derivedFilterColumns / rawFilterColumns),effectiveFilterColumns 保持不变。纯局部重命名,无导出面变化(两者都是文件内 memo),无行为变化。

参考位置

  • packages/fields/src/widgets/RecordPickerDialog.tsx:369(baseFilter prop)/ :529(baseFilterColumns memo)/ :580(effectiveFilterColumns)/ :590-601(mergedFilter,三者交汇处)

关联:#3831(发现来源)、#2215(baseFilter 的来历)

Activity

  1. claude commented on Aug 9, 2026

    @claude
    Contributor

    Findings round — held: finding stays.

    • Premise re-verified @ 99ba5fb, with anchor drift noted: the collision is still live but the lines moved — the prop is now baseFilter?: unknown at RecordPickerDialog.tsx:399 (typing changed by the record:related_list.add.picker.filter 全仓零读点:作者限定了 Add 选择器的候选范围,对话框照样提供该对象的全部记录 #3831-family fix) and the baseFilterColumns memo sits at :559. The misleading-name mechanism is unchanged: a baseFilter grep still lands on baseFilterColumns and its downstream, suggesting a data relationship that does not exist.
    • Why held: cosmetic-readability rename of a file-local memo with zero behavior/export change — below the dispatch bar on its own; a standalone rename PR on a hot widget file buys review cost for no user-visible value.
    • Restart condition: fold into the next queued card that touches RecordPickerDialog.tsx — the claimant should pull this rename alongside (one review, zero extra risk). Recorded here so the next same-file dispatch prompt can cite it.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  2. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Finding-triage ruling: Close (not planned).

    Pure file-local rename memory: baseFilterColumns has no data relation to baseFilter, behavior is fully correct, and the 08-09 hold itself graded this borderline-close absent a same-file card. Under this centralized pass's stock-reduction mandate a standing card for a one-line rename is negative-value; if a future card touches RecordPickerDialog, the rename is a one-line rider. Maintainer veto window applies: reopen to veto (#4949 pattern).

    Authorization: maintainer directive (this session) —「对于issue中的findings 执行一次集中分诊,并更新issue 的状态。」Centralized pass under that directive; finding grading is normally the triage seat's single channel. Round: objectstack#4949 finding-triage, 2026-08-10.
    Session: 01JaVVMrSxt7Tgi1uwEuDtH7


    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