toga-ai 1.0.677 → 1.0.678
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,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: session
|
|
3
|
+
slug: bdr-blox-talos-drawer
|
|
4
|
+
title: BDR landing drawer rendered by the shared blox Talos component
|
|
5
|
+
author: tcox
|
|
6
|
+
repos: [bdr, toga-blox]
|
|
7
|
+
framework: "2.0"
|
|
8
|
+
client: shared
|
|
9
|
+
created: 2026-08-28
|
|
10
|
+
updated: 2026-08-28
|
|
11
|
+
status: active
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Session: bdr-blox-talos-drawer
|
|
15
|
+
**Date:** 2026-08-28
|
|
16
|
+
**Project/Repo:** bdr (`C:\WWW\BDR`) + toga-blox (`C:\WWW\toga-blox-npm`, branch `TRUE-80692`) (2.0)
|
|
17
|
+
**Task:** Make the BDR `/landing` Talos chat drawer render through the shared `@agilant/toga-blox` Talos component (TRUE-80965/80966) while looking identical to the hand-rolled ChatPanel, by adding an opt-in `drawer` variant + feature toggles to blox rather than a BDR-side bridge.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What WORKED
|
|
22
|
+
<!-- Include specific file paths and evidence -->
|
|
23
|
+
- blox `variant="drawer"` in `toga-blox-npm/src/components/Talos/{types.ts,theme.ts,helpers.tsx,TalosMessage.tsx,TalosPanel.tsx,Talos.module.css}` (uncommitted on `TRUE-80692`). Evidence: headless-Chrome computed-style diff vs the old ChatPanel is identical for drawer/head/title/body/bubble/chip/btn/input/send/foot/scrim; screenshots indistinguishable.
|
|
24
|
+
- `TalosResponse` extended with `message` (light markdown), `suggestions[]`, `cta` so BDR's `createTalosChatAdapter` plugs in directly. Evidence: typed send on `/landing` hit api.togaiq.com (session mint 200, chat 200 in ~6-7s), reply rendered with bold + chips from backend suggestions.
|
|
25
|
+
- `features` toggles + optional `expanded`/`width` + `footer`/`titleIcon`/`closeIcon`/`sendIcon` slots + `branding.avatarNode` + 13 theme keys. Docked mode regression (temporary route, then deleted): hero, 4 default tiles, stub reply w/ bold, user-initials avatar, history/new chat/reopen, expand+scrim (`onDockWidthChange` 0), re-dock (380), keyboard resize (+16), ESC unmount, launcher reopen, zero console errors.
|
|
26
|
+
- BDR `src/components/TalosDrawer.tsx` (new host wrapper) + `SecurityLanding.tsx` ChatPanel→TalosDrawer swap. Evidence: `/landing` header CTA opens the drawer, "Call me now" routes to SecurityCallNow, cursor-following light works on the portaled footer buttons (`--mx/--my` set, `::after` opacity 1). tsc, lint, 385/385 vitest, `next build` green.
|
|
27
|
+
- Booking link fixed: `src/content/security.ts primaryCtaHref` → `https://cal.com/team/toga-technology/free-security-scan` (curl 200).
|
|
28
|
+
- Local link recipe (documented in `2.0/apps/toga-blox/workflows/local-link-into-a-consumer-app.md`): junction `BDR/node_modules/@agilant/toga-blox -> C:\WWW\toga-blox-npm`; inside blox, `node_modules/react`+`react-dom` replaced by junctions to BDR's React 19 (originals kept as `react.r18`/`react-dom.r18`); blox `postcss.config.cjs` renamed `.off`; import the Talos SUBPATH `@agilant/toga-blox/dist/components/Talos/index.js`.
|
|
29
|
+
- Blox's 40 failing tests are pre-existing (same count with Talos changes stashed and under React 18).
|
|
30
|
+
- `/capture` pushed `484e2a6` to `_main` (5 docs + session doc).
|
|
31
|
+
|
|
32
|
+
## What did NOT work — DO NOT RETRY THESE
|
|
33
|
+
<!-- Exact failure reasons — do not vague-ify -->
|
|
34
|
+
- Importing the package barrel `@agilant/toga-blox` in Next: Turbopack build fails `Cannot find module 'tailwindcss'` while processing `dist/components/AdvancedSelect/AdvancedSelect.module.css` etc. — the barrel drags every blox component's CSS in and Next resolves blox's `postcss.config.cjs`. Use the Talos subpath import.
|
|
35
|
+
- Keeping blox `postcss.config.cjs` in place even with the subpath import: same `Cannot find module 'tailwindcss'` — Next walks up from the linked `Talos.module.css` into the blox checkout. Must stay renamed while linked (published tarball ships only `dist` + README, so not a prod issue).
|
|
36
|
+
- `cmd /c mklink /D` for the BDR symlink: "You do not have sufficient privilege". Use `mklink /J` (junction) or `npm install --no-save <folder>`.
|
|
37
|
+
- Node-side probe of the Talos API with a forged `Origin: http://localhost:3000` header: session mint 403 — the origin gate only passes for a real browser on localhost:3000; the adapter fell back to scripted replies. Test in a browser, not node.
|
|
38
|
+
- Running `next dev` while another instance holds `.next/dev` lock: refused to start ("Run taskkill /PID … to stop it"). Kill the listener by PID from `netstat`, never `taskkill /IM node.exe`.
|
|
39
|
+
- Hitting `/talos-*` routes during `npm run build` in blox: 500 with "Failed to read source code from …dist/components/Talos/index.js" because blox `prebuild` does `rm -rf dist`; recovers on next request.
|
|
40
|
+
- Long multi-command bash heredoc chains (CSS append + mklink + build in one call): "unexpected EOF while looking for matching `'". Split into separate calls.
|
|
41
|
+
- A theme `surface` key alone does not make the docked panel dark: `.field` gradient + `--talos-suggest-bg` / `--talos-talos-bubble-bg` were hardcoded rgba whites (now exposed as theme keys for the drawer; docked still uses `fieldBg`).
|
|
42
|
+
|
|
43
|
+
## Not tried yet (candidates for next session)
|
|
44
|
+
- Commit blox changes on `TRUE-80692` (or a branch off it) and get apeterson's review; a PR onto `TRUE-80692` vs. a note first is tcox's call.
|
|
45
|
+
- Publish blox with Talos (needs React 19 peer decision: widen `peerDependencies.react` to `^18 || ^19`), then `npm install @agilant/toga-blox@<tag>` in BDR and remove the junction — BDR cannot deploy until then.
|
|
46
|
+
- Delete `BDR/src/components/ChatPanel.tsx` + its `.chatveil/.chatpanel*` CSS block in `security.css` once signed off (kept for one-line rollback).
|
|
47
|
+
- Verify blox `RichText` italic: a live reply rendered "for *your*environment" with the space after `<em>` apparently dropped; old ChatPanel showed literal asterisks.
|
|
48
|
+
- Optional: render `cta` in the drawer (`features.cta`) once backend `cta_url` is aligned with the Cal.com link.
|
|
49
|
+
- Cross-link the Next/Turbopack link hazard from `2.0/standards/frontend.md` §11 (senior owner).
|
|
50
|
+
|
|
51
|
+
## Current file state
|
|
52
|
+
| File | Status | Notes |
|
|
53
|
+
|------|--------|-------|
|
|
54
|
+
| `toga-blox-npm/src/components/Talos/types.ts` | modified, uncommitted | variant/features/welcome/slots, TalosResponse additions, `paras` optional |
|
|
55
|
+
| `toga-blox-npm/src/components/Talos/theme.ts` | modified, uncommitted | 13 new keys + TOKEN_MAP |
|
|
56
|
+
| `toga-blox-npm/src/components/Talos/helpers.tsx` | modified, uncommitted | `toMarkdownBlocks`, `TalosMarkdown` |
|
|
57
|
+
| `toga-blox-npm/src/components/Talos/TalosMessage.tsx` | modified, uncommitted | variant-aware classes, avatarNode, markdown |
|
|
58
|
+
| `toga-blox-npm/src/components/Talos/TalosPanel.tsx` | modified, uncommitted | drawer render path, feature gating, chips, footer slot |
|
|
59
|
+
| `toga-blox-npm/src/components/Talos/Talos.module.css` | modified, uncommitted | `.chips`, `.footerSlot`, `.veil/.drawer/.d*` blocks |
|
|
60
|
+
| `toga-blox-npm/postcss.config.cjs` | renamed to `.off` (dev-only, shows as deleted) | restore before committing |
|
|
61
|
+
| `toga-blox-npm/node_modules/react{,-dom}` | junctions to BDR React 19 (dev-only) | originals at `react.r18`/`react-dom.r18` |
|
|
62
|
+
| `toga-blox-npm/dist/` | rebuilt with drawer | consumed by BDR via junction |
|
|
63
|
+
| `BDR/node_modules/@agilant/toga-blox` | junction → `C:\WWW\toga-blox-npm` | not in package.json |
|
|
64
|
+
| `BDR/src/components/TalosDrawer.tsx` | new, uncommitted | host wrapper |
|
|
65
|
+
| `BDR/src/flow/screens/SecurityLanding.tsx` | modified, uncommitted | ChatPanel → TalosDrawer |
|
|
66
|
+
| `BDR/src/components/ChatPanel.tsx` | unchanged, now unused | delete after sign-off |
|
|
67
|
+
| `BDR/src/content/security.ts` | modified (Cal.com href) | may already be committed by tcox |
|
|
68
|
+
| `BDR/.env.local` | gitignored | commented `TOGA_SECURITY_CAMPAIGN_UUID` + go-live checklist |
|
|
69
|
+
| `BDR/src/app/talos-blox`, `talos-docked-check` | deleted | scratch routes |
|
|
70
|
+
|
|
71
|
+
## Decisions made
|
|
72
|
+
- Extend blox with a `drawer` variant + props instead of a BDR-side response bridge — tcox: "we should only have added on or used what was there"; keeps BDR a pure consumer. Rejected: `talosBloxAdapter.ts` mapping layer (built, then deleted).
|
|
73
|
+
- Drawer stays mounted while closed (slide-out animation parity); docked keeps unmount-on-close.
|
|
74
|
+
- Drawer defaults `features.cta=false` so replies look exactly like the old drawer (which ignored `cta`).
|
|
75
|
+
- Theme values restated as literals in `TalosDrawer.tsx` because the portal lands outside `.security-shell`; footer buttons wrapped in a `.security-shell` (display:contents) div so shell `.btn` rules apply.
|
|
76
|
+
- Junction + single React for local dev rather than editing `next.config` (no project-file change for a dev-only concern).
|
|
77
|
+
- Booking goes straight to Cal.com (no schedule screen), per earlier design decision.
|
|
78
|
+
|
|
79
|
+
## Blockers
|
|
80
|
+
- BDR deploy blocked until blox TRUE-80692 + drawer are merged and published (React 19 peer to settle). Local link only.
|
|
81
|
+
- Blox changes live only in tcox's working tree; apeterson owns the branch.
|
|
82
|
+
|
|
83
|
+
## Exact next step
|
|
84
|
+
> In `C:\WWW\toga-blox-npm`: `mv postcss.config.cjs.off postcss.config.cjs`, review `git diff src/components/Talos`, then commit on `TRUE-80692` (or a branch off it) with `feat: add drawer variant and feature toggles to Talos` and ping apeterson for review — BDR `TalosDrawer.tsx` is ready and waiting on that publish.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
_Saved by /session-save on 2026-08-28_
|
package/package.json
CHANGED