toga-ai 1.0.737 → 1.0.738

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.
@@ -10,7 +10,7 @@
10
10
  | [Cart Page — config-driven form architecture (current state + planned refactor)](features/cart-page-config-architecture.md) | The Cart page (`src/pages/Cart/`) is the most config-heavy page in `toga2-commerce`. | src/pages/Cart/CartPage.tsx, src/pages/Cart/view/cartForm/CartForm.tsx, src/pages/Cart/view/cartForm/CartFormSection.tsx, src/pages/Cart/view/cartForm/CartFormRenderer.tsx, src/pages/Cart/view/EditCart.tsx, src/pages/Cart/view/EditOrder.tsx, src/pages/Cart/viewModel/useEditOrderOrEditCartViewModel.ts, src/pages/Cart/viewModel/FIELDS/*/*/*/CARTPAGE.ts, src/hooks/useAssignClientFields.ts |
11
11
  | [Catalog cache freshness — the 24h persisted query cache, and how to opt a query out of it](features/catalog-cache-freshness.md) | TOGa Commerce runs a **single `QueryClient` with a 24-hour default `staleTime`**, and persists it to **`localStorage["commerce"]`** through `PersistQueryClientP | toga2-commerce/src/App.tsx, toga2-commerce/src/contexts/AuthContext.tsx, toga2-commerce/src/pages/ItemsView/viewModel/useItemDetailsViewModel.ts |
12
12
  | [Category Tile Order (AssortmentItems.sortOrder) — merchandising a storefront category](features/category-tile-sort-order.md) | **"Move item X to the front of category Y" is a DATA change, not a code change.** The order of item tiles on a storefront category page is driven by exactly one | src/pages/Filter/api/FilterApi.ts, src/pages/Filter/viewModel/useFilterViewModel.ts, api2/Component/Api/V2/V2.php, toga2-supply/src/pages/Items/api/itemsApi.ts |
13
- | [Client Fields — per-tenant / language / role content & config](features/client-fields.md) | Almost no user-facing text, field layout, or page config is hard-coded in `toga2-commerce`. | src/pages/Account/view/MySettingsView.tsx, src/contexts/helpers/getLoginSettings.ts, src/pages/Account/viewModel/useAccountViewModel.ts, src/fieldsConfig/index.ts, src/fieldsConfig/getClientLoginFields.ts, src/fieldsConfig/clientFields/COMPASS.json, src/fieldsConfig/clientFields/COMPASSCANADA.json, src/fieldsConfig/clientFields/QUAD.json, src/pages/Cart/api/CartApi.ts, src/hooks/useAuthenticationFlow.ts, src/contexts/AuthContext.tsx, src/pages/Login/viewModel/useLoginPageViewModel.ts, src/hooks/useAssignClientFields.ts, src/hooks/useDynamicConditionalFieldOptions.ts, src/stores/useFieldsStore.ts, src/components/BaseDetailField/BaseDetailField.tsx, src/components/NavIcons/NavIconItem.tsx, src/components/Submenus/AlertSubmenu.tsx, src/components/Submenus/types.ts, src/pages/Account/AccountPage.tsx, src/pages/Account/view/MyOrdersView.tsx, src/pages/GetSupport/GetSupportPage.tsx, src/pages/GetSupport/viewModel/useGetSupportViewModel.ts, src/queries/queries.ts, src/App.tsx, src/pages/Filter/FilterPage.tsx, src/pages/Filter/viewModel/FIELDS/COMPASS/ENGLISH/USER/FILTERPAGEFIELDS.json |
13
+ | [Client Fields — per-tenant / language / role content & config](features/client-fields.md) | Almost no user-facing text, field layout, or page config is hard-coded in `toga2-commerce`. | src/pages/Account/view/MySettingsView.tsx, src/contexts/helpers/getLoginSettings.ts, src/pages/Account/viewModel/useAccountViewModel.ts, src/fieldsConfig/index.ts, src/fieldsConfig/getClientLoginFields.ts, src/fieldsConfig/clientFields/COMPASS.json, src/fieldsConfig/clientFields/COMPASSCANADA.json, src/fieldsConfig/clientFields/QUAD.json, src/pages/Cart/api/CartApi.ts, src/hooks/useAuthenticationFlow.ts, src/contexts/AuthContext.tsx, src/pages/Login/viewModel/useLoginPageViewModel.ts, src/hooks/useAssignClientFields.ts, src/hooks/useDynamicConditionalFieldOptions.ts, src/stores/useFieldsStore.ts, src/components/BaseDetailField/BaseDetailField.tsx, src/components/NavIcons/NavIconItem.tsx, src/components/Submenus/AlertSubmenu.tsx, src/components/Submenus/types.ts, src/pages/Account/AccountPage.tsx, src/pages/Account/view/MyOrdersView.tsx, src/pages/GetSupport/GetSupportPage.tsx, src/pages/GetSupport/viewModel/useGetSupportViewModel.ts, src/queries/queries.ts, src/App.tsx, src/pages/Filter/FilterPage.tsx, src/pages/Filter/viewModel/FIELDS/COMPASS/ENGLISH/USER/FILTERPAGEFIELDS.json, src/pages/Home/viewModel/FIELDS/COMPASS/ENGLISH/USER/HEADERFIELDS.json, src/components/AuthLayout/AuthLayout.tsx |
14
14
  | [Config-Driven Expedited Shipping Gating (Cart)](features/expedited-shipping-gating.md) | On the toga2-commerce **Cart** page, expedited shipping options (**"2nd Day EOB"** and **"Next Day Air"**) are only offered in the *Shipping Method* dropdown wh | toga2-commerce/src/pages/Cart/helpers/shippingOptionGates.ts, toga2-commerce/src/pages/Cart/viewModel/FIELDS/shared/shippingOptionGates.ts, toga2-commerce/src/pages/Cart/view/cartForm/CartForm.tsx, toga2-commerce/src/pages/Cart/CartPage.tsx |
15
15
  | [Filter / Search-Results Page & the Two Search Entry Points](features/filter-search-results-page.md) | The storefront has **two distinct search entry points that render the same card component through completely different code paths and different FIELDS files**. | src/pages/Filter/FilterPage.tsx, src/pages/Filter/viewModel/useFilterViewModel.ts, src/pages/Filter/viewModel/FIELDS/COMPASS/ENGLISH/USER/FILTERPAGEFIELDS.json, src/pages/Filter/viewModel/FIELDS/COMPASSCANADA/FRENCH/USER/FILTERPAGEFIELDS.json, src/pages/Filter/viewModel/FIELDS/QUAD/ENGLISH/BUYER/FILTERPAGEFIELDS.json, src/components/Header/Header.tsx, src/pages/Home/view/components/BundlesSection.tsx, src/pages/Home/viewModel/FIELDS/COMPASS/ENGLISH/USER/HOMEPAGEFIELDS.json, src/components/Cards/BundleViewCard.tsx, src/utils/renderBadge.tsx, src/hooks/useAssignClientFields.ts |
16
16
  | [Inactive-item purchase gating (standalone lines only — kits are exempt by design)](features/inactive-item-purchase-gating.md) | An item with **`Items.isActive = 0`** must not be viewable, addable to a cart, or orderable **as a standalone line** on the storefront — but the **same flag is | toga2-commerce/src/utils/checkIsItemPurchasable.ts, toga2-commerce/src/api/fetchItemsActiveStatus.ts, toga2-commerce/src/hooks/useCartReconciliation.ts, toga2-commerce/src/stores/useCartStoreZu.ts, toga2-commerce/src/pages/ItemsView/api/ItemsApi.ts, toga2-commerce/src/pages/ItemsView/viewModel/useItemDetailsViewModel.ts, toga2-commerce/src/pages/ItemsView/ItemViewPage.tsx, toga2-commerce/src/components/AuthLayout/AuthLayout.tsx, toga2-commerce/src/pages/Cart/CartPage.tsx, toga2-commerce/src/pages/Cart/view/cartTable/CartTableBundleItem.tsx, toga2-commerce/src/api/syncSalesOrderFromApiToLocalStorage.ts, _underscore/Model/Compass/SalesOrder.php, dbchanges2/Client_Compass/2026-08-14a - AddSalesOrderInactiveStandaloneItemPreInterceptors.sql, dbchanges2/Client_CompassCanada/2026-08-14a - AddSalesOrderInactiveStandaloneItemPreInterceptors.sql |
@@ -6,7 +6,7 @@ project: TOGa Commerce
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-08-06
9
+ updated: 2026-09-02
10
10
  owners: ["apeterson", "tcox", "bala"]
11
11
  files:
12
12
  - src/pages/Account/view/MySettingsView.tsx
@@ -36,6 +36,8 @@ files:
36
36
  - src/App.tsx
37
37
  - src/pages/Filter/FilterPage.tsx
38
38
  - src/pages/Filter/viewModel/FIELDS/COMPASS/ENGLISH/USER/FILTERPAGEFIELDS.json
39
+ - src/pages/Home/viewModel/FIELDS/COMPASS/ENGLISH/USER/HEADERFIELDS.json
40
+ - src/components/AuthLayout/AuthLayout.tsx
39
41
  related:
40
42
  - 2.0/apps/toga2-commerce/architecture.md
41
43
  - 2.0/apps/toga2-commerce/features/multi-tenant-theming.md
@@ -217,6 +219,13 @@ and **not every page uses every dimension**:
217
219
  TermsConditions, ResetPassword (resolved at tenant/language level, shared across roles).
218
220
  - Language layer (`ENGLISH`/`FRENCH` folders) only exists for COMPASSCANADA; COMPASS and QUAD put
219
221
  files directly under the tenant (their registry language is `en`).
222
+ - **Global chrome copy lives under `Home`.** `HEADERFIELDS` / `FOOTERFIELDS` are read by
223
+ `src/components/AuthLayout/AuthLayout.tsx` (mounted on every authenticated route), but the JSON
224
+ sits at `src/pages/Home/viewModel/FIELDS/<TENANT>/[<LANGUAGE>/]<ROLE>/HEADERFIELDS.json`. There is
225
+ no Header page folder — grep for the key, don't look for one. The header also owns the two
226
+ full-width banners: `viewAsBanner` and **`editOrderBanner`** (`text.label`, `loadingText.label`,
227
+ `button.label`). Editing any one of these keys is a **15-file** change: COMPASS/ENGLISH × 4 roles,
228
+ COMPASSCANADA/{ENGLISH,FRENCH} × 4 roles, QUAD/ENGLISH × 3 roles.
220
229
 
221
230
  ## The resolver — `useAssignClientFields`
222
231
 
@@ -391,6 +400,13 @@ on switch.
391
400
  pages' JSON.** The kit badge is `bundleBadge` in `HOMEPAGEFIELDS` but `kitBadge` in
392
401
  `FILTERPAGEFIELDS`. Never assume a label added for one page covers another; grep the consuming
393
402
  component for the exact `fields?.<key>` it reads.
403
+ - **The edit-order banner's exit button throws the edits away — label it accordingly.** Its
404
+ `actionOnClick` is `cancelEditOrder()` in `AuthLayout.tsx`, which calls
405
+ `exitEditOrderModeGlobalSyncReset()` (drops the local edit state, saves nothing) and then
406
+ redirects to `getSupplyRedirectLink(orderUuid)`. Because that data loss is not obvious from the
407
+ banner, the copy reads **"Cancel (Return to Supply)"** (FR "Annuler (Retour aux
408
+ approvisionnements)") — changed 2026-09-02 from "Exit (…)" / "Quitter (…)". Copy-only; the
409
+ discard behavior was already correct, so do not "restore" the Exit wording.
394
410
  - **A stale persisted cache masks FIELDS deploys** — see the persisted-cache section above; verify
395
411
  copy changes after `localStorage.removeItem('commerce')` or a logout, never on a warm browser.
396
412
  - Role is derived from string `"1"` flags on the user (`user?._isAdmin === "1"`), not booleans.
@@ -410,6 +426,14 @@ on switch.
410
426
  slip. Do not "reconcile" the two lists.
411
427
 
412
428
  ## Change history
429
+ - 2026-09-02 — Recorded where **global chrome copy** lives: `HEADERFIELDS`/`FOOTERFIELDS` are
430
+ consumed by the always-mounted `AuthLayout.tsx` but stored under
431
+ `src/pages/Home/viewModel/FIELDS/...`, and the header owns the `viewAsBanner` /
432
+ `editOrderBanner` keys — one banner key = **15 files** (COMPASS 4 + COMPASSCANADA 8 + QUAD 3).
433
+ Added the edit-order banner gotcha: its button runs `cancelEditOrder()` →
434
+ `exitEditOrderModeGlobalSyncReset()`, which discards unsaved order edits before redirecting to
435
+ Supply, so the label was changed from "Exit (Return to Supply)" to **"Cancel (Return to
436
+ Supply)"** (FR "Annuler (Retour aux approvisionnements)") — copy-only, no code change. (tcox)
413
437
  - 2026-08-06 — Added a **Login-settings branches** section for `getLoginSettings.ts`: branch 1 is
414
438
  gated by `languageSwitcher.isEnabled` and is therefore **unreachable for COMPASS/QUAD**, and within
415
439
  Canada only **69 of 4,655** active users have a stored language, so ~98% take the "no saved
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.737",
3
+ "version": "1.0.738",
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",