toga-ai 1.0.627 → 1.0.628

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,4 +10,5 @@
10
10
  | [Primary Table templates (server/client, sizing, virtualization)](features/primary-table-templates.md) | `src/templates/PrimaryTable/` is the **production, wired-up table** built on the [Table component](table.md). | toga-blox/src/templates/PrimaryTable/PrimaryTable.tsx, toga-blox/src/templates/PrimaryTable/PrimaryTableServerTemplate.tsx, toga-blox/src/templates/PrimaryTable/PrimaryTableClientTemplate.tsx, toga-blox/src/templates/PrimaryTable/PrimaryTableHeaderCell.tsx, toga-blox/src/templates/PrimaryTable/PrimaryTableBodyCell.tsx, toga-blox/src/templates/PrimaryTable/PrimaryTableRow.tsx, toga-blox/src/templates/PrimaryTable/PrimaryTableExpandableRow.tsx, toga-blox/src/templates/PrimaryTable/types.ts |
11
11
  | [TableRecordModal (record-detail modal shell)](features/table-record-modal.md) | `TableRecordModal` is a **generic, presentational modal shell** for showing a single table record (row) in detail — typically opened from a table row click. | toga-blox/src/components/TableRecordModal/TableRecordModal.tsx, toga-blox/src/components/TableRecordModal/index.ts, toga-blox/src/components/TableRecordModal/tableRecordModal.module.css |
12
12
  | [Table component (cells, action cells, filters & sorts, hooks, theming)](features/table.md) | The `Table` component (`src/components/Table/`) is the **TanStack Table v8** building block behind the [Primary Table templates](primary-table-templates.md). | toga-blox/src/components/Table/index.ts, toga-blox/src/components/Table/types.ts, toga-blox/src/components/Table/utils/buildTanstackColumns.tsx, toga-blox/src/components/Table/utils/resolveCellType.tsx, toga-blox/src/components/Table/components/cellTypes, toga-blox/src/components/Table/components/actionCells, toga-blox/src/components/Table/components/columnFiltersAndSorts, toga-blox/src/components/Table/hooks, toga-blox/src/components/Table/themeConfig |
13
+ | [Talos AI-Assistant Component (launcher + slide-out chat panel)](features/talos-assistant.md) | `Talos` is a **shared, pure-UI** AI-assistant component in `@agilant/toga-blox`: a header launcher button (`TalosLauncher`) plus a slide-out chat panel (`TalosP | toga-blox/src/components/Talos/TalosLauncher.tsx, toga-blox/src/components/Talos/TalosPanel.tsx, toga-blox/src/components/Talos/TalosMessage.tsx, toga-blox/src/components/Talos/types.ts, toga-blox/src/components/Talos/theme.ts, toga-blox/src/components/Talos/helpers.tsx, toga-blox/src/components/Talos/stub.ts, toga-blox/src/components/Talos/Talos.module.css, toga-blox/src/components/Talos/index.ts, toga-blox/src/components/index.ts |
13
14
  | [Dynamic npm Publish Pipeline (branch → channel)](workflows/dynamic-publish-pipeline.md) | How `@agilant/toga-blox` (checkout folder `toga-blox-npm`, registry repo key `toga-blox`) publishes a per-environment npm **channel** (dist-tag) from a `_<mode> | toga-blox/.github/workflows/publish.yml, toga-blox/package.json, toga-blox/src/utils/getFontAwesomeIcon.tsx |
@@ -0,0 +1,86 @@
1
+ ---
2
+ title: Talos AI-Assistant Component (launcher + slide-out chat panel)
3
+ framework: "2.0"
4
+ repo: toga-blox
5
+ project: TOGa Blox
6
+ client: shared
7
+ type: feature
8
+ status: active
9
+ updated: 2026-08-20
10
+ owners: [apeterson]
11
+ files:
12
+ - toga-blox/src/components/Talos/TalosLauncher.tsx
13
+ - toga-blox/src/components/Talos/TalosPanel.tsx
14
+ - toga-blox/src/components/Talos/TalosMessage.tsx
15
+ - toga-blox/src/components/Talos/types.ts
16
+ - toga-blox/src/components/Talos/theme.ts
17
+ - toga-blox/src/components/Talos/helpers.tsx
18
+ - toga-blox/src/components/Talos/stub.ts
19
+ - toga-blox/src/components/Talos/Talos.module.css
20
+ - toga-blox/src/components/Talos/index.ts
21
+ - toga-blox/src/components/index.ts
22
+ related:
23
+ - ../architecture.md
24
+ - ../workflows/dynamic-publish-pipeline.md
25
+ - ../../toga25-supply/features/talos-integration.md
26
+ ---
27
+
28
+ ## Summary
29
+
30
+ `Talos` is a **shared, pure-UI** AI-assistant component in `@agilant/toga-blox`: a header
31
+ launcher button (`TalosLauncher`) plus a slide-out chat panel (`TalosPanel`) with two
32
+ presentations — **docked** (resizable right rail) and **expanded** (centered modal + scrim).
33
+ Ported from a TOGa Desk prototype and intended for reuse across toga25-supply, toga2-desk,
34
+ and toga2-commerce. Build once, retheme per app. (TRUE-80692)
35
+
36
+ The defining constraint: the component holds **no business logic and no `window.*` globals** —
37
+ every side effect flows through an injected adapter, and every visual token is overridable.
38
+ The real chat backend is a **later ticket**; `onSend` currently ships stubbed.
39
+
40
+ ## Architecture (the four load-bearing decisions)
41
+
42
+ - **Pure UI + injected adapter.** All side effects go through an injected `TalosAdapter`:
43
+ `onSend(text) => Promise<TalosResponse>`, `onOpenRecord(id)`, `onAction(key)`,
44
+ `onDockWidthChange(px)`, `onAttach()`. The host owns everything. `createTalosStubAdapter()`
45
+ ships for backend-free/demo use (stubbed `onSend` this ticket).
46
+ - **Controlled state.** `open` / `expanded` / `width` are controlled props owned by the host
47
+ (`onOpenChange` / `onExpandedChange` / `onWidthChange`); the component never manages them
48
+ internally.
49
+ - **Fully tokenized styling.** Every color/font-size/weight/line-height/radius/shadow/dimension
50
+ is a `var(--talos-*, default)` custom property. `Talos.module.css` **is** the default theme
51
+ (the TOGa pink look). No forced Google-Fonts `@import` inside the shared component — the host
52
+ loads the font; default family is "Plus Jakarta Sans".
53
+ - **Theme override model.** A typed `TalosTheme` object (`theme.ts`) + `talosThemeToVars()`
54
+ converter is passed as an optional `theme` prop on `TalosLauncher`/`TalosPanel`; it emits
55
+ `--talos-*` inline overrides on the root elements. Unset keys fall through to defaults.
56
+ Because the CSS is all `var()` fallbacks, **any** `--talos-*` token is also overridable via
57
+ host CSS on an ancestor — not just the typed subset.
58
+
59
+ Reuses blox `BaseToolTip` + `getFontAwesomeIcon` (icon names are camelCase FA names).
60
+
61
+ ## Theming ceiling (known design boundary)
62
+
63
+ **Themeable today:** full palette, font, dock/expanded dimensions, launcher size, radii,
64
+ shadows, orbit/blob/gradient/scrim decoration, launcher icon image (via `branding.avatarSrc`),
65
+ and content props (suggestions / greeting / subtitle / placeholder / disclaimer / statusColors /
66
+ branding name+initials).
67
+
68
+ **NOT themeable yet:** internal **spacing/density** — ~38 padding/gap/margin values remain raw
69
+ literals, so apps can recolor and narrow the panel but cannot make it denser/compact (relevant
70
+ for a small TOGa Desk side chat). Genuinely different **layouts** (e.g. pill launcher vs icon
71
+ button, dropping expanded mode) are variants, not theme overrides.
72
+
73
+ **Proposed future work (NOT done):** a spacing-token pass and/or a `density` preset prop
74
+ (`"comfortable" | "compact"`), and possibly a launcher `variant` + optional panel-mode props.
75
+ Open questions were handed to the UX/UI team.
76
+
77
+ ## Gotchas
78
+
79
+ - The real chat backend is a later ticket — `onSend` is stubbed; do not assume live responses.
80
+ - blox `dist` is gitignored (shipped via publish, not the branch). Other consumers only get
81
+ Talos after blox is **published** per the `_sandbox-dev` dist-tag workflow — see
82
+ [Dynamic npm Publish Pipeline](../workflows/dynamic-publish-pipeline.md). toga25-supply
83
+ currently consumes it via a local symlink.
84
+
85
+ ## Change history
86
+ - 2026-08-20 — Built Talos shared AI-assistant component (launcher + docked/expanded chat panel): pure-UI + injected `TalosAdapter`, controlled open/expanded/width, fully `--talos-*` tokenized styling with typed `TalosTheme` overrides, stub adapter. Two adversarial review passes hardened it (removed a `window.dispatchEvent("resize")` side channel and a hardcoded initials literal; moved resize into an effect with cleanup + rAF throttle + keyboard `role="separator"`; SSR-safe portal guard; memoized message/handlers; restored the attach button + 11px card radius). Documented the spacing/density theming ceiling as future work (apeterson).
@@ -11,5 +11,6 @@
11
11
  | [Meta-Driven Page & Table Setup](features/meta-driven-table-data.md) | A page in this app is **meta-driven end to end**: the page view model fetches *page meta* (labels, sections, ACL) and *table meta* (the columns/fields + table s | toga25-supply/src/pages/SalesOrders/viewModel/useSalesOrdersPageViewModel.tsx, toga25-supply/src/pages/SalesOrders/hooks/useSalesOrdersTableState.ts, toga25-supply/src/hooks/useTablePageMeta.ts, toga-blox-npm/dist/hooks/useFetchPageMeta.d.ts, toga-blox-npm/dist/hooks/useFetchTablePageMeta.d.ts, toga-blox-npm/dist/hooks/useAssignTableFieldLabels.d.ts, toga-blox-npm/dist/components/Table/hooks/useTableData.d.ts |
12
12
  | [Record Modals & Nested Tables](features/record-modals-and-nested-tables.md) | The repo's family of modal + nested-table patterns layered over toga-blox `TableRecordModal` and `PrimaryTable*Layout`. | toga25-supply/src/layout/PrimaryTableServerLayout/PrimaryTableServerLayout.tsx, toga25-supply/src/layout/PrimaryTableServerLayout/types.ts, toga25-supply/src/layout/ItemRecordModalLayout/, toga25-supply/src/layout/SalesOrderRecordModalLayout/, toga25-supply/src/layout/SalesOrderItemsTableLayout/, toga25-supply/src/layout/ItemFulfillmentModal/, toga25-supply/src/layout/GenericNestedTables/GenericNestedTables.tsx, toga25-supply/src/layout/GenericNestedTables/GenericTableLayout.tsx, toga25-supply/src/pages/Inventory/viewModel/useInventoryPageViewModel.tsx, toga25-supply/src/pages/Inventory/viewModel/FIELDS/DEFAULT/inventoryGroupings.json, toga25-supply/src/hooks/useTableCellInteractions.ts, toga25-supply/src/hooks/useServerTableUrlState.ts, toga25-supply/src/layout/RecordApprovalModal/helpers/handleFormatApprovalWorkflowPayload.ts, toga25-supply/src/layout/RecordApprovalModal/api/approvalDecisionsApi.ts |
13
13
  | [Surface Frontend (DB-driven UI consumption, src/surface/)](features/surface-frontend.md) | The frontend consumer of the platform-wide Surface layer — DB-driven UI config fetched from `GET /v2/surfaces/meta?slug=<slug>` instead of statically-imported J | toga25-supply/src/surface/applyColSpan.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/sectionRenderers.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/getVisibleSections.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/layoutComponents/SalesOrderApprovalSummaryGrid.tsx, toga25-supply/src/surface/useFetchSurfaceMeta.ts, toga25-supply/src/pages/SalesOrders/helpers/surfaceBundleToTenantFields.ts, toga25-supply/src/pages/SalesOrders/helpers/buildPatchedTenantFields.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/viewModel/useSalesOrderRecordModalLayoutModel.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/SalesOrderView.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/layoutComponents/SalesOrderSummaryGrid.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/getDetailSections.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/SalesOrderNotesSection.tsx, toga25-supply/src/pages/SalesOrders/helpers/cleanOrder.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/AdminNotesSection.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/getAdminNotes.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/helpers/index.ts, toga25-supply/src/surface/evaluateSurfaceRule.ts, toga25-supply/src/surface/resolveElementState.ts, toga25-supply/src/pages/SalesOrders/helpers/evaluateEnableRule.ts, toga25-supply/src/pages/SalesOrders/hooks/useSalesOrderRowRecordState.ts, toga25-supply/src/surface/actionRegistry.ts, toga25-supply/src/surface/componentRegistry.tsx, toga25-supply/src/surface/SurfaceActionBar.tsx, toga25-supply/src/surface/SurfaceSection.tsx, toga25-supply/src/surface/resolve.ts, toga25-supply/src/surface/types.ts, toga25-supply/src/surface/index.ts, toga25-supply/src/pages/Login/LoginPage.tsx, toga25-supply/src/pages/SalesOrders/SalesOrders.tsx, toga25-supply/src/pages/SalesOrders/view/SurfaceRowActions.tsx, toga25-supply/src/pages/SalesOrders/hooks/useSalesOrderVip.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderRecordModalLayout/view/sections/SalesOrderTopBar.tsx, toga25-supply/src/pages/Items/ItemsPage.tsx, toga25-supply/src/pages/Items/viewModel/useItemsPageViewModel.tsx, toga25-supply/src/pages/VendorItems/VendorItemsPage.tsx, toga25-supply/src/pages/VendorItems/viewModel/useVendorItemsPageViewModel.tsx, toga25-supply/src/pages/Inventory/Inventory.tsx, toga25-supply/src/pages/Inventory/viewModel/useInventoryPageViewModel.tsx, toga25-supply/src/pages/Inventory/viewModel/FIELDS/index.ts, toga25-supply/src/fieldsConfig/index.ts, toga25-supply/src/layout/ItemRecordModalLayout/helpers/surfaceBundleToItemFields.ts, toga25-supply/src/layout/ItemRecordModalLayout/helpers/index.ts, toga25-supply/src/layout/ItemRecordModalLayout/viewModel/useItemRecordModalViewModel.tsx, toga25-supply/src/layout/ItemRecordModalLayout/ItemRecordModalLayout.tsx, toga25-supply/src/layout/ItemRecordModalLayout/components/ItemRecordView.tsx, toga25-supply/src/surface/useStatusColors.ts, toga25-supply/src/surface/SurfaceHeader.tsx, toga25-supply/src/pages/SalesOrders/view/SalesOrderApprovalModalsLayout/helpers/surfaceBundlesToDecisionFields.ts, toga25-supply/src/pages/SalesOrders/view/SalesOrderApprovalModalsLayout/viewModel/useApprovalModalViewModel.tsx |
14
+ | [Talos Integration (AppLayout host + adapter wiring)](features/talos-integration.md) | toga25-supply is the first host of the shared blox [Talos assistant](../../toga-blox/features/talos-assistant.md). | toga25-supply/src/layout/AppLayout/AppLayout.tsx, toga25-supply/src/components/Header/Header.tsx, toga25-supply/src/components/Header/Header.module.css, toga25-supply/src/index.css, toga25-supply/src/assets/talos-owl.png |
14
15
  | [AWS Amplify Multi-Environment Deployment](workflows/amplify-deployment.md) | How `toga25-supply` deploys to **all** of its environments on AWS Amplify from a **single shared `amplify.yml`**. | toga25-supply/amplify.yml, toga25-supply/src/api/api.ts, toga25-supply/src/hooks/useAuthenticationFlow.ts, toga25-supply/vite.config.ts, toga25-supply/package.json |
15
16
  | [Cypress Testing Harness (component + e2e)](workflows/cypress-testing.md) | The Cypress test harness for the `toga25-supply` frontend, bootstrapped from scratch (`cypress` was already a dependency but there was no config, no `cypress/` | toga25-supply/cypress.config.ts, toga25-supply/cypress/tsconfig.json, toga25-supply/cypress/support/component.tsx, toga25-supply/cypress/support/component-index.html, toga25-supply/cypress/support/e2e.ts, toga25-supply/cypress/support/commands.ts, toga25-supply/cypress/support/fixtures.ts, toga25-supply/cypress/support/mocks/useApprovalModalViewModel.ts, toga25-supply/cypress/component/SalesOrderApprovalModalsLayout.cy.tsx, toga25-supply/cypress/component/RecordApprovalModalLayout.cy.tsx, toga25-supply/cypress/component/EnterPoNumberModal.cy.tsx, toga25-supply/cypress/e2e/salesOrderApproval.cy.ts |
@@ -0,0 +1,52 @@
1
+ ---
2
+ title: Talos Integration (AppLayout host + adapter wiring)
3
+ framework: "2.0"
4
+ repo: toga25-supply
5
+ project: TOGa 2.5 Supply
6
+ client: shared
7
+ type: feature
8
+ status: active
9
+ updated: 2026-08-20
10
+ owners: [apeterson]
11
+ files:
12
+ - toga25-supply/src/layout/AppLayout/AppLayout.tsx
13
+ - toga25-supply/src/components/Header/Header.tsx
14
+ - toga25-supply/src/components/Header/Header.module.css
15
+ - toga25-supply/src/index.css
16
+ - toga25-supply/src/assets/talos-owl.png
17
+ related:
18
+ - ../../toga-blox/features/talos-assistant.md
19
+ ---
20
+
21
+ ## Summary
22
+
23
+ toga25-supply is the first host of the shared blox [Talos assistant](../../toga-blox/features/talos-assistant.md).
24
+ **Enabled for ALL clients (no per-client gating).** `AppLayout` is the host: it owns Talos
25
+ state and injects the adapter; the launcher renders in the header, the panel at app root.
26
+ (TRUE-80693)
27
+
28
+ ## How it works
29
+
30
+ - **AppLayout owns the state** — `open` / `expanded` / `width` / `dockWidth` — and injects the
31
+ adapter:
32
+ - `onSend`: stub (real backend is a later blox ticket).
33
+ - `onOpenRecord(id)` → navigate `/sales-orders?sales-orders=<id>`.
34
+ - `onAction("approvals")` → navigate `/sales-orders`.
35
+ - `onDockWidthChange(px)` → reserve layout width for the docked panel.
36
+ - **Rendering** — `<TalosLauncher>` renders in the header via a new presentational
37
+ `talosLauncher` slot prop on the blox `Header` component, laid out through a `.headerActions`
38
+ flex wrapper. `<TalosPanel>` renders at app root.
39
+ - **Branding/font** — the owl asset (`src/assets/talos-owl.png`) is passed as
40
+ `branding.avatarSrc`; Plus Jakarta Sans is loaded in `src/index.css` (the shared component
41
+ does not import fonts itself).
42
+
43
+ ## Gotcha — reserve dock width on the OUTER wrapper, not just `<main>`
44
+
45
+ The docked panel is `position: fixed`, full-height on the right. The blox `Header` is in
46
+ **normal document flow** (NOT fixed). Reserving the dock width only on `<main>` leaves the
47
+ header's right edge sitting **under** the panel, hiding the launcher + avatar. **Fix:** apply
48
+ the reserved dock width (`marginRight` = the `onDockWidthChange` value) to the **outer app
49
+ wrapper** so the header shifts along with the content.
50
+
51
+ ## Change history
52
+ - 2026-08-20 — Wired the shared blox Talos assistant into supply for all clients: AppLayout hosts state + injects the adapter (stub `onSend`; `onOpenRecord`/`onAction` navigate to sales orders; `onDockWidthChange` reserves layout width), launcher in a new header `talosLauncher` slot, panel at app root, owl avatar + Plus Jakarta Sans loaded locally. Fixed the docked panel hiding the header launcher by reserving dock width on the outer wrapper (apeterson).
@@ -30,8 +30,8 @@ _Auto-generated by `knowledge.js index`. Do not hand-edit._
30
30
  - **voice-to-voice** (TOGa Voice) — 4 doc(s) → [2.0/apps/voice-to-voice/INDEX.md](2.0/apps/voice-to-voice/INDEX.md)
31
31
  - **ai-bdr** (AI-BDR) — 9 doc(s) → [2.0/apps/ai-bdr/INDEX.md](2.0/apps/ai-bdr/INDEX.md)
32
32
  - **toga2-commerce** (TOGa Commerce) — 19 doc(s) → [2.0/apps/toga2-commerce/INDEX.md](2.0/apps/toga2-commerce/INDEX.md)
33
- - **toga25-supply** (TOGa 2.5 Supply) — 11 doc(s) → [2.0/apps/toga25-supply/INDEX.md](2.0/apps/toga25-supply/INDEX.md)
34
- - **toga-blox** (TOGa Blox) — 9 doc(s) → [2.0/apps/toga-blox/INDEX.md](2.0/apps/toga-blox/INDEX.md)
33
+ - **toga25-supply** (TOGa 2.5 Supply) — 12 doc(s) → [2.0/apps/toga25-supply/INDEX.md](2.0/apps/toga25-supply/INDEX.md)
34
+ - **toga-blox** (TOGa Blox) — 10 doc(s) → [2.0/apps/toga-blox/INDEX.md](2.0/apps/toga-blox/INDEX.md)
35
35
  - **bdr** (BDR) — 0 doc(s) → [2.0/apps/bdr/INDEX.md](2.0/apps/bdr/INDEX.md)
36
36
 
37
37
  ## standalone framework
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "toga-ai",
3
- "version": "1.0.627",
3
+ "version": "1.0.628",
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",