Skip to content

Approvals inbox QUEUE rows still render (and sort on) an amount field the object declares hidden: true #6020

Description

@yinlianghui

Filed unassigned from work on #5565 (the drawer summary card trim). Sibling surface, same missing filter — recording it rather than widening that PR.

What was measured

decisionAmountEntry in apps/console/src/pages/system/ApprovalsInboxPage.tsx picks the one decision-relevant numeric field of the request's payload_json snapshot by matching AMOUNT_KEY_RE (amount|total|price|value|cost|sum|budget|salary|fee|revenue|balance plus the CJK spellings) against the key. It is called from four places:

line surface trimmed by #5565's fix?
~1845 drawer summary card lead figure ✅ yes
~444 RecordCell — desktop queue row (· {amount.display}, plus title={label: display}) ❌ no
~1649 mobile queue card (· {amount.display}, title={amount.label}) ❌ no
~1061 the sortKey === 'amount' comparator ❌ no

So after #5565 lands, a field the app author declares hidden: true whose key matches AMOUNT_KEY_RE is trimmed out of the drawer but still renders inline in the queue list, on both the desktop row and the mobile card — and still drives the amount sort order, which leaks the relative magnitude of a hidden field even to a viewer who never sees the figure.

Same invariant as #5565 and #5553: the app author's hidden declaration is bypassed on the approver's path. Same ruling applies (objectstack#10749, verbatim: hidden: true stays UI-only; internal: true is the serialization primitive) — so the fix belongs in the UI, and this is default UI too.

Why it was NOT fixed in #5565

Scope, and a genuinely different cost model — not an oversight:

Widening #5565 to cover this would have replaced a bounded, mechanical filter with an unrelated cost model and a behaviour change to sorting.

Note on the interim state

Between #5565 landing and this one, the drawer and the queue row disagree about the same field for the same request: the row shows the amount, the drawer does not. That is strictly an improvement over both showing it, but it is a visible inconsistency and worth closing.

Pointers

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions