From 66e2fb98565c26dfd43f27a20d75818fb209d530 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 1 Sep 2026 12:01:42 +0200 Subject: [PATCH] docs: clarify unit suffix handling in DN items panel header The 'Total {sumQty}{unitSuffix}' header line now explicitly documents how mixed / missing units are handled: suffix is omitted when all items have empty/null units (operator defaults to 'EA'); when units are mixed, no suffix is shown; when all items share a non-EA unit (e.g. BOX), the suffix is shown. Self-review pass; no other changes. Co-Authored-By: Claude Code --- .../2026-09-01-deliveries-dn-items-expand-design.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/superpowers/specs/2026-09-01-deliveries-dn-items-expand-design.md b/docs/superpowers/specs/2026-09-01-deliveries-dn-items-expand-design.md index b61e160..d7e07bf 100644 --- a/docs/superpowers/specs/2026-09-01-deliveries-dn-items-expand-design.md +++ b/docs/superpowers/specs/2026-09-01-deliveries-dn-items-expand-design.md @@ -117,9 +117,15 @@ A bordered panel immediately below the existing `
` button column, inside the same outer `
`: -- **Header line**: "{n} items · Total {sumQty} EA" — right-aligned, - text-xs, muted foreground. When `n === 0`, the header line is - omitted; the empty-state takes its place. +- **Header line**: "{n} items · Total {sumQty}{unitSuffix}" — + right-aligned, text-xs, muted foreground. `sumQty` is the + sum of `item.quantity` across the panel's items. + `unitSuffix` is empty when the items' units are mixed or + empty/null; otherwise it's a single shared unit string (e.g. + `" EA"` or `" BOX"`). When all items have unit "EA" or empty, + the suffix is omitted entirely (the operator's mental default + is "EA"). When `n === 0`, the header line is omitted; the + empty-state takes its place. - **Per item line** (`
`): - Description: truncate + `title` for full text (`truncate`, `text-xs`)