Skip to content

fix(plugin-detail): a related list's date column reads in one absolute face - #26519

Merged
objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-26344-related-date-one-face
Oct 27, 2026
Merged

objectstack-fleet[bot] merged 5 commits into
mainfrom
claude/issue-26344-related-date-one-face

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #26344
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:记录页相关列表(RelatedList)自建的表格单元格,现在和列表网格一样带上 inGridColumn;未声明 format 的日期列整列只显示一种绝对日期,相对说法("昨天"、"逾期 3 天")移到悬停提示里。
  • 为什么改:fix(fields,plugin-grid): a grid date column reads in one absolute face #26341 只修了网格,相关列表的日期列仍是"Yesterday · 3 days ago · Sep 20, 2025"混排,排序后看不出顺序;裁决同一条:可排序的列用绝对日期,相对说法至多作提示。
  • 风险与回滚:只改 RelatedList.tsx 一处单元格构建(加一个属性)、一个新 pin、一个旧 pin 改断言、一个 patch changeset。声明了 format: 'relative' 的字段照旧;手机宽度的卡片画廊、详情正文不受影响。回滚即 revert 本 PR。
  • 先看:ui/packages/plugin-detail/src/RelatedList.tsx 的 makeCell 末尾 inGridColumn: true;新 pin RelatedList.dateColumnOneFace-26344.test.tsx 的四条路径。
  • 两分钟验证:cd ui && pnpm exec vitest run packages/plugin-detail/src/__tests__/RelatedList.dateColumnOneFace-26344.test.tsx packages/plugin-detail/src/__tests__/RelatedList.deadlineSettled-11815.test.tsx,预期 2 个文件 6 个用例全绿。
  • 需要你做的:无;另请看 Acceptance notes 第一条(list grid: a date column mixes relative and absolute formats in the same column ("昨天 / 3天前 / 7天前 / 9月25日 / 2025年9月20日"), so a sorted column cannot be read as sorted #25884 待发布说明里有一句会随本 PR 变得不准,是否改由你定)。

What changes

  • ui/packages/plugin-detail/src/RelatedList.tsx: the table cell builder (makeCell) passes inGridColumn: true on every cell it creates, the way ObjectGrid does since fix(fields,plugin-grid): a grid date column reads in one absolute face #26341. All three column sources reach that one builder (object columns, string columns and the object's highlightFields through normalizeColumn, and the field walk), so one line covers every table cell the list builds. An undeclared date column now reads in one absolute face, with the relative phrase as the cell's title; a declared format still wins (DateCellRenderer reads the flag only when the field declares none).
  • New pin ui/packages/plugin-detail/src/__tests__/RelatedList.dateColumnOneFace-26344.test.tsx, modelled on ObjectGrid.dateColumnOneFace-25884. It mounts the real list over the real data-table at desktop width and drives paths A (object columns), B (string columns), C (highlightFields) and D (the field walk). For each one it checks: one absolute face per date column (six rows at -1, -3, -6, +2, -40 and -400 days), the deadline's red kept with Overdue 3d / In 2 days as tooltip, Yesterday as the tooltip of an undeclared date, and the control: a field declaring format: 'relative' keeps Yesterday / 3 days ago.
  • RelatedList.deadlineSettled-11815.test.tsx: its cell text expectations moved from the relative phrase to the absolute face plus the phrase as title. The per-row verdict it pins (open row red, settled row neutral) is unchanged.
  • Changeset .changeset/26344-related-date-one-face.md (@object-ui/plugin-detail patch), carrying both declaration lines.

Tests

  • Red first: at 548f25d0 (pin only, no fix) the new pin failed 4 of 4, each on expected 'Yesterday' not to match /ago|yesterday|today|tomorrow|^in \d|…/i.
  • After the fix (ca662813), pnpm exec vitest run packages/plugin-detail --maxWorkers=2 (from ui/, under the verify lock): 1 failed, the 11815 pin asserting the old relative text, as expected. That pin was updated in d6a01e1d.
  • pnpm exec vitest run packages/plugin-detail --maxWorkers=2 on the tree of d6a01e1d: Test Files 309 passed, 1 skipped (310); Tests 2869 passed, 18 skipped (2887); lock VERDICT command-exit 0. The head 2811bbcc differs from that tree only by restoring .changeset/25884-grid-date-absolute.md to its merge-base bytes.
  • pnpm --filter @object-ui/plugin-detail type-check (tsc --noEmit && tsc -p tsconfig.test.json): VERDICT command-exit 0. tsc -p tsconfig.test.json --listFilesOnly lists both touched test files (2 of 2).

Gates

At head 2811bbcc: node scripts/pm/dispatch-gates.mjs --commands derived 34 families. All 34 ran with exit 0 and were reconciled with --ran: "34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED (a DERIVED zero)". These include check-sdui-manifest (intact, 106 components; no registry contract changed, so no regeneration), check-empty-changeset, check-adr-0087-registration, check:cross-package-test-inputs, check:test-source-alias, check:type-check-coverage, check:type-check-debt and pnpm --dir ui exec vitest run scripts/ (178 files passed, 2 skipped). Families CI runs outside the derived set are left to the PR's check-runs.

Acceptance notes

  • The pending release note .changeset/25884-grid-date-absolute.md (from fix(fields,plugin-grid): a grid date column reads in one absolute face #26341) lists "a record page's related list" among the surfaces that "render date cells as before". Once this PR lands, that sentence is false for the release that ships both notes. An earlier commit on this branch corrected it, and check-empty-changeset refused the edit: rewriting another PR's pending note is a decision about a release, not part of this diff. The note is therefore left byte-identical to main, and this PR's own note states the new behaviour. Whether to drop the four words from the list grid: a date column mixes relative and absolute formats in the same column ("昨天 / 3天前 / 7天前 / 9月25日 / 2025年9月20日"), so a sorted column cannot be read as sorted #25884 note is left to a person.
  • CellRendererProps.inGridColumn's doc comment in ui/packages/fields/src/index.tsx says ObjectGrid passes the flag. That is still true but no longer complete, because a related list's table passes it too. The file is outside this card's surface, so the comment is unchanged.
  • The Add picker (RecordPickerDialog, cellRenderer={getCellRenderer}) draws its own candidate table in @object-ui/fields, which is not one of the cells this list builds, so it is untouched. Whether its date columns mix faces was not measured.
  • On a phone-width viewport the list renders as a gallery, which does not use these cells, so it is unchanged.
  • In path A the object columns are authored as { field, label }. An object column with no display text is deliberately left headerless (RelatedList.columnHeaderLabel).

Generated by Claude Code

…e face

RelatedList's table cell builder passes inGridColumn on every cell it
makes, as ObjectGrid does, so an undeclared date column paints one
absolute face with the relative phrase as its title. A declared format
still wins.

Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup
Co-authored-by: Claude <noreply@anthropic.com>
…oltip

A related list's table cell now paints the absolute face with the
relative phrase as its title, so the per-row deadline pin asserts both.

Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup
Co-authored-by: Claude <noreply@anthropic.com>
Correcting another PR's pending release note is a release decision for a
person, not part of this diff.

Claude-Session: https://claude.ai/code/session_01SMps7wq7rBTk53e8KTSEup
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling labels Oct 27, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

维护者速读

改了什么:记录页相关列表自建的表格单元格,现在和列表网格一样带上 inGridColumn;未声明 format 的日期列整列只显示绝对日期,相对说法(「昨天」「逾期 3 天」)移到悬停提示里。
为什么改:#26341 只修了网格,相关列表的日期列仍是「昨天 · 3 天前 · 2025年9月20日」混排,排序后看不出先后(#26344)。
风险与回滚:只在 RelatedList.tsx 的 makeCell 加一个属性;声明了 format(包括 relative)的字段照旧,手机宽度的卡片画廊和详情正文不受影响。回滚 = revert 本 PR。
先看:ui/packages/plugin-detail/src/RelatedList.tsx 的 makeCell(末尾 inGridColumn: true)→ 新钉子 RelatedList.dateColumnOneFace-26344.test.tsx → 改了断言的 RelatedList.deadlineSettled-11815.test.tsx。
两分钟验证:在 ui/ 下运行 pnpm exec vitest run packages/plugin-detail/src/__tests__/RelatedList.dateColumnOneFace-26344.test.tsx packages/plugin-detail/src/__tests__/RelatedList.deadlineSettled-11815.test.tsx,预期 2 个文件 6 个用例全过。
需要你做的:无,席位落地。
席位意见:ACCEPT。开放问题(#25884 待发布说明里「相关列表照旧」一句会变得不准)裁 A:不改别的 PR 的发布说明,本 PR 的 changeset 已写明新行为,两条说明一起发布时以新的为准。

席位核对

seat 2 · 2026-10-27T06:47Z · head 2811bbcc (#26344)

item reading
form 4 files: RelatedList.tsx makeCell passes inGridColumn: true (the one table cell builder: object columns, string columns, highlight fields, field walk); new pin RelatedList.dateColumnOneFace-26344 (paths A–D on the real data-table); RelatedList.deadlineSettled-11815 assertions restated (relative text → absolute face + title; per-row verdict unchanged); root .changeset/ patch on plugin-detail
premise measured inGridColumn on CellRendererProps since #26341; RelatedList.tsx built cells without it
gates (check-runs on 2811bbcc) 45 success, 9 skipped, 0 failing (Test UI 16/16, Build & E2E UI, Type Check UI, Lint UI, governed guard all green). Local: red 4/4 at the pin-only commit, green after; plugin-detail 309 files / 2869 tests; type-check exit 0 (both touched tests in tsconfig.test.json); check-sdui-manifest exit 0; 34 of 34 derived gates exit 0
accepted deviations the 11815 pin's assertions restated (it pinned the retired relative face); an intermediate edit to .changeset/25884-grid-date-absolute.md was reverted to base bytes, so the PR does not touch it
open question stale clause in the #25884 release note: A, leave it
out of scope CellRendererProps.inGridColumn doc comment names only ObjectGrid (true, incomplete; no carrier); RecordPickerDialog date faces not measured (no carrier)
landing not governed (check-governed-merges: 212 changed lines, no hit paths); git merge-tree against origin/main d2ca707 clean; next on RelatedList.tsx: #26415

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 27, 2026 06:48
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 27, 2026 06:48
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit 28804e8 Oct 27, 2026
55 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-26344-related-date-one-face branch October 27, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling

Projects

None yet

2 participants