toga-ai 1.0.607 → 1.0.608

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.
@@ -0,0 +1,61 @@
1
+ ---
2
+ type: session
3
+ slug: table-cell-actions-surface
4
+ title: Table cell/row actions — settle surface-layer design
5
+ author: apeterson
6
+ repos: [dbchanges2, api2, toga25-supply]
7
+ framework: "2.0"
8
+ client: elite
9
+ status: active
10
+ created: 2026-08-18
11
+ updated: 2026-08-18
12
+ ---
13
+
14
+ # Session: table-cell-actions-surface
15
+ **Date:** 2026-08-18
16
+ **Project/Repo:** dbchanges2 / api2 / toga25-supply (2.0)
17
+ **Task:** Recover the settled design for moving table cell/row actions (e.g. Elite's "See units" chevron) into the surface layer so per-client visibility (Elite off, NYCHH on) is a surface override — and clean up the stale first-attempt migration.
18
+
19
+ ---
20
+
21
+ ## What WORKED
22
+ - Located the original design conversation: **api2 session `e761c825-6073-40fc-ab0f-a984bca7f770`** (Aug 13, 2026, `surface-layer` branch). Transcript at `~/.claude/projects/-Applications-XAMPP-xamppfiles-htdocs-api2/e761c825-6073-40fc-ab0f-a984bca7f770.jsonl` (1076 lines, 3.2MB).
23
+ - Extracted the full plan/decision text verbatim via a general-purpose subagent (raw dump saved at `scratchpad/dump.txt` in the api2 session scratchpad). The settled design is captured in this session's Decisions section.
24
+ - Confirmed current on-disk SQL state in `dbchanges2`: **no Phase 1/Phase 3 SQL for the final plan exists yet**; grep for `ROW_ACTIONS` only hit unrelated Core seeds (SalesOrder login surface, PO details row-action menu item 2026-08-18a).
25
+ - **Deleted the stale migration** `dbchanges2/Client_Elite/2026-08-14a - InventoryUnitsByItemsRemoveUnitsDrill.sql` (the rejected drop-the-grouping-level approach). Shows as staged deletion (`D`) in git — NOT yet committed.
26
+
27
+ ## What did NOT work — DO NOT RETRY THESE
28
+ These are the mechanisms explicitly rejected in the e761c825 design thread. Do not re-propose them:
29
+ - **Dropping the `inventory_units` grouping level** from Elite's `unitsByItems` CONFIG override (the shipped `2026-08-14a` migration). Reason: destroys the nested-table definition instead of just hiding the button; wrong mechanism. This file was deleted this session.
30
+ - **Per-field `is*` boolean flags** (`isNestedTableEnabled`, `isRowActionEnabled`, `isCellActionEnabled`) on `TableViews`. Reason: wrong grain — a drill/action is not a field capability like isSortable; and it would duplicate the existing `childTableViewId`.
31
+ - **A new dedicated binding table** (`TableViewCellActions` / `TableViewFieldActions`). Reason: label/icon/style/visibility/ACL/per-client overrides is *the surface layer's entire job* — a parallel table duplicates `SurfaceElements` + `SurfaceOverrides`.
32
+ - **Table-meta `actions[]` array with numeric `surfaceElementId` pointers** (the `surfaceElementId: 412` sketch). Reason: superseded once the schema explore found `Surface.type=ROW_ACTIONS` + `Surface.tableViewId` + `SurfaceElement.recordFieldId`/`actionId` already bind everything natively. Also numeric id is wrong key — emitted element key is the `uuid`.
33
+
34
+ ## Not tried yet (candidates for next session)
35
+ - **Phase 1 SQL** — seed a `ROW_ACTIONS` surface for `inventory_units` (`Core.Surfaces` `type=ROW_ACTIONS`, `tableViewId=<inventory_units view>`) + a "See units" BUTTON `SurfaceElement` (labelMessageId, `iconToken=chevronsRight`, an `actionId` for a nested-table action, anchored to its column).
36
+ - **Phase 2 FE** — cell-action renderer in `toga25-supply`/`toga-blox`: fetch the table's `ROW_ACTIONS` surface, render each element as a cell action, wire behavior via `actionRegistry` (add nested-table/route/modal handlers), replace hardcoded `makeSeeUnitsColumns`. Injection point: `useGenericTableViewModel.tsx:36-63` meta memo → `actionColumns`.
37
+ - **Phase 3 Elite** — one `SurfaceOverride` row `isVisible=0` on the "See units" element for Elite.
38
+ - **CTO second opinion** — recommended in the original thread, never run.
39
+ - **Verify whether deleted `2026-08-14a` was already applied to sandbox** — if so, DB state still has the drill dropped; may need the Phase work (or an interim revert) to restore.
40
+
41
+ ## Current file state
42
+ | File | Status | Notes |
43
+ |------|--------|-------|
44
+ | `dbchanges2/Client_Elite/2026-08-14a - InventoryUnitsByItemsRemoveUnitsDrill.sql` | Deleted (staged, uncommitted) | Rejected drop-the-grouping-level approach; removed per final design |
45
+ | `scratchpad/dump.txt` (api2 session scratchpad) | Created | Raw verbatim extraction of the e761c825 design thread |
46
+
47
+ ## Decisions made
48
+ - **Surface layer owns cell/row actions** — not a new table, not FE hardcoding. The button (label, icon, style, visibility, enablement, ACL, per-client/role/persona overrides) is a `SurfaceElement` on a `type=ROW_ACTIONS` Surface linked to the table via `Surface.tableViewId`. Rationale: the surface layer already models all of this; a parallel mechanism duplicates it. Vindicates the original "this is surface-layer" instinct — only earlier mechanisms were wrong.
49
+ - **Grain rule:** table-level toggles → table block; per-cell action presentation → surface element bound to a field (`recordFieldId`/`customRecordFieldId`). Cell action (chevron) and row action (row-click → modal) are conceptually independent (today wrongly coupled at `GenericNestedTables.tsx:37-42`).
50
+ - **Elite vs NYCHH gating** = one `SurfaceOverride` `isVisible=0` on the "See units" element scoped to Elite; element stays visible for NYCHH/others on the same shared table.
51
+ - **Cross-DB binding** (Core surface ↔ Client table view) uses **soft integer FKs** — framework FK traversal can't cross Core↔Client. Stable FE-facing key is the SurfaceElement **uuid**, not numeric id. CONFIG override REPLACES (does not merge).
52
+ - **Two open questions to settle before seeding:** (1) how FE finds a table's ROW_ACTIONS surface — lean **slug convention** `<tableViewSlug>-row-actions` over `tableViewId` query; (2) how element anchors to a column — lean **column-slug in element `config`** over `recordFieldId`.
53
+
54
+ ## Blockers
55
+ - None hard. Soft: the two open questions above should be settled before writing Phase 1 SQL; and confirm whether `2026-08-14a` was already applied to sandbox before assuming Elite DB is clean.
56
+
57
+ ## Exact next step
58
+ > Settle the two open questions (slug-convention lookup + column-slug-in-config anchor), then write **Phase 1 SQL**: a `Core/` migration seeding the `inventory_units` `ROW_ACTIONS` surface + "See units" BUTTON `SurfaceElement`. Check first whether deleted `2026-08-14a` was applied to sandbox.
59
+
60
+ ---
61
+ _Saved by /session-save on 2026-08-18_
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.607",
3
+ "version": "1.0.608",
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",