Enable beta auto-deploy + Tianji beta ID / consent-gated events (#35) #42

Merged
westfarn merged 2 commits from feat/35-beta-deploys-tianji into master 2026-07-27 06:54:20 -07:00
Owner

Summary

Closes #35.

  • Flip deploy workflows (mirror dta_webapp): push/merge to master → auto-deploy beta; Deploy Prod is workflow_dispatch only
  • Tianji: REACT_APP_TIANJI_WEBSITE_ID + REACT_APP_DEPLOY_ENV in .env.production / .env.beta; Tracker loads page views always on prod/beta
  • Consent policy: page views always live; custom events / identify gated via analyticsConsent + AnalyticsConsentBanner + trackEvent/identifyUser helpers (call sites remain #36)
  • Remove invalid Tianji <script> from index.tsx (Tracker component owns injection)
  • README documents beta auto / prod button + Tianji policy

Ops note — beta Tianji website ID

Prod ID unchanged: cm7x7m52m03kbddswbswrt17y.

.env.beta has REACT_APP_TIANJI_WEBSITE_ID= empty until a Hesychia Beta website is created in Tianji (workspace cm7w8087y020lddswyhamadj2). Paste the new id into .env.beta before beta page views show under a distinct site.

Test plan

  • npm run test:ci (106 tests)
  • Create Hesychia Beta Tianji website; set REACT_APP_TIANJI_WEBSITE_ID in .env.beta
  • Merge to master → Deploy Beta runs; prod does not auto-deploy
  • Manual Run workflow on Deploy Prod still works
  • Beta build hits beta.chatbackend REST/WS; static root /var/www/beta.chat.aimloperations/html (8083)
  • Prod/beta: tracker.js loads without accepting consent; banner shows until Accept/Decline; trackEvent only fires after Accept
## Summary Closes #35. - **Flip deploy workflows** (mirror `dta_webapp`): push/merge to `master` → auto-deploy **beta**; **Deploy Prod** is `workflow_dispatch` only - **Tianji**: `REACT_APP_TIANJI_WEBSITE_ID` + `REACT_APP_DEPLOY_ENV` in `.env.production` / `.env.beta`; Tracker loads page views always on prod/beta - **Consent policy**: page views always live; custom events / identify gated via `analyticsConsent` + `AnalyticsConsentBanner` + `trackEvent`/`identifyUser` helpers (call sites remain #36) - Remove invalid Tianji `<script>` from `index.tsx` (Tracker component owns injection) - README documents beta auto / prod button + Tianji policy ## Ops note — beta Tianji website ID Prod ID unchanged: `cm7x7m52m03kbddswbswrt17y`. `.env.beta` has `REACT_APP_TIANJI_WEBSITE_ID=` empty until a **Hesychia Beta** website is created in Tianji (workspace `cm7w8087y020lddswyhamadj2`). Paste the new id into `.env.beta` before beta page views show under a distinct site. ## Test plan - [x] `npm run test:ci` (106 tests) - [ ] Create Hesychia Beta Tianji website; set `REACT_APP_TIANJI_WEBSITE_ID` in `.env.beta` - [ ] Merge to master → Deploy Beta runs; prod does **not** auto-deploy - [ ] Manual Run workflow on Deploy Prod still works - [ ] Beta build hits `beta.chatbackend` REST/WS; static root `/var/www/beta.chat.aimloperations/html` (8083) - [ ] Prod/beta: tracker.js loads without accepting consent; banner shows until Accept/Decline; `trackEvent` only fires after Accept
westfarn added 1 commit 2026-07-27 05:27:39 -07:00
Enable beta auto-deploy and Tianji consent-gated events (#35)
Unit Tests / test (pull_request) Successful in 14s
befe3cdb4c
Flip workflows so master deploys beta and prod is workflow_dispatch only.
Load distinct Tianji website IDs from env; page views always on, custom events require consent.
westfarn added 1 commit 2026-07-27 05:56:20 -07:00
Set Hesychia beta Tianji website ID
Unit Tests / test (pull_request) Successful in 13s
6e54ef4f8d
westfarn merged commit 966ad7aba4 into master 2026-07-27 06:54:20 -07:00
westfarn deleted branch feat/35-beta-deploys-tianji 2026-07-27 06:54:20 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#42