You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7b7880e
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ui): percent cells honour percentDisplay: plain prints the percentage with no bar
PercentCellRenderer reads the field's percentDisplay; the seven relay sites
that copy useGrouping onto a cell's field metadata copy it too. The field
form gains the percentDisplay row, its reconciliation omit row goes, and the
liveness row flips planned -> live.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibvqwtTGSkCm75Nci1s
Copy file name to clipboardExpand all lines: packages/spec/liveness/field.json
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -272,9 +272,12 @@
272
272
"note": "[#7768] Declared 2026-08-11 as Option A of that card's fork, the narrowest shape with measured pull. Maps 1:1 to `Intl.NumberFormat`'s `useGrouping`. FLIPPED `planned` → `live` 2026-09-30, on the condition this row's earlier note set, that the objectui consumer actually read the key: the renderer half landed as objectui ae582b70a, and objectui's compare `ae582b70a...db11afd4967c` answers ahead 21, behind 0, so it is inside the console this repo pins — measured at the pin, not on objectui main. An authored boolean decides in either direction. An ABSENT key is still the renderer's call: the interim heuristic objectui#4033 introduced stays for exactly that case, and it reads the declared `scale` alone, never `min` or `max` — a declared `scale: 0` with no currency is a discrete integer, a year or an ordinal, and renders ungrouped, while any other number keeps grouping. Never `authorWarn`'d, so the flip drops no warning, and an author who set the key while it was `planned` re-authors nothing. CAVEAT — display only, and only on the surfaces whose field metadata carries the key to the cell: the seven relay sites `producer` names."
273
273
},
274
274
"percentDisplay": {
275
-
"status": "planned",
276
-
"verifiedAt": "2026-10-30",
277
-
"note": "Declared spec-first on a `domain:spec` card (the spec half of a percent field's read-only face; the `domain:ui` renderer half is its own follow-up card). Measured at objectstack main 9f13ee81: ui/packages/fields/src/index.tsx#PercentCellRenderer draws the progress bar for every value and reads no key that turns it off, so nothing reads `percentDisplay` yet. Same shape as `useGrouping` when it was declared: a flat display hint, no default, not `authorWarn`'d (display only: an authored `plain` still shows the bar, and the describe says so). Flip to `live` once the console's percent face reads the key, measured under `ui/`, and drop the describe's not-yet-read clause in the same change."
275
+
"status": "live",
276
+
"verifiedAt": "2026-10-31",
277
+
"evidenceScope": "in-repo",
278
+
"evidence": "ui/packages/fields/src/index.tsx#PercentCellRenderer reads `field.percentDisplay` after it formats the value, and the literal `plain` returns the formatted percentage alone with no `progressbar`; an absent key or `bar` keeps the bar beside the number, the renderer default the describe names. That one renderer draws a percent value on every read-only host, a list grid cell, a detail-view field and a `record:highlights` header chip, so one read covers all three. Measured in-tree at objectstack main 6285203d plus this change, where `ui/` is built with the platform",
279
+
"producer": "ui/packages/plugin-grid/src/objectGridGenerateColumns.tsx#useObjectGridGenerateColumns copies the object definition's `percentDisplay` onto the column's field metadata beside `useGrouping` on each of its three column paths; ui/packages/plugin-detail/src/fieldEnrichment.ts#ENRICHED_FIELD_METADATA_KEYS lists it among the object-metadata keys copied onto a detail-view or header-chip field; ui/packages/plugin-detail/src/RecordDetailPanel.tsx#buildRecordDetailFields, ui/packages/plugin-detail/src/RelatedList.tsx#effectiveColumns and ui/packages/plugin-list/src/ObjectGallery.tsx#ObjectGallery relay it beside `useGrouping` the same way — seven hand-copy sites, the same seven the `useGrouping` row names. They are the producer half because the cell reads the field metadata these sites build, never the object definition: a site that dropped the key would leave an authored `plain` probability drawing its bar on that surface",
280
+
"note": "Declared spec-first on a `domain:spec` card (the spec half of a percent field's read-only face), `planned` until the renderer half read it. FLIPPED `planned` → `live` 2026-10-31 on the condition this row's earlier note set: the console's percent face reads the key, measured under `ui/`, and the describe's not-yet-read clause is dropped in the same change. Never `authorWarn`'d, so the flip drops no warning, and an author who set `plain` while it was `planned` re-authors nothing. CAVEAT — display only, and only on the surfaces whose field metadata carries the key to the cell: the seven relay sites `producer` names. The edit widget is unchanged: a percent field being edited is an input, not a face."
// groups, and the help text says so in the words of the `object.form.ts`
93
93
// `userActions` row. Gated like `scale`, a `number`-only hint.
94
94
{field: 'useGrouping',visibleWhen: "data.type == 'number'",helpText: 'Digit grouping (thousands separators) in displayed values. Unset: the renderer decides; an untouched switch writes nothing, so it reads off even where the renderer groups. Off: never grouped, e.g. a year or an ID. On: always grouped.'},
95
+
// `percentDisplay` is shown once it is enforced, the `useGrouping`
96
+
// row's order: the console's percent face reads it on every read-only
97
+
// host, so declared = enforced = shown. A select over the schema's two
98
+
// members with no default: an untouched row writes nothing and the
99
+
// field keeps the renderer's default face, the bar. Gated to `percent`,
100
+
// the one type the key describes.
101
+
{field: 'percentDisplay',type: 'select',visibleWhen: "data.type == 'percent'",helpText: 'How the value is shown read-only, in list cells and on the record page. Unset: a progress bar beside the percentage. Bar: always the progress bar, for progress. Plain: the percentage alone, for a rate or a probability.',options: [
102
+
{label: 'Bar',value: 'bar'},
103
+
{label: 'Plain',value: 'plain'},
104
+
]},
95
105
// #19332 G1b (ruling 5861442317, G1) — `currencyConfig` is a strict object
96
106
// with two keys, and both members of its one enum are spellable option
97
107
// values, so it takes the `object.form.ts` `access` / `lifecycle` face: a
* Display only: it changes no stored value, no validation and no width.
1519
1519
*
1520
-
* Declared spec-first: the console's percent face does not read it yet (the
1521
-
* renderer half is its own `domain:ui` card), so the liveness row is
1522
-
* `planned` and the describe says so until that reader lands.
1520
+
* Read by the console's percent face (`PercentCellRenderer` under `ui/`) on
1521
+
* every read-only host: list-grid cells, the record page's fields and its
1522
+
* header chips. The liveness row is `live` and names the relay sites that
1523
+
* carry the key to that renderer.
1523
1524
*/
1524
-
percentDisplay: z.enum(['bar','plain']).optional().describe('How a `percent` field is displayed read-only (list cells, record page). Absent = the renderer default, a progress bar beside the percentage; `bar` = pin the progress bar; `plain` = the percentage as text alone, with no bar, for a rate or a probability rather than progress. Display only: the stored value, its validation and its decimal places (`scale`) are unchanged. Declared ahead of its renderer: the Studio UI does not read it yet, so every percent field still draws the bar until it does.'),
1525
+
percentDisplay: z.enum(['bar','plain']).optional().describe('How a `percent` field is displayed read-only (list cells, record page). Absent = the renderer default, a progress bar beside the percentage; `bar` = pin the progress bar; `plain` = the percentage as text alone, with no bar, for a rate or a probability rather than progress. Display only: the stored value, its validation and its decimal places (`scale`) are unchanged.'),
why: "planned, not yet rendered — the reader's pressed-state predicate is validated at parse (CEL only, no boolean literal) and judged at the authoring doors in the `record` scope, but no action surface draws the pressed face until the console's header buttons read it. A form control offered today would let an author write a predicate nothing shows",
377
377
},
378
-
// #27973 — the same declared-not-enforced shape: `percentDisplay` is the spec
379
-
// half of a percent field's read-only face, `planned` in `liveness/field.json`
380
-
// until the console's percent face reads it.
381
-
{
382
-
kind: 'omit',
383
-
type: 'field',
384
-
path: ROOT_PATH,
385
-
key: 'percentDisplay',
386
-
why: "planned, not yet rendered — a percent field's read-only face (`bar` or `plain`) parses, but the console's percent face draws the progress bar for every value until it reads the key, after the spec publishes. A form control offered today would let an author pick `plain` and still see the bar; the field form gains the row with the renderer half, as `useGrouping` did once it was enforced",
387
-
},
388
378
// #27945 — a lookup's pick autofill lands spec-first the same way: `planned`
389
379
// in the liveness ledger, read by no form or grid until the ui card's lookup
0 commit comments