toga-ai 1.0.841 → 1.0.842

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,7 +6,7 @@ project: _Underscore
6
6
  client: shared
7
7
  type: feature
8
8
  status: active
9
- updated: 2026-09-16
9
+ updated: 2026-09-18
10
10
  owners: [apeterson]
11
11
  files:
12
12
  - _underscore/Model/Client/TableView.php
@@ -61,7 +61,8 @@ It is a **no-op for every existing column**: nothing else declares a `<field>Fil
61
61
  `_Model_Compass_SalesOrder::_assignedAdminFilterOptions(): ?array` runs a raw `_Query` on
62
62
  `_underscore::DB_CLIENT` joining `Users` / `Users_Roles` / `Roles`, filtered
63
63
  `Users.isActive = 1 AND Roles.name = ROLE_NAME__ADMIN` (`'Admin'`), and returns
64
- `[{slug, name}]` where **both** are `CONCAT(firstName, ' ', lastName)`.
64
+ `[{slug, name}]` where **both** are `CONCAT(firstName, ' ', lastName)`. Single-database query
65
+ (`Client_Compass` only) — no cluster-isolation concern.
65
66
 
66
67
  - **The value must be the NAME, not a uuid.** `_assignedAdmin()` is a correlated subquery that
67
68
  resolves to the assignee's `CONCAT(firstName, ' ', lastName)`, so the filter compares against that
@@ -71,6 +72,24 @@ It is a **no-op for every existing column**: nothing else declares a `<field>Fil
71
72
  - Verified locally: 13 options for `Client_Compass`, 5 for `Client_CompassCanada`. Compass Canada
72
73
  also has a role `Agilant - Administrators`, correctly excluded by the exact `name = 'Admin'` match.
73
74
 
75
+ **Internal TOGA staff are excluded (2026-09-18).** Admin-role holders on `@togatech.com`
76
+ (Dev Team, internal employees) were showing up as assignable to Compass users. Added
77
+ `const INTERNAL_EMAIL_DOMAIN = 'togatech.com'` plus a WHERE condition. The condition is
78
+ **NULL-safe on purpose**:
79
+
80
+ ```sql
81
+ (Users.email IS NULL OR Users.email NOT LIKE '%@togatech.com')
82
+ ```
83
+
84
+ A bare `NOT LIKE` yields NULL for a NULL email and would silently drop those admins.
85
+
86
+ Two alternatives were considered and rejected:
87
+ 1. Removing the `Admin` role from those users in `Users_Roles` — the team will not strip admin
88
+ roles from real accounts.
89
+ 2. A `c_isHiddenFromAdminFilter` custom column on `Client_Compass.Users` (the `c_isVip`
90
+ precedent), making a hide a plain UPDATE with no deploy. Rejected for the simpler hardcoded
91
+ domain rule — but this is the natural next step if per-user control is ever needed.
92
+
74
93
  ### Why a model static and not a config column
75
94
 
76
95
  A CTO review compared this against adding a `TableViewFields` column holding a query descriptor
@@ -97,6 +116,9 @@ generic version at roughly **4–5** such columns, driven by real examples.
97
116
  `customRecordFieldId` 57. Both custom fields are `field = '_assignedAdmin'`, `type = 'STRING'`,
98
117
  `recordId = 14`. Both classes expose `->field` and `->type` identically, so field-name-keyed logic
99
118
  works either way — just do not assume a Core RecordField.
119
+ - **The dropdown is backend-driven — do not look in toga25-supply.** The front end only renders
120
+ what `_assignedAdminFilterOptions()` returns. Any change to which admins appear goes in
121
+ `_underscore/Model/Compass/SalesOrder.php`.
100
122
  - **Key on the FIELD name, not the column slug.** The slug is `assigned-admin` (hyphen); the model
101
123
  field is `_assignedAdmin`. The seam uses the field name.
102
124
  - **Type `STRING` (not STATUS/SELECT) is what lets the branch fire** — the existing `switch` in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.841",
3
+ "version": "1.0.842",
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",