feat: optionally group identical sealed vials on Stock #18
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.42) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 323 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.346
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #18"
general
weight: 0.35
ArunNGun
What
Six sealed vials of the same compound and strength are six identical rows saying the same thing. This collapses them into one line with the totals.
It is a different way to read the same fridge rather than a better one, so it is a setting and it is off by default. Settings, Defaults, Group identical vials on Stock.
Only sealed vials group
Two reconstituted vials of one compound differ in exactly the things that decide what you do next: their concentration and their beyond-use date. Folding those together would hide the figures the page exists to show, so Open stays one row per vial regardless of the setting.
What a grouped row says
in totalon the label so it is not misread as a unit priceTwo decisions that could have gone the lazy way:
Mixed currencies report nothing. Adding 40 dollars to 3000 rupees produces a number with no meaning. If the priced vials in a group do not share a currency, no total is shown.
Unpriced vials are counted, not ignored. A group of five where two have no price reads
... · 2 without a price, so a total is never read as covering more than it does.The buttons still act on one vial
Reconstitute oneandDelete one, always the oldest in the group, which is the order a person reaches into a fridge in. A single click can never remove six vials. The labels change only when the row stands for more than one.Where the logic lives
groupSealedVialsis ininventory.tswith the rest of the vial arithmetic, and the page does no grouping of its own. 13 tests cover the grouping key, ordering and stability, the soonest expiry, the currency rule, the unpriced count, and that non-sealed vials are left alone.Gate
tsc --noEmitcleaneslintcleannext buildandBUILD_TARGET=static next buildboth succeedThe two builds were run with the
next/fontGoogle Fonts calls stubbed in a throwaway copy of the tree, because the environment this was prepared in cannot reach fonts.googleapis.com. Worth one confirming run with network before merge.Data
groupIdenticalVialsis an optional boolean onSettings, absent on every existing install, which is what makes the default off without a migration.The branch sits directly on current main and is independent of #16 and #13.