Skip to content

fix(plugin-detail): a long text summary roll-up wraps on the record page - #35269

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34182-summary-wrap
Nov 19, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34182-summary-wrap

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Bill · project thread

Fixes #34182

Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:记录详情页里,汇总(summary)字段改用它自己的只读展示 SummaryField 绘制,长文本汇总完整显示并自动换行;SummaryField 的文字颜色从写死的灰色改为主题前景色。
  • 为什么改:文本型汇总此前在记录页只显示一行加省略号,完整值只在悬停提示里;公式字段已经这样修过,汇总是剩下的一半。原来的固定灰色在暗色模式下不变,直接换过去会让数字汇总在暗色下发暗。
  • 风险与回滚:只影响记录详情页的汇总行和汇总字段的只读展示;列表/表格行仍是一行截断,高亮条不变。回滚即还原本 PR 两处源码改动。
  • 先看:ui/packages/plugin-detail/src/DetailSection.tsx(新增的 summary 分支,紧挨 formula 分支);ui/packages/fields/src/widgets/SummaryField.tsx(颜色类)。
  • 两分钟验证:pnpm --dir ui exec vitest run packages/plugin-detail/src/renderers/__tests__/record-details.textReadWraps-25897.test.tsx packages/fields/src/__tests__/summaryFaces.numberFace-11752.test.tsx,预期 2 个文件、143 个测试全部通过。
  • 需要你做的:无,席位落地。

What changes

  • SummaryField's read display takes the theme token text-foreground in place of the fixed text-gray-700, so a roll-up follows dark mode. text-foreground is the token the record page's value row itself sets. The sibling read faces (FormulaField, CurrencyField, NumberField) set no colour and inherit it.
  • DetailSection reads a summary through SummaryField, beside the formula branch that reads through FormulaField. It matches on renderer identity and type, so a host that registered its own summary face keeps it. The raw value goes in and the record goes in as dependentValues, which a record-mode currency needs.
  • Grid rows keep FormulaCellRenderer (one line, the whole value in title). The highlights strip is untouched.

Tests

The new pins go into the existing shared harness files as top-level describe blocks. No new file is added.

  • record-details.textReadWraps-25897.test.tsx, objectstack#34182 blocks:
    • at 1440 px and at phone width, a 120-character text summary cell holds exactly the markup SummaryField renders, shows the whole value, has no one-line utility between the text and the row, and has no title;
    • CONTROLS: getCellRenderer('summary') is still FormulaCellRenderer, which still renders truncate with the whole value as title; a number summary still reads 1,234.50; a host's own summary face is kept.
  • summaryFaces.numberFace-11752.test.tsx: the read display carries text-foreground and no fixed text-gray-*/slate/zinc/neutral/stone shade, for a number value and for a text value.

Acceptance notes

  • AutoNumberField's read display also hard-codes text-gray-700 with no dark: variant. This was only read in the code: on the record page auto_number reads through TextField, so the defect is limited to the form widget. It is outside this card's file surface, so this PR does not change it, and no card is filed.
  • Mechanism note: the card asks for "the token the other read displays use". Those read displays set no colour token and inherit one. This PR uses text-foreground, the token on the record row's value container, so the face carries a dark-mode colour in any container.

Verification

Ablation (two legs, both red, restored by hash)

Both mutations went through scripts/ablation-replace.mjs (each anchor hit 1 time, then 0 times; the blob changed). The @object-ui/fields specifier is aliased to src in ui/vitest.config.mts, so no dist rebuild sits between a mutation and the run.

  • Leg A: the summary branch in DetailSection.tsx is switched off (type summary-ablated). Result: Tests 2 failed | 141 passed (143). The two failures are the desktop and phone cases "a summary cell holds the read display SummaryField renders, in full, and wraps". All controls stay green.
  • Leg B: text-foreground is changed back to text-gray-700 in SummaryField.tsx. Result: Tests 2 failed | 141 passed (143). The two failures are both cases of "the summary read display carries a dark-mode colour".
  • Restore: git diff HEAD is 0 bytes, and the working-tree blob equals the HEAD blob for both files.
Local runs
  • Dependency closure build (--filter '@object-ui/plugin-detail^...' --filter '@object-ui/fields^...'): lock VERDICT command-exit 0.
  • Both touched test files: Test Files 2 passed (2), Tests 143 passed (143).
  • packages/fields/ plus packages/plugin-detail/: Test Files 693 passed | 2 skipped (695), Tests 8142 passed | 25 skipped (8167).
  • type-check for @object-ui/fields and @object-ui/plugin-detail (tsc --noEmit && tsc -p tsconfig.test.json): lock VERDICT command-exit 0.
  • Derived gate list (dispatch-gates.mjs --commands, 38 commands): 36 exit 0. check:type-check-debt is NOT MEASURED because its closure build never got a turn on the lock (exit 3, PREREQUISITE NOT MET); it is re-running. pnpm --dir ui exec vitest run scripts/: Tests 5092 passed | 2 skipped.
  • check:new-line-citations: 0 new citations.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ

SummaryField's read display takes the theme's text-foreground token in
place of a fixed text-gray-700, and the record details row reads a
summary through it, as it reads a formula through FormulaField. The
grid row keeps the one-line cell.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CZrgaiMgTJCnswR6jQ
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 19, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

Final head for review · area ux-2 · 2026-11-19T01:17Z
Head: 1459c2e1366dc6d61e9770a6cb286a91b5a9c624 — all check runs on it concluded: 44 success, 13 skipped, 0 failed.
Fixes #34182 · Clause-②: no · Metadata-protocol: none · +164/−9 over 5 files.
Review route: L1-a thread (not ≤50 lines text/tests only, so not area self-review). Landing after its ACCEPT, by the area.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CXsZsKmgG1EcKp5bY4

维护者速读

  • 改了什么:记录详情页的汇总(summary)字段改用它自己的只读展示 SummaryField 绘制,长文本汇总完整显示并换行;SummaryField 文字颜色从写死的 text-gray-700 改为主题色 text-foreground。
  • 为什么改:文本汇总此前在记录页只显示一行省略号,完整值只在悬停提示里;公式字段已在 console record page: a long text or formula value in the field grid renders on one line with an ellipsis, and the full value is only in a hover tooltip #34148 修过,这是剩下的汇总一半。写死的灰色在暗色模式下不变。
  • 风险与回滚:只影响记录详情页的汇总行和汇总字段只读展示;列表/表格行仍一行截断,高亮条不动,宿主自注册的 summary 展示保留。浅色模式下汇总文字会略深(灰 700 → 前景色)。回滚即 revert 本 PR。
  • 先看:ui/packages/plugin-detail/src/DetailSection.tsx 新增的 summary 分支(紧挨 formula 分支);ui/packages/fields/src/widgets/SummaryField.tsx 颜色类。
  • 两分钟验证:打开带长文本汇总字段的记录,值完整换行显示;切暗色模式,汇总数字不发暗。
  • 需要你做的:无,区内落地(非受管面、173 行)。L1 意见:改动小而准,钉子和消融齐全,可落。

席位核对 — ACCEPT (L1-a) · repo:objectstack#5 · head 1459c2e1366dc6d61e9770a6cb286a91b5a9c624 · 2026-11-19T01:20Z

  • 形态: draft → main, 5 files, +164/−9, 2 commits. Fixes #34182 on the first content line; no other card number beside a closing keyword in the body. check-governed-merges --pr 35269: 0 of 5 paths governed, 173 lines ≤ 3000 → ordinary queue landing. Clause-②: no, Metadata-protocol: none.
  • Changeset: .changeset/34182-summary-read-wraps.md, patch for @object-ui/plugin-detail + @object-ui/fields (neither private, both published). Sentences read against the diff: "reads a summary through the summary field's own read display, the face the record form draws" (lazy registry maps summary → SummaryField); "a number or money roll-up reads the same text" (control pin 1,234.50); "list and grid rows keep the one-line cell" (control pin on FormulaCellRenderer truncate + title); "a host's own summary face is kept" (control pin); "no metadata key, value or default changes" (true: no packages/spec path). No content/docs/releases/ change, no unrelated file.
  • 差异由 L1 读过: DetailSection.tsx adds one branch CellRenderer === FormulaCellRenderer && resolvedType === 'summary' → <SummaryField … dependentValues={data} readonly />, same shape as the formula branch; comment block updated. SummaryField.tsx one class swap. Both test files existed on main (git diff --summary: only the changeset is a new file), new blocks appended as top-level describes.
  • 前提: card Blocked-by: #34148; the formula branch it names is on main at merge base cdb327fd. Card asks: dark-mode colour on the read display, summary read through it on the record grid, grid row and highlights keep their faces, pins + control + ablation. All present.
  • Pins: record page at 1440 px and phone width: the summary cell's innerHTML equals SummaryField's markup, full text, no one-line class between text and cell, no title. Fields package: text-foreground present and no fixed text-(gray|slate|zinc|neutral|stone)-N, for a number and a text value. Ablation in PR body, two legs each 2 failed | 141 passed (143), restored by blob hash.
  • 门禁: check-runs on head 1459c2e1: 44 success, 13 skipped, 0 failure. Lint & Repo Gates, TypeScript Type Check, Lint UI, Type Check UI, Test UI (16/16 shards), Build & E2E UI, Check Changeset all success. Dev local check:type-check-debt NOT MEASURED; CI Type Check · debt ledger on this head is success, which covers it.
  • 接受的偏差: none beyond the mechanism note in the body (card says "the token the other read displays use"; those inherit and set none, so the PR uses text-foreground, the token the record row's value container sets). Accepted.
  • 范围外去向: AutoNumberField's read display in the published @object-ui/fields also hard-codes text-gray-700 with no dark: partner (dev read it in code, not touched here). Noticed-and-untouched published defect ⇒ a follow-up card is owed: ux-2 files it (p3, area:ux) before close-out of Record page: a long text summary roll-up is cut to one line, and SummaryField's read display has no dark-mode colour #34182 and puts its number in the close-out comment.
  • 落地条款: K = 3 first-parent commits on main since merge base cdb327fd (< 15), no new locale pack. Non-governed ⇒ ux-2 lands per landing-operations.md (pr_ready + auto-merge) after this ACCEPT; on MERGED, close-out on Record page: a long text summary roll-up is cut to one line, and SummaryField's read display has no dark-mode colour #34182 with the follow-up card number.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#5 · os-bill · session_01Utp6CZrgaiMgTJCnswR6jQ

Landing · area ux-2 · 2026-11-19T01:20Z

reading value
L1-a ACCEPT comment 6996715024 at head 1459c2e1366dc6d61e9770a6cb286a91b5a9c624 (= current head)
check-governed-merges --pr 35269 NOT governed, 0 of 5 paths, 173 lines ≤ 3000; K = 3 (cdb327fd..origin/main), no new locale pack, no os-regen path

State: draft → ready + auto-merge (merge queue). #34182 closes on merge via Fixes.

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 Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record page: a long text summary roll-up is cut to one line, and SummaryField's read display has no dark-mode colour

2 participants