westfarn
0969629122
Add RevenueCat Capacitor IAP; keep Stripe for web billing.
...
Unit Tests / test (pull_request) Failing after 11s
Native builds purchase/restore via RevenueCat; browser keeps Stripe
checkout/portal. Billing history shows store ledger rows from backend
webhooks. Closes #100 .
2026-08-03 14:57:50 -05:00
westfarn
5be66dbaa7
iOS App ( #99 )
...
Deploy Beta / unit-tests (push) Successful in 11s
Unit Tests / test (push) Successful in 11s
Deploy Beta / deploy-beta (push) Successful in 2m4s
closes #21Reviewed-on: #99
2026-08-03 12:14:21 -07:00
westfarn
553d526862
Fix brace-expansion lock for npm 10 beta deploy ( #70 )
...
Deploy Beta / unit-tests (push) Successful in 11s
Unit Tests / test (push) Successful in 10s
Deploy Beta / deploy-beta (push) Successful in 1m57s
## Summary
- Beta deploy after #69 failed: `Cannot find module 'brace-expansion'` during `npm run build:beta`
- Root cause: `package-lock.json` linked `brace-expansion` to empty phantom paths (`minimatch/vendor/brace-expansion-compat`). npm 11 remapped them locally; deploy Node 22 / npm 10 followed the lock literally
- Declare vendored shim as a direct dependency and rewrite lock links to `vendor/brace-expansion-compat`
## Test plan
- [x] `npm ci` under Node 22.23.1 / npm 10.9.8 resolves `brace-expansion` from fork-ts-checker nested minimatch
- [x] `npx react-scripts build` with `.env.beta` succeeds
- [x] `npm audit` still 4 moderate (0 critical / 0 high)
- [ ] Redeploy `chat_web_app` beta after mergeReviewed-on: #70
2026-07-30 16:57:17 -07:00
westfarn
44f412fffa
Remediate llm-fe npm audit critical/high vulnerabilities ( #69 )
...
Unit Tests / test (push) Successful in 11s
Deploy Beta / unit-tests (push) Successful in 11s
Deploy Beta / deploy-beta (push) Failing after 51s
## Summary
- Closes #53
- `npm audit` in `llm-fe`: **103 → 4** (0 critical, 0 high; 4 moderate remain)
- Applied `npm audit fix`, bumped direct floors (`axios`, `react-router-dom`), pinned `styled-components@6.1.15` for CRA typecheck stability
- Added npm `overrides` for vulnerable transitive leaves (`tar`, `postcss`, `svgo`, `sharp`, `ws`, `flatted`, etc.)
- Vendored CRA-compatible `brace-expansion@5.0.8` shim (v1 default-export API + GHSA-mh99 DoS limits)
## Remaining (documented)
- **moderate:** `react-router`/`react-router-dom` — needs v7 (breaking)
- **moderate:** `webpack-dev-server` via `react-scripts` — CRA incompatible with patched WDS 5.2.6+; needs CRA → Vite (or similar) follow-up
- Deprecation warnings from CRA/`eslint@8`/old `glob` tooling still present until toolchain migrate
## Test plan
- [x] `npm ci` in `llm-fe`
- [x] `npm audit` → 0 critical / 0 high
- [x] `npm run build`
- [x] `npm run test:ci` → 25 suites / 112 tests passedReviewed-on: #69
2026-07-29 17:41:00 -07:00
westfarn
a4a28ef13e
Ship Android app by wrapping the web build with Capacitor ( #20 ) ( #28 )
...
Unit Tests / test (push) Successful in 11s
## Summary
- Closes #20
- Add Capacitor 7 to `llm-fe/` (`capacitor.config.ts`, appId `com.aimloperations.chat`, `webDir: build`) and commit the generated `android/` project
- npm scripts: `build:mobile` (`.env.mobile` + CRA build + `cap sync`), `android:open`, `android:sync`, `assets:generate`
- `.env.mobile` defaults to prod backend; override independently of web deploys
- Native chrome: Android back button (history / exit at root), status bar + keyboard resize, safe-area CSS; Preferences registered for JWT mirror (#22 )
- Icons/splash via `@capacitor/assets`; signing via optional `keystore.properties`; docs in `llm-fe/ANDROID.md` + root README
Blockers #22 / #23 / #24 already on master.
## Test plan
- [x] `npm run test:ci` (79 tests)
- [x] `npm run build` + `npx cap add android` / `cap sync`
- [ ] `npm run build:mobile` + open in Android Studio on a machine with SDK
- [ ] Emulator/device QA: login, chat stream, theme, back button, keyboard/safe-area, WS resume
- [ ] Generate upload keystore outside repo; `./gradlew bundleRelease` for internal testing trackReviewed-on: #28
2026-07-26 17:12:48 -07:00
westfarn
3162ed1f7f
Make auth JWT-only for Capacitor WebView origins ( #22 ) ( #26 )
...
Unit Tests / test (push) Successful in 10s
## Summary
- Closes #22
- Drop CSRF cookie / `js-cookie` path; axios uses JWT `Authorization` only (`withCredentials: false`)
- Unified token storage: `localStorage` sync source of truth + optional Capacitor Preferences mirror/hydrate for native shells
- Request interceptor always attaches fresh bearer token; 401 refresh + sign-in redirect use hash-safe native paths
- Companion backend PR: `ai_ml_operations/chat_backend` branch `capacitor-cors-csrf-22` (CORS/CSRF Capacitor origins)
## Test plan
- [x] Unit tests: `tokenStorage`, `nativePlatform`, `jwtHelpers`, Auth/SignIn/WebSocket (`npm run test:ci`)
- [ ] Login from Capacitor Android (`https://localhost `) and iOS (`capacitor://localhost`)
- [ ] Token refresh after access expiry; logout blacklist; password reset; 401 → sign-in
- [ ] Confirm browser build at `chat.aimloperations.com` unchanged
- [ ] Merge companion backend PR so prod CORS includes Capacitor origins when `CORS_ORIGIN_ALLOW_ALL=false`Reviewed-on: #26
2026-07-26 14:09:19 -07:00
westfarn
5a7a4dd4eb
Deploy chat_web_app via server-infra (node-static) ( #15 )
...
Unit Tests / test (push) Successful in 10s
## Summary
Implements [chat_web_app#13](#13 ) Part A: wire the CRA frontend into the same **node-static** deploy path as `dta_webapp` (no Docker for serving).
- `build:prod` / `build:beta` write into `/var/www/{env}.chat.aimloperations/html`
- API/WS URLs come from `REACT_APP_*` (`.env.production` / `.env.beta`) instead of hardcoded localhost
- Gitea unit tests + auto deploy-prod on `master`; deploy-beta via `workflow_dispatch`
- README documents local dev, env files, and webroot layout
Branch includes the #11 unit-test commit (`test:ci`) so CI has a green suite.
Companion server-infra branch (Part B): `issue-13-register-chat-web-app` on `ai_ml_operations/server-infra`.
## Test plan
- [ ] `cd llm-fe && npm run test:ci`
- [ ] Merge + ensure Unit Tests workflow passes on PR
- [ ] Merge server-infra `issue-13-register-chat-web-app`, then sync/pull on runner
- [ ] Redeploy web-static (or full host provision) so nginx listens on **8082**
- [ ] Manual: `server-infra/scripts/deploy.sh --app chat_web_app --env prod --ref <sha>`
- [ ] NPM: point `chat.aimloperations.com` at `adama:8082` + `roslin:8082` + `ai-server-4080:8082`
- [ ] Confirm built assets hit `https://chatbackend.aimloperations.com `Reviewed-on: #15
2026-07-25 04:34:12 -07:00
westfarn
c0d83359cc
Add unit tests ( #11 ) ( #14 )
...
## Summary
- Add Jest/RTL unit tests for data models, Card, Footer, CustomTextField/PasswordField, CustomToastMessage, ConversationCard, AuthContext, and SignIn
- Remove the broken CRA `App.test.tsx` placeholder that expected "learn react"
- Add `npm run test:ci` for non-interactive CI runs
Closes #11
## Test plan
- [ ] `cd llm-fe && npm install`
- [ ] `npm run test:ci` — expect 9 suites / 32 tests passing
Reviewed-on: #14
2026-07-14 18:03:24 -07:00
westfarn
004153617b
Tons of updates. Rags paginated tables, site tracking
2025-05-14 03:23:18 -05:00
westfarn
626d471a15
inital check in
2025-03-07 12:21:37 -06:00