toga-ai 1.0.341 → 1.0.343

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.
@@ -6,8 +6,8 @@ project: API
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-06-30
10
- owners: [jcardinal]
9
+ updated: 2026-07-15
10
+ owners: [jcardinal, apeterson]
11
11
  files:
12
12
  - api2/Component/Api/V2/V2.php
13
13
  - _underscore/Model/Core/Surface.php
@@ -61,7 +61,27 @@ traffic), behavior is **byte-for-byte unchanged** — pure data, zero extra work
61
61
  `Client.AclRecordScripts` dispatch grant — it 403'd EZ-1 on dev-sandbox until granted, exactly like
62
62
  `meta` did. See [surface-resolver](../../_underscore/features/surface-resolver.md).
63
63
 
64
+ - **The tell that it's the dispatch-grant gate (not record-level READ) failing: the 403 EZ-1
65
+ response carries `identifiers.script` set to the script route** (e.g. `"meta"`). If you see
66
+ `identifiers.script`, chase `AclRecordScripts`, not `AclRecordPermissions`.
67
+ - **Which roles the dispatch check reads depends on the record's `aclDatabase`.** The `surfaces`
68
+ Record has `aclDatabase = CORE`, so `getRecordScriptPhpMethod` matches the caller's **CORE** roles
69
+ (`Core.Roles`: 1=Public, 2=Integrations, 3=Super User, 4=Base) against the `AclRecordScripts` rows —
70
+ even though those rows physically live in each **client** DB. The public login surface authenticates
71
+ as CORE Public(1). (⚠ This corrects the earlier "keyed on client roles" note in
72
+ [surface-resolver](../../_underscore/features/surface-resolver.md) — the two disagree; confirm
73
+ against `V2.php getRecordScriptPhpMethod` before relying on either.)
74
+ - **Seed the dispatch grants in EVERY client DB.** Grant pattern: `meta` + `meta-group` →
75
+ Public(1)/Super User(3)/Base(4); `debug` → Super User(3) only. A client DB missing the grant 403s
76
+ that tenant even though the code and Core metadata are identical — new/pre-existing client DBs
77
+ silently lack it.
78
+
64
79
  ## Change history
80
+ - 2026-07-15 — Documented the diagnostic tell (`identifiers.script` present on the 403 EZ-1 → it is
81
+ the `AclRecordScripts` dispatch gate, not record READ); clarified the dispatch check reads the
82
+ caller's **CORE** roles because `surfaces.aclDatabase = CORE` (contradicts the earlier "client
83
+ roles" note — flagged for reconciliation); and that the per-role grants (`meta`/`meta-group` →
84
+ 1/3/4, `debug` → 3 only) must be seeded in every client DB. (apeterson)
65
85
  - 2026-06-30 — Noted the grouped `meta-group` endpoint (batched multi-slug resolve) and that it needs
66
86
  its own per-role `AclRecordScripts` dispatch grant (403 EZ-1 until granted). (jcardinal)
67
87
  - 2026-06-29 — Documented the second ACL layer: scripted-API dispatch is authorized via
@@ -3,5 +3,5 @@
3
3
  | Doc | Summary | Files |
4
4
  |-----|---------|-------|
5
5
  | [TOGa Supply (toga2-supply) Architecture](architecture.md) | `toga2-supply` is the **React + Vite frontend** for TOGa Supply — warehouse fulfillment tooling (shipment selection, fulfill & ship against carrier APIs, NetSui | toga2-supply/src/api/toga.ts, toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx |
6
- | [Fulfill & Ship](features/fulfill-and-ship.md) | Fulfill & Ship lets a warehouse user select sales-order line items, enter serials, pick a carrier/method, and in one action: create the Item Fulfillment records | toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/pages/EditShipment/view/components/SelectedShipmentItemsTable.tsx, toga2-supply/src/pages/EditShipment/view/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/src/pages/EditShipment/viewModel/FIELDS/DUMMYUPDATESHIPMENTFIELDS.json, toga2-supply/src/pages/EditShipment/view/modals/ReturnShippingModal.tsx, toga2-supply/src/components/ui/BaseInput/BaseInput.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/formatShipmentData.ts, toga2-supply/src/pages/EditShipment/types.ts, toga2-supply/src/pages/Shipments/view/ShipmentsPage.tsx, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx, toga2-supply/src/pages/Shipments/api/ShipmentsApi.ts, toga2-supply/src/pages/Shipments/types.ts, toga2-supply/src/pages/FulfilledShipments/view/FulfilledShipmentsPage.tsx, toga2-supply/src/components/ui/CardTable/CardTable.tsx, toga2-supply/src/components/ui/CardTable/types.ts, toga2-supply/src/assets/pen-line.svg, _underscore/Model/Client/ItemFulfillment.php, _underscore/Trait/Netsuite/ItemFulfillment.php, _underscore/Component/Library/Carriers/Ups/Ups.php |
6
+ | [Fulfill & Ship](features/fulfill-and-ship.md) | Fulfill & Ship lets a warehouse user select sales-order line items, enter serials, pick a carrier/method, and in one action: create the Item Fulfillment records | toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx, toga2-supply/src/pages/EditShipment/view/EditShipmentPage.tsx, toga2-supply/src/pages/EditShipment/view/components/forms/EditShipmentForm.tsx, toga2-supply/src/pages/EditShipment/view/components/SelectedShipmentItemsTable.tsx, toga2-supply/src/pages/EditShipment/view/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/src/pages/EditShipment/viewModel/FIELDS/DUMMYUPDATESHIPMENTFIELDS.json, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx, toga2-supply/tailwind.config.cjs, toga2-supply/src/pages/EditShipment/view/modals/ReturnShippingModal.tsx, toga2-supply/src/components/ui/BaseInput/BaseInput.tsx, toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts, toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/formatShipmentData.ts, toga2-supply/src/pages/EditShipment/types.ts, toga2-supply/src/pages/Shipments/view/ShipmentsPage.tsx, toga2-supply/src/pages/Shipments/view/components/ShipmentsCardTableForm/ShipmentsCardTableForm.tsx, toga2-supply/src/pages/Shipments/api/ShipmentsApi.ts, toga2-supply/src/pages/Shipments/types.ts, toga2-supply/src/pages/FulfilledShipments/view/FulfilledShipmentsPage.tsx, toga2-supply/src/components/ui/CardTable/CardTable.tsx, toga2-supply/src/components/ui/CardTable/types.ts, toga2-supply/src/assets/pen-line.svg, _underscore/Model/Client/ItemFulfillment.php, _underscore/Trait/Netsuite/ItemFulfillment.php, _underscore/Component/Library/Carriers/Ups/Ups.php |
7
7
  | [AWS Amplify Build & Deploy (non-prod environments)](workflows/amplify-build-and-deploy.md) | How `toga2-supply` (React + Vite) builds and deploys on **AWS Amplify**. | toga2-supply/amplify.yml, toga2-supply/.gitattributes, toga2-supply/.github/workflows/sync-stage-environments.yml, toga2-supply/.env.qc-security |
@@ -6,7 +6,7 @@ project: TOGa Supply
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-07-14
9
+ updated: 2026-07-15
10
10
  owners: [mhammontree]
11
11
  files:
12
12
  - toga2-supply/src/pages/ShipmentItems/view/ShipmentItemsPage.tsx
@@ -15,6 +15,8 @@ files:
15
15
  - toga2-supply/src/pages/EditShipment/view/components/SelectedShipmentItemsTable.tsx
16
16
  - toga2-supply/src/pages/EditShipment/view/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx
17
17
  - toga2-supply/src/pages/EditShipment/viewModel/FIELDS/DUMMYUPDATESHIPMENTFIELDS.json
18
+ - toga2-supply/src/pages/EditShipment/helpers/ShipmentDetailsForm/renderEditShipmentFormInput.tsx
19
+ - toga2-supply/tailwind.config.cjs
18
20
  - toga2-supply/src/pages/EditShipment/view/modals/ReturnShippingModal.tsx
19
21
  - toga2-supply/src/components/ui/BaseInput/BaseInput.tsx
20
22
  - toga2-supply/src/pages/EditShipment/api/UpdateShipmentApi.ts
@@ -102,6 +104,19 @@ layout, labels, required-ness, or ordering, edit the **config JSON**, not the co
102
104
  **Every react-select field's form value is the whole option OBJECT `{uuid, name}`, never a
103
105
  bare string** — see the gotcha below before wiring a new select field.
104
106
 
107
+ - **Renderer extension points (how to add a non-BaseInput control).** `renderEditShipmentFormInput.tsx`
108
+ special-cases fields by boolean flags on the JSON field object (existing: `isClearAll`, `isReadOnly`;
109
+ added `isUnitSelector` = a native in./cm `<select>`, mirroring the Return Shipping modal — visual-only,
110
+ not persisted). **Reuse pattern for any custom control: add a flag to the JSON field + a branch in the
111
+ renderer** rather than forcing it through `BaseInput`. A per-section `sectionTitleContainerClasses` is
112
+ also read by `EditShipmentForm.tsx`'s shared section-title wrapper (default unchanged) so a section can
113
+ e.g. right-align its title (used to right-align the Item Count column's title + value to a shared edge).
114
+ - **⚠ A custom/non-data field MUST set `valueKey: ""`.** Before rendering, `EditShipmentForm.tsx` runs
115
+ **every** field through `getValueFromPath(data, field.valueKey)`, which does `valueKey.split(".")` with
116
+ **no guard** — a field with no `valueKey` **white-screens the whole form** (`Cannot read properties of
117
+ undefined (reading 'split')`). Set `valueKey: ""` (same convention Clear All / Address already use) for
118
+ any field not bound to data.
119
+
105
120
  - **Create vs Edit are distinct entry points (decision — kept, not merged).** Select Items →
106
121
  Next = create a **New Shipment**; the pending-shipments pencil = **edit** an existing draft.
107
122
  They are deliberately NOT merged and there is no auto-load from Select Items, because a Sales
@@ -180,6 +195,19 @@ the call 403s and returns no label.
180
195
 
181
196
  ## Gotchas / known issues
182
197
 
198
+ - **⚠ Tailwind does NOT scan the field-config JSON — a class used ONLY in `viewModel/FIELDS/*.json`
199
+ is silently inert.** The config-driven forms author Tailwind utility classes inside the field JSON
200
+ (e.g. `DUMMYUPDATESHIPMENTFIELDS.json`), but `tailwind.config.cjs` `content` globs only scan
201
+ `./src/**/*.{js,ts,jsx,tsx}` (+ `index.html` + toga-blox dist) — **not `.json`**. So a class used
202
+ *only* in the JSON never has its CSS rule generated: it appears in the DOM `className` but does
203
+ nothing. Common classes (`gap-1`, `w-4`, `w-full`) happen to also appear in `.tsx` so they compile;
204
+ unusual JSON-only classes do not. *Concrete failure:* `!w-fit` (keep the "Needs a return label"
205
+ checkbox content-width so the Edit link stays beside it) was JSON-only → never generated → `w-full`
206
+ won → the checkbox stretched with the column and the Edit gap grew on wide screens (col1 is `w-56`
207
+ above 1893px, `w-150px` below), fine only when narrow. **Fix applied (surgical):** added
208
+ `safelist: ["!w-fit"]` to `tailwind.config.cjs`. **Recommended clean fix (NOT yet done):** add the
209
+ FIELDS JSON to the `content` globs (e.g. `"./src/**/FIELDS/*.json"`) and re-test all config-driven
210
+ forms, since any JSON-only class is otherwise inert.
183
211
  - **UPS test endpoint** (`wwwcie.ups.com`, debug mode) returns a constant tracking
184
212
  number `1ZXXXXXXXXXXXXXXXX` + SAMPLE labels. On 2nd+ test runs this collides with the
185
213
  `TrackingNumbers.number` UNIQUE index (surfaces mislabeled as "Labelary API error")
@@ -345,6 +373,15 @@ not the base `_Model_Client_ItemFulfillment`. Tested with GroWrk; UPS support wa
345
373
  for Compass and is not yet in prod.
346
374
 
347
375
  ## Change history
376
+ - 2026-07-15 — TRUE-79191 (Figma-alignment polish pass): documented two durable items on the
377
+ config-driven form — (1) **Tailwind does not scan `viewModel/FIELDS/*.json`**, so a JSON-only utility
378
+ class is silently inert (`!w-fit` footgun; surgical `safelist` fix, recommended clean fix = add the
379
+ JSON to `content` globs); (2) **renderer extension points** — the `isUnitSelector` custom-control
380
+ branch + the flag-in-JSON/branch-in-renderer pattern, per-section `sectionTitleContainerClasses`, and
381
+ the **`valueKey: ""` requirement** for any custom/non-data field (empty/absent `valueKey` white-screens
382
+ the form via `getValueFromPath`'s unguarded `.split`). Remaining Figma tweaks (Dimensions in./cm
383
+ dropdown + gaps, Item Count right-align, return-label row gaps, shipment-card indicator top gap) were
384
+ cosmetic — no doc change. (mhammontree)
348
385
  - 2026-07-14 — TRUE-79191 (commit `724d17c1a`): fixed **Signature Type** not saving/rehydrating —
349
386
  documented the reusable **whole-object react-select** convention (`{uuid,name}`; map on `.uuid`,
350
387
  rehydrate the object) as a gotcha; the string comparison `data.signatureType === "Required"`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.341",
3
+ "version": "1.0.343",
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",