Skip to content

ListViewBlock 仍带一份 dataSource 合成优先级的私有副本,与 #6953 落地的 ElementDataSourceGate 重复(漂移风险) #7120

Closed as not planned

Description

@yinlianghui

发现于 objectstack#6953 的实施过程。观察类(observation-class):今天没有用户能碰到的错误行为 —— 两份实现当前语义一致,是未来漂移的风险面,故只打 finding、不入队。

事实

objectstack#5576 在 packages/plugin-list/src/ListViewBlock.tsx 内联写了「binding 覆盖组件键 / view 只作基线 / filter 走 and 合成 / 空 columns 视作未声明 / limit 落 pagination.pageSize / viewType 仅在未声明时取」这套优先级表。

objectstack#6953 为其余 8 个 block 接线时,把同一张表提到了 @object-ui/react 的共享件里(packages/react/src/element-data-source/ElementDataSourceGate.tsx 的 useElementDataSourceSchema + ElementDataSourceGate),因为一 block 一份就是「additional filter criteria」变成两种方言的路径。#6953 没有顺手改 ListViewBlock —— 那是 #5576 已合的落地代码,在一个接线 PR 里重构它是范围外的回归面。

于是现状是:同一张优先级表存在两份实现,list-view 用私有副本,其余 8 个 block 用共享件。

为什么是 finding 而不是 defect

两份当前语义等价(#6953 的共享件是照着 ListViewBlock 的规则写的,#5576 的整套测试在该 PR 下全绿:packages/plugin-list/ 60 文件 826 例通过)。用户今天碰不到任何差异。风险是下一次改语义的人只改一边 —— 这类漂移在本仓有前情(声明与读点各改一边)。

建议范围

把 ListViewBlock 收敛到共享件:

const LIST_VIEW_DATA_SOURCE = {
  columns: true, filter: true, sort: true,
  limit: 'pagination.pageSize', viewType: true,
};

配 ElementDataSourceErrorPanel / ElementDataSourceLoadingPanel(共享面板的 testId 前缀取 list-view 时,产出的 list-view-datasource-error / list-view-resolving-view 与 #5576 现有断言逐字符一致,面板文案用 errorTitle 传原句即可)。删掉 ListViewBlock 里的 useMemo 映射块(约 45 行)。

验收就是 #5576 那套测试不动一行仍全绿 —— 若有任何一例需要改断言,说明两份实现本来就有差异,那才是真 defect,应当在那时改判等级。

Activity

  1. added
    repo:objectuiSeam card: cross-repo ordering with objectui is the substance (pure objectui fixes live in objectui)
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 9, 2026
  2. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Finding-triage ruling: Hold (why still held): pure drift risk — ListViewBlock's private dataSource priority copy is semantically equal to the shared ElementDataSourceGate today, and the acceptance criterion for the eventual refactor (existing #5576 tests untouched-green) is on record. Restart: next card touching ListViewBlock, or the shared-sink-consolidation sweep together with #7148.

    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

  3. os-zhuang commented on Aug 10, 2026

    @os-zhuang
    Contributor

    Migrated to objectstack-ai/objectui#4038 under #7167 (file-at-destination ruling, maintainer 2026-08-10). Native GitHub issue transfer is not available to this session's credential, so the card was recreated at the destination; this thread stays as the authoritative history and is linked from the new card. Closing as not planned here — moved, not rejected.


    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

    findingRecorded observation — held, not dispatchable until the findings triage round grades itrepo:objectuiSeam card: cross-repo ordering with objectui is the substance (pure objectui fixes live in objectui)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions