toga-ai 1.0.352 → 1.0.354
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: architecture
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-07-
|
|
9
|
+
updated: 2026-07-16
|
|
10
10
|
owners: ["jcardinal", "rgirish", "mhammontree"]
|
|
11
11
|
files:
|
|
12
12
|
- _underscore/_underscore.php
|
|
@@ -342,6 +342,7 @@ multi-file UI components (`.php`/`.html`/`.css`/`.js`) invoked as `<_ComponentNa
|
|
|
342
342
|
still refetches storage unconditionally, so a dirty read (read-after-assign, pre-save) discards the
|
|
343
343
|
unsaved value.
|
|
344
344
|
- **`_Database::register()` auto-starts a lazy transaction (since Apr 2 2026, commit `fa7835ed`).** Any code that calls `register()` and then writes to that DB must call `_Database::transactionCommit()` before the request ends — otherwise MySQL silently rolls back all writes when the connection closes. Lazy transactions only materialise on the first write, so read-only callers are unaffected. See `_underscore/Database.php:48`. First discovered when Rate SAML user provisioning silently discarded all new user INSERTs (Jun 2026).
|
|
345
|
+
- **PHP "Unclosed '{'" parse errors report a MISLEADING line number.** When a `.php` file loaded by the autoloader (`Loader.php`) has a dropped/unbalanced brace, PHP reports `Unclosed '{' on line N` where N is the **outermost `class X {` line** and fails at EOF — NOT at the true location of the missing `}`. Worse, because the file loads lazily via the SPL autoloader, the runtime trace points at the **caller** that triggered the autoload (e.g. a `new _Email()` call site), not the broken file. **Triage rule:** for an "Unclosed '{'" error, the real culprit is a missing `}` somewhere between the reported line and EOF of the file that failed to load — run `php -l <file>` (it reports the EOF line) and scan the whole file. **Merge-conflict resolutions are a common source of a single dropped brace** — review the entire merge, not just the one file the error appears to name. (First hit: production 500 EO-1, Jul 2026 — a `}` dropped from `_Email::send()` during merge `685e4a14` surfaced as a trace pointing at the `new _Email()` caller.)
|
|
345
346
|
|
|
346
347
|
## Change history
|
|
347
348
|
- 2026-06-11 — Documented lazy transaction gotcha in `_Database::register()` (rgirish)
|
|
@@ -349,3 +350,4 @@ multi-file UI components (`.php`/`.html`/`.css`/`.js`) invoked as `<_ComponentNa
|
|
|
349
350
|
- 2026-06-29 — Surface made the enforced (un-flagged) presentation path; reserved id blocks renumbered to Records 333–341 / RecordFields 2246–2433 (known seed-vs-provisioned drift). (jcardinal)
|
|
350
351
|
- 2026-07-02 — Fixed framework-wide `FIELD_STORAGE` write-drop and folder-read bugs in `Model.php`; noted the remaining unconditional-refetch dirty-read follow-up. (mhammontree)
|
|
351
352
|
- 2026-07-07 — Documented `_Query` writes-only async mode (`isAsync` → Worker `Infrastructure/Database/Query`) in the database-architecture section, linked `features/async-query-execution.md`, and noted the SQS-first `_Worker::runTask()` enqueue departure (caller does no MySQL; worker tier creates the row on pickup). (jcardinal)
|
|
353
|
+
- 2026-07-16 — Documented the misleading "Unclosed '{'" parse-error gotcha (autoloader reports the outermost `class {` line / caller trace, not the true dropped-brace location; merge conflicts a common cause). First hit production 500 EO-1 via a dropped `_Email::send()` brace. (jcardinal)
|
|
@@ -6,7 +6,7 @@ project: _Underscore
|
|
|
6
6
|
client: shared
|
|
7
7
|
type: feature
|
|
8
8
|
status: active
|
|
9
|
-
updated: 2026-
|
|
9
|
+
updated: 2026-07-16
|
|
10
10
|
owners: ["jcardinal", "bala", "mhammontree"]
|
|
11
11
|
files:
|
|
12
12
|
- _underscore/Model/Client/EmailTemplate.php
|
|
@@ -106,6 +106,14 @@ can keep using `sendEmail($api, ...)`.
|
|
|
106
106
|
use ASCII-only content. Recommended **root-cause fix**: set `$mailer->CharSet = 'UTF-8'` in
|
|
107
107
|
`_Email::send()` — but that affects **every** client, so it should be a separate, tested
|
|
108
108
|
change rather than a drive-by edit.
|
|
109
|
+
- **⚠ SECURITY — live AWS SES SMTP credentials are hardcoded in `_underscore/Email.php`.**
|
|
110
|
+
The `SMTP_USERNAME` / `SMTP_PASSWORD` class constants (near the top of `_Email`) hold
|
|
111
|
+
**real** AWS SES SMTP credentials committed in source, violating the team no-secrets-in-code
|
|
112
|
+
rule (`rules/common/security.md`, `git-workflow.md`). Pre-existing (not introduced by the
|
|
113
|
+
Jul 2026 parse-error fix). **Remediation:** treat the committed values as compromised and
|
|
114
|
+
rotate them in AWS SES, then move them out of source into `Config/[environment].ini`
|
|
115
|
+
(read via `_Config`), matching how DB credentials are handled. Until then, be aware the
|
|
116
|
+
secret lives in the `_Email` constants — do **not** copy the values anywhere.
|
|
109
117
|
- **`clientIdentifier` does NOT pick the template DB.** `_Email::send()` uses
|
|
110
118
|
`clientIdentifier` only for CloudWatch logging/validation. The template loads from whatever
|
|
111
119
|
DB the `DB_CLIENT` alias points at — so register the right `Client_<x>` schema before
|
|
@@ -130,6 +138,11 @@ worker method) in-process instead.
|
|
|
130
138
|
|
|
131
139
|
## Change history
|
|
132
140
|
|
|
141
|
+
- 2026-07-16 — Recorded the **hardcoded AWS SES SMTP credentials** security gotcha in
|
|
142
|
+
`_Email` (`SMTP_USERNAME`/`SMTP_PASSWORD` constants; pre-existing — rotate + move to
|
|
143
|
+
`Config`). Surfaced while fixing a production 500 (EO-1) whose root cause was a single
|
|
144
|
+
`}` dropped from `_Email::send()`'s header `foreach` during merge `685e4a14`; the fix
|
|
145
|
+
restored the brace (`php -l` clean). (jcardinal)
|
|
133
146
|
- 2026-06-30 — Documented the **`CharSet=UTF-8` mojibake gotcha** (`_Email::send()` doesn't
|
|
134
147
|
set it → non-ASCII content garbles; scoped workaround = ASCII-only, root-cause = set
|
|
135
148
|
`$mailer->CharSet` as a separate tested change), clarified that `clientIdentifier` does not
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: session
|
|
3
|
+
slug: bdr-build
|
|
4
|
+
title: BDR web funnel — first design-review adjustments (font, AutoBuild art, PLAN §9 items)
|
|
5
|
+
author: tcox
|
|
6
|
+
repos: [bdr, ai-bdr]
|
|
7
|
+
framework: "2.0"
|
|
8
|
+
client: shared
|
|
9
|
+
status: active
|
|
10
|
+
created: 2026-07-15
|
|
11
|
+
updated: 2026-07-15
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Session: bdr-build
|
|
15
|
+
**Date:** 2026-07-15
|
|
16
|
+
**Project/Repo:** bdr (2.0) — local `C:\WWW\BDR`, GitHub `agilantsolutions/BDR`, branch `BDR-Development`
|
|
17
|
+
**Task:** Apply the first UI design-review adjustments to the BDR web funnel (post Phases 0-5): site font, AutoBuild agent art, and triage of Privacy/Terms, share button, connect-time, and timezone items.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What WORKED
|
|
22
|
+
- **Site-wide font fixed (root cause found).** The mockup loaded Plus Jakarta Sans via a Google Fonts `<link>` in its `<head>` that was never ported — `studio.css` named the font but nothing loaded it, so the whole site silently fell back to `system-ui`. Fix: `next/font/google` `Plus_Jakarta_Sans` (weights 400/500/600/700/800, `display:swap`, self-hosted at build) exposed as `--font-jakarta` on `<html>` in `src/app/layout.tsx`; `studio.css` `--font-display`/`--font-body` now resolve `var(--font-jakarta)` first with the original stack as fallback. No `font-weight` rules touched. Evidence: tsc clean, eslint clean, `next build` succeeded with 4 `.woff2` bundled into `.next/static/media`, 67/67 vitest green.
|
|
23
|
+
- **AutoBuild flourish agents restored.** "Build my agent for me" showed only the final agent (Alex/human-02); Athena (owl-02) and Cogsworth (robot-02) rendered blank. Root cause: Phase 2 asset pruning (§5.8) kept only the campaign agent's art, but AutoBuild's FLOURISH cycle needs `Owl 1`/`Robot 1` art + talk videos — and the preloader tolerates missing files silently (resolves false, never blocks), masking the gap. Fix: copied `owl-02.png`, `owl-02-talk.mp4`, `robot-02.png`, `robot-02-talk.mp4` (~5.6MB) from `mockup/agents/` to `public/agents/`. No code change needed (asset resolver is a plain `/` prefix).
|
|
24
|
+
- **PLAN.md §9 extended with three design-review decisions** (§9.11 Privacy/Terms dead links — need real pages or togatech links; §9.12 share button is mock — needs email-send route + real call pipeline; §9.13 "Avg. connect time ~7 seconds" is curated bundle copy, never a computed metric anywhere — keep campaign-editable for launch).
|
|
25
|
+
- **Timezone request closed as already-done.** Schedule screen's tz IS calculated: `detectLocalTz()` in `src/lib/scheduleSlots.ts` (Intl short name) renders "All times in <tz>" + confirmation label; backend converts the picked slot to America/Chicago for Toga (`src/server/toga.ts`). Told design team; nothing built.
|
|
26
|
+
- **/capture published to team KB (PUSHED).** `web-funnel-app.md` updated (font-port gotcha, flourish-asset gotcha + corrected stale ~6.2MB prune note, Schedule-tz runtime fact) and `bdr-web-funnel-plan.md` §9 mirror updated with 9.11-9.13.
|
|
27
|
+
|
|
28
|
+
## What did NOT work — DO NOT RETRY THESE
|
|
29
|
+
- *(Nothing failed this session. The list below is CARRIED FORWARD from the 2026-07-14 session — still valid, do not retry.)*
|
|
30
|
+
- **`sed`/`perl` in-place replacement of literal `\n` escapes through the Bash tool fails silently** (escaping mangled through the Windows Git Bash wrapper). Use the Edit tool with exact old/new strings. `mockup/styles.css` lines ~759/840 still contain the broken `\n`/`\"` artifacts on purpose; the fixed copy is `src/app/studio.css` — never re-copy those lines from the mockup.
|
|
31
|
+
- **`pkill` does not kill Windows processes from Git Bash** — a stale `next start` keeps port 3000 and serves an old build. Kill via PowerShell `Get-NetTCPConnection -LocalPort 3000` + `Stop-Process`, or `taskkill //PID <pid> //F`.
|
|
32
|
+
- **Bash tool cwd resets to `c:\WWW` between some calls** — `npm run <script>` then fails with "Missing script". Always `cd /c/WWW/BDR &&` first.
|
|
33
|
+
- **Pre-commit path scan regex missing `c:\WWW\...` single-backslash paths** — scan `[A-Za-z]:[\\/]` case-insensitively.
|
|
34
|
+
- **Letting ESLint lint `mockup/**`** — reference prototype, belongs in globalIgnores (already configured).
|
|
35
|
+
- **CLI push without GCM sign-in** — permanently resolved via `credential.helper manager`; do not fall back to GitHub Desktop.
|
|
36
|
+
|
|
37
|
+
## Not tried yet (candidates for next session)
|
|
38
|
+
- **Commit this session's working-tree changes** to `BDR-Development` (font wiring, 4 restored assets, PLAN.md §9.11-9.13) — developer has not asked for the commit yet.
|
|
39
|
+
- **Remaining design-review items** — the team's list was being worked through interactively; more items may be pending beyond the 5 handled.
|
|
40
|
+
- **Privacy/Terms destinations** — decide mock-up pages vs. links to togatech pages, then 2-line content change in `src/content/default.ts` (schema already supports `[label](href)`; HubSpot can override per campaign).
|
|
41
|
+
- **Verify design team's tz observation** — if someone saw "CST" in July or a raw "GMT-5", that's a browser-specific quirk worth chasing (ask what value + which browser).
|
|
42
|
+
- **§9.10 HubSpot content-modeling decision** (gates Phase 6: hubspotProvider + campaign seeding), then Phase 6 second campaign, Phase 7 pixel-parity/GA4/accessibility, Phase 8 Amplify deploy.
|
|
43
|
+
- Success screen consuming `submitOk` (exposed by useAgentFlow, not surfaced in UI).
|
|
44
|
+
|
|
45
|
+
## Current file state
|
|
46
|
+
| File | Status | Notes |
|
|
47
|
+
|------|--------|-------|
|
|
48
|
+
| `src/app/layout.tsx` | MODIFIED, uncommitted | next/font Plus Jakarta Sans, `--font-jakarta` variable on `<html>` |
|
|
49
|
+
| `src/app/studio.css` | MODIFIED, uncommitted | `--font-display`/`--font-body` resolve `var(--font-jakarta)` first |
|
|
50
|
+
| `public/agents/owl-02.png`, `owl-02-talk.mp4`, `robot-02.png`, `robot-02-talk.mp4` | ADDED, uncommitted | ~5.6MB, copied from `mockup/agents/` for AutoBuild flourish |
|
|
51
|
+
| `PLAN.md` | MODIFIED, uncommitted | §9.11 Privacy/Terms, §9.12 share mock, §9.13 connect-time copy |
|
|
52
|
+
| Repo otherwise | clean at `34a3910` on `BDR-Development` | Phases 0-5 committed previously; no PR yet |
|
|
53
|
+
| Team KB (`toga-tech`) | PUSHED | `web-funnel-app.md` + `bdr-web-funnel-plan.md` updated via /capture |
|
|
54
|
+
|
|
55
|
+
## Decisions made
|
|
56
|
+
- **`next/font/google` over re-adding the mockup's Google Fonts `<link>`** — self-hosted at build (no runtime Google request, no FOUT), Next-idiomatic. Rejected: runtime `<link>` (external request, CSP/perf) and `next/font/local` (only needed if build-time font download is blocked; it wasn't).
|
|
57
|
+
- **Restore only the 4 flourish assets, not the full 54-file agent library** — AutoBuild needs exactly Owl 1 + Robot 1; keeps the §5.8 size discipline while unbreaking a shipped screen.
|
|
58
|
+
- **Connect time stays curated campaign copy for launch** — a live metric needs a definition, a Vapi/Toga call-record source, periodic computation, and enough call volume to be stable; small early samples are noisy. Rejected: wiring a live query now.
|
|
59
|
+
- **Privacy/Terms and share-button work deferred to PLAN §9** rather than built speculatively — both need decisions from outside engineering (legal/marketing URLs; real call pipeline).
|
|
60
|
+
|
|
61
|
+
## Blockers
|
|
62
|
+
- **§9.10 HubSpot content mechanism undecided** — still gates Phase 6 (owner: HubSpot instance owner).
|
|
63
|
+
- **Privacy/Terms destination URLs** — need legal/marketing decision (mock pages vs. togatech links).
|
|
64
|
+
- **First-campaign direction/copy from leadership** still pending.
|
|
65
|
+
- **Real-call testing env values** (HUBSPOT_ACCESS_TOKEN + 4 TOGA_* vars) — deliberate action, hits live Toga.
|
|
66
|
+
|
|
67
|
+
## Exact next step
|
|
68
|
+
> Commit the session's working-tree changes in `C:\WWW\BDR` to `BDR-Development` as two commits: `fix: load Plus Jakarta Sans via next/font` (layout.tsx + studio.css) and `fix: restore autobuild flourish agent assets` (public/agents/ + PLAN.md), then continue the design-review punch list with the team.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
_Saved by /session-save on 2026-07-15_
|
package/package.json
CHANGED