Skip to content

fix(plugin-detail): summary chip honours percentDisplay plain - #36279

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36078-summary-chip-percent-plain
Nov 22, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-36078-summary-chip-percent-plain

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Leehom · project thread
Fixes #36078

Clause-②: no
Metadata-protocol: none

维护者速读

  • 看记录页的用户:标题旁的摘要小标签里,百分比字段设成「只显示数字」时,以前仍画进度条,改后只显示百分数;其他情况不变。
  • 为什么做:让记录页和列表对同一个百分比字段显示一致,解决胜率、利润率这类比率被误读成进度的问题。
  • 出错会怎样:最坏是摘要小标签多画或少画一条进度条,数值文字不受影响,可直接撤回本次改动。
  • 要你做什么:无。

What changes

The record header's summaryFields chip now honours a percent field's percentDisplay (the percentDisplay describe in packages/spec/src/data/field.zod.ts: plain = "the percentage as text alone, with no bar"). In DetailView's chip percent arm, the bar's fill value is computed only when the merged field bag (view entry over object schema, the same percentField bag the arm already reads scale and max from) does not say plain; with plain, the chip falls through to the plain Badge branch, so the text (formatPercent, unchanged) and the accessible name (Label: 40%, unchanged) stay and only the bar goes. Because the arm is chosen by armType, a formula whose returnType is percent takes the same path and its own percentDisplay counts too.

The bar-or-not rule is the literal percentDisplay === 'plain' test, inline in PercentCellRenderer (@object-ui/fields) and not exported, so this is a local read of the one key, not a second copy of an exported helper and not a published-export change.

No packages/spec change. Changeset: @object-ui/plugin-detail patch.

Read first (by risk):

  1. ui/packages/plugin-detail/src/DetailView.tsx, the hunk guarding summaryChipPercentPoints with percentField.percentDisplay !== 'plain'.
  2. ui/packages/plugin-detail/src/__tests__/summaryChip.percentPlain-36078.test.tsx.

Two-minute check: pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/summaryChip.percentPlain-36078.test.tsx (spec, formula and client built) prints 7 passed.

Tests

New summaryChip.percentPlain-36078.test.tsx (7 cases), stored value 0.4:

  • percent field plain reads 40%, accessible name Probability: 40%, no bar track;
  • percent formula (returnType: 'percent') plain: same;
  • plain declared on the object schema only (no view entry), judged after an arrival probe: same;
  • CONTROL: percent field with no percentDisplay, and with bar, draws the bar filled to 40%;
  • CONTROL: percent formula with no percentDisplay, and with bar, draws the bar;
  • CONTROL: a view entry bar over an object schema plain draws the bar (precedence).

Acceptance notes

Verification

All readings at head 4bf99c41.

Targeted tests (under the shared verify lock)
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/src/__tests__/summaryChip: Test Files 10 passed, 1 skipped (11); Tests 106 passed, 8 skipped. The existing summaryChip* pins stay green.
  • pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/src/__tests__/percentDisplayRelay-28255.test.tsx packages/plugin-grid/src/__tests__/percentAbsentScale.fiveFaces-9843.test.tsx packages/plugin-detail/src/__tests__/DetailView: Test Files 25 passed (25); Tests 170 passed (170).
  • pnpm --filter @object-ui/plugin-detail run type-check: exit 0 (after building the @object-ui/plugin-detail^... closure); tsconfig.test.json --listFilesOnly includes the new test file.
  • The full @object-ui/plugin-detail suite (405 test files) is declared to CI's Test UI, not run locally.
Ablation (one, on the committed fix)

node scripts/ablation-replace.mjs replaced the guard if (percentField.percentDisplay !== 'plain') { with an always-true guard: anchor 1 to 0, blob c62b65de4f71 to 915375fad2c8. The new file then read 3 failed, 4 passed: exactly the three plain cases red, all four controls green. Restore: blob after restore equals HEAD (c62b65de4f71), git diff HEAD empty, marker count 0. The test imports ../DetailView from source, so no build sits between the mutation and the run.

Derived gates

node scripts/pm/dispatch-gates.mjs --commands derived 38 commands for this diff; 37 ran locally with exit 0; pnpm check:type-check-debt is NOT MEASURED (its closure build never acquired the shared verify lock, exit 3 PREREQUISITE NOT MET) and is CI's Lint & Repo Gates. --ran reconciliation: 38 derived, 37 run, 1 NOT-MEASURED, 0 UNRUN. Also pnpm --dir ui run check:new-line-citations: 0 new citations.


Generated by Claude Code

@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 22, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

Final green head for L1: 4bf99c41b8389e407f93667769e9f08496a8d80e. Check-runs on it (pr-state 04:53Z): 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; no commit status; mergeable state clean (after seat 1's #36234 merged). Report: #36078 comment 7074246445. Sent to L1-d.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5ozidcgr4FYrKfmrjD

维护者速读

  • 记录页标题旁的摘要小标签:百分比字段若设为「只显示数字」(percentDisplay: plain),现在只显示百分比文字,不再画进度条,和列表里一致。
  • 没设或设为 bar 的照旧画进度条;作者写的元数据不变。
  • 结论:通过。
  • 要你做什么:现在不需要。

席位核对 — ACCEPT (L1-d) · repo:objectstack#4 · head 4bf99c41b8 · 2026-11-22T04:55Z

Read at 4bf99c41b8: 3 files, +179/−2. The face is Clause-②: no, Metadata-protocol: none. No contract face and not Tier H, so no L2 is owed.

Checked and fine

  • Shape. Draft, base main, first line Fixes #36078. Fixes is right: the card's Done-when (chip reads the merged field's percentDisplay, no bar for plain on a percent field and on a percent formula, CONTROLs for absent and bar) is all in the diff. l1-face is CLEAN.
  • The fix. One guard in the chip's percent arm: percentValue is set only when percentField.percentDisplay !== 'plain'. percentField is the existing { ...objField, ...sectionField } bag the arm already reads scale and max from, so the view-over-object precedence is the one the card names. percentValue is read only by the bar block (percentValue !== null), so text and accessible name are untouched, as the changeset says. The literal === 'plain' test matches PercentCellRenderer; no export moved.
  • Tests. 7 cases in summaryChip.percentPlain-36078.test.tsx: plain field, plain formula, plain on the object schema alone, and four CONTROLs (absent and bar on a field and a formula, view bar over object plain). Ablation (if (true)) turned exactly the three plain cases red with the four CONTROLs green; restore verified. The two extra pins pin the precedence the card names and are in scope.
  • Harness placement. plugin-detail has no shared summary-chip harness file: the chip's pins are ten per-card summaryChip.* files, so a new card-named file in that family does not breach the shared-harness rule (ruling record 6583487846).
  • Changeset. Read sentence by sentence against the diff: "drew its progress bar for every percent field and every formula whose returnType is percent", "reads percentDisplay off the same merged field it reads scale and max from", "plain shows the percentage text alone … absent or bar keeps the bar" and "the text, its accessible name and the stored value are unchanged" all match.
  • Seat 1 overlap. DetailView.tsx is shared with seat 1's feat(record-page): the field area is one list in the side preview, on a phone and in the pinned left column (#36147) #36234, now merged; the head is still mergeable_state clean. overlap-check.mjs --branch=pr-36279 --pr=36236,36208 against current origin/main: all merge cleanly. No RecordDetailView.tsx or RelatedList.tsx touch.
  • Gates. At 4bf99c41b8: 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; Lint & Repo Gates and TypeScript Type Check success. check:type-check-debt was NOT MEASURED locally (lock timeout, exit 3); CI's Type Check · debt ledger is green at this head, so it is covered. The full plugin-detail suite is declared to CI: the aggregate Test UI is green over an affected plan of 13 legs (the planner's first-N slots, by design in ci.yml).

Landing

  • Fixes #36078: merging closes the card; the area clears pm:dispatched at close per landing rule B. Non-governed, the area lands it.

Generated by Claude Code

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#4 · os-project-manager · session_01FEkQ5oLLK7uoxp33riiBJL

Landing · head 4bf99c41b8389e407f93667769e9f08496a8d80e · ACCEPT → PR #36279 comment 7074453219 (L1-d)

Probe Reading
check-governed-merges.mjs --pr 36279 NOT governed; 181 changed lines (+179 / −2), under 3000
check-runs on the head 42 success, 13 expected skip, 0 unexpected skip, 0 failed, 0 pending; mergeable clean

State: ready + auto-merge; on MERGED Fixes #36078 closes the card and the area clears pm:dispatched.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 22, 2026 04:56
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 28749e3 Nov 22, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-36078-summary-chip-percent-plain branch November 22, 2026 05:45
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 header summary chip draws the progress bar for a percent field whose percentDisplay is plain

1 participant