toga-ai 1.0.616 → 1.0.617

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,8 +27,12 @@ selected expedited method auto-resets to **"Standard Ground"**. The behavior is
27
27
  driven** — a tenant opts in per shipping-method field via an `optionGates` entry; there is no
28
28
  `if (clientSlug === ...)` branching. Omitting `optionGates` means expedited is always shown.
29
29
 
30
- Applies today to all three tenants: **COMPASS**, **COMPASSCANADA** (English + French), and
31
- **QUAD**.
30
+ Applies today to: **COMPASS** (USER/MANAGER/SUPERUSER — **not ADMIN**, see below),
31
+ **COMPASSCANADA** (English + French), and **QUAD**. Because configs are **per role**
32
+ (`.../FIELDS/<CLIENT>/<LANG>/<ROLE>/CARTPAGE.ts`), opting a single role out of the gate is done
33
+ by dropping `optionGates: [EXPEDITED_SHIPPING_GATE]` from that one role's shipping-method field —
34
+ no shared-logic or client-branching change. **Compass USA ADMIN** now omits the gate, so admins
35
+ always see every method (Standard Ground + both expedited) in both regular and edit-order mode.
32
36
 
33
37
  ## Key files / entry points
34
38
  - `src/pages/Cart/helpers/shippingOptionGates.ts` (NEW) — pure helpers + types:
@@ -40,8 +44,10 @@ Applies today to all three tenants: **COMPASS**, **COMPASSCANADA** (English + Fr
40
44
  `EXPEDITED_SHIPPING_GATE` config constant: `optionNames` `["2nd Day EOB","Next Day Air"]`,
41
45
  `visibleWhen { item: "primaryItem", path: "item.itemCategory.name", operator: "equals",
42
46
  value: "COMPUTERS" }`.
43
- - 15 `CARTPAGE.ts` files (COMPASS x4 roles, COMPASSCANADA ENGLISH x4 + FRENCH x4, QUAD x3) —
44
- each shipping-method field opts in via `optionGates: [EXPEDITED_SHIPPING_GATE]`.
47
+ - `CARTPAGE.ts` files (COMPASS USER/MANAGER/SUPERUSER — **ADMIN opted out**, COMPASSCANADA
48
+ ENGLISH x4 + FRENCH x4, QUAD x3) — each shipping-method field opts in via
49
+ `optionGates: [EXPEDITED_SHIPPING_GATE]`. `COMPASS/ENGLISH/ADMIN/CARTPAGE.ts` intentionally
50
+ omits it (and its now-unused import).
45
51
  - `src/pages/Cart/view/cartForm/CartForm.tsx` — filters `shippingMethodOptions` through the
46
52
  gates (reactive on `cartData.cartBundles`) before the select renders; resolves the shipping
47
53
  field via `findShippingMethodField`; uses `SHIPPING_OPTION_LABEL_SEPARATOR` for the
@@ -103,6 +109,14 @@ behavior is expressed in config, not in code branches.
103
109
  on that doc's slice-2 work-list.
104
110
 
105
111
  ## Change history
112
+ - 2026-08-19 — **Compass USA ADMIN role opted out of the expedited gate.** Removed
113
+ `optionGates: [EXPEDITED_SHIPPING_GATE]` (and the now-unused import) from
114
+ `COMPASS/ENGLISH/ADMIN/CARTPAGE.ts`, so admins always see Standard Ground + Next Day Air +
115
+ 2nd Day EOB in both regular commerce mode **and** edit-order mode. Because configs are per
116
+ role, dropping the gate on the ADMIN config alone is the scoped customization — no
117
+ shared-logic or client-branching change. Side effect: in edit-order mode an existing order's
118
+ expedited selection is no longer hidden/reset to Standard Ground for admins.
119
+ USER/MANAGER/SUPERUSER still gate expedited behind a computer kit. (apeterson)
106
120
  - 2026-08-19 — No change to expedited visibility. Noted that the shared shipping-rule type
107
121
  gained an optional `requireNoOtherItemsInKit` flag (+ `bundleHasOtherItems()` helper) used by
108
122
  the separate Standard Ground cost waiver — see
@@ -51,9 +51,18 @@ four Compass USA role configs (USER/ADMIN/MANAGER/SUPERUSER).
51
51
  4. When the selected method qualifies, the effect in `CartPage` waives its `c_cost` to 0 before
52
52
  writing `salesOrder.shipping`.
53
53
 
54
- Resulting Compass USA behavior: bare computer kit (primary computer only) → Standard Ground
55
- free; computer kit **with** other items → charged $10; all non-computer kits → charged;
56
- expedited methods unchanged (still priced).
54
+ Resulting Compass USA behavior (full truth table, confirmed complete — no further code change):
55
+ - **Solo computer kit on Standard Ground** → **$0** (waived; the freight is covered by the
56
+ `LT-FREIGHT` fee). "Solo" is scoped to the **kit** (`bundleProgressContents` has no non-primary
57
+ items), not the whole order.
58
+ - **Computer kit WITH other items in the kit, or any non-computer kit** → charged Standard
59
+ Ground **$10** (not waived).
60
+ - **Expedited (Next Day Air / 2nd Day EOB) + computers** → charged the method's `c_cost`
61
+ (2nd Day **$50**, Next Day **$100**), **never waived**.
62
+
63
+ All dollar amounts live in **`ShippingMethods.c_cost` in the Compass USA client DB** (developer
64
+ confirmed correct), **not** in frontend code — the waiver logic only zeroes a `c_cost`, it never
65
+ sets a price.
57
66
 
58
67
  ## Gotchas
59
68
  - **The waiver only means what the flag says.** Before this fix the gate had no
@@ -68,6 +77,12 @@ expedited methods unchanged (still priced).
68
77
  a computer kit mis-categorized in the catalog will neither waive nor gate.
69
78
 
70
79
  ## Change history
80
+ - 2026-08-19 — Confirmed the Compass USA shipping-charge truth table is fully satisfied by the
81
+ existing logic (no code change): solo computer kit on Standard Ground → $0 (waived, covered by
82
+ `LT-FREIGHT`); kit with other items or any non-computer kit → $10; expedited + computers →
83
+ method `c_cost` (2nd Day $50 / Next Day $100), never waived. Documented that all dollar amounts
84
+ live in `ShippingMethods.c_cost` in the Compass USA client DB, not in frontend code, and that
85
+ "solo computer" is scoped to the kit not the order. (apeterson)
71
86
  - 2026-08-19 — Fixed an over-broad Standard Ground waiver for Compass USA computer-kit carts:
72
87
  added the optional `requireNoOtherItemsInKit` flag on `PrimaryItemShippingRule` and the
73
88
  `bundleHasOtherItems()` helper, and set the flag on
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.616",
3
+ "version": "1.0.617",
4
4
  "description": "TOGA Technology Team Claude Knowledge System — shared AI coding harness with skills, knowledge base CLI, and project installer for Claude Code.",
5
5
  "keywords": [
6
6
  "claude",