From 79e704286f5dfa1d5571eaf70a59e95d9afea977 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Wed, 18 Mar 2026 20:54:20 -0700 Subject: [PATCH] feat(react-auth): include productId in login/register request bodies When productId is configured via createAuthProvider({ productId }), it is now included in the login and register POST bodies alongside email/password. Previously it was only injected for OAuth calls. This is required by platform-service which validates productId on all auth endpoints. --- .../WINDSURF/.last-refresh.log | 12 ++++----- .../refresh-chat-history.md | 27 +++++++++++-------- .../repo_backup-and-push.md | 2 +- .../repo_push-repos.md | 4 +-- .../repo_sync-repos.md | 4 +-- .../learning_ai_common_plat/repos.txt | 4 +++ .../run-code-review.md | 6 ++++- packages/react-auth/src/auth-context.tsx | 12 +++++++-- 8 files changed, 46 insertions(+), 25 deletions(-) diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/.last-refresh.log b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/.last-refresh.log index b5cd3168..ca15c2ba 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/.last-refresh.log +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/.last-refresh.log @@ -1,9 +1,9 @@ -Last refresh: 2026-03-12T19:01:41Z (2026-03-12 12:01:41 PDT) -Cascade conversations: 50 (370M) -Memories: 80 +Last refresh: 2026-03-18T23:05:43Z (2026-03-18 16:05:43 PDT) +Cascade conversations: 50 (385M) +Memories: 83 Implicit context: 20 -Code tracker dirs: 136 -File edit history: 2908 entries -Workspace storage: 29 workspaces +Code tracker dirs: 99 +File edit history: 3022 entries +Workspace storage: 34 workspaces Repo docs: 7 files across 2 repos Repo workflows: 42 files across 10 repos diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/refresh-chat-history.md b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/refresh-chat-history.md index 8da42c43..37bacaca 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/refresh-chat-history.md +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/refresh-chat-history.md @@ -7,18 +7,23 @@ description: Refresh the Windsurf chat history archive (re-scan all repos, updat Refreshes the centralized Windsurf chat history archive at `__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/`. Auto-discovers new repos, updates symlinks, and re-copies docs + workflows. -## Covered Repos (All 8 workspaces) +## Covered Repos (All 13 workspaces) -| Repo | Product | Workflows | Docs | -| ----------------------------------- | ---------------- | --------- | ---- | -| `learning_voice_ai_agent` | LysnrAI | ✅ | ✅ | -| `learning_multimodal_memory_agents` | MindLyst | ✅ | ✅ | -| `learning_ai_clock` | ChronoMind | ✅ | — | -| `learning_ai_peakpulse` | PeakPulse | ✅ | — | -| `learning_ai_fastgap` | NomGap | ✅ | — | -| `learning_ai_jarvis_jr` | JarvisJr | ✅ | — | -| `learning_ai_common_plat` | Common Platform | ✅ | — | -| `learning_agent_monitoring_fx` | Agent Monitoring | ✅ | — | +| Repo | Product | Workflows | Docs | +| ----------------------------------- | ------------------ | --------- | ---- | +| `learning_ai_common_plat` | Common Platform | ✅ | ✅ | +| `learning_voice_ai_agent` | LysnrAI | ✅ | ✅ | +| `learning_multimodal_memory_agents` | MindLyst | ✅ | ✅ | +| `learning_ai_clock` | ChronoMind | ✅ | — | +| `learning_ai_fastgap` | NomGap | ✅ | — | +| `learning_ai_jarvis_jr` | JarvisJr | ✅ | — | +| `learning_ai_peakpulse` | PeakPulse | ✅ | — | +| `learning_ai_notes` | NoteLett | ✅ | — | +| `learning_ai_flowmonk` | FlowMonk | ✅ | — | +| `learning_ai_trails` | ActionTrail | ✅ | — | +| `learning_ai_smart_auth` | SmartAuth | ✅ | — | +| `learning_ai_auth_app` | ByteLyst Auth | ✅ | — | +| `learning_ai_productivity_web` | Productivity Tools | ✅ | — | ## Steps diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_backup-and-push.md b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_backup-and-push.md index 0a27ca22..1b194198 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_backup-and-push.md +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_backup-and-push.md @@ -30,7 +30,7 @@ echo "✨ All repos pushed!" ## What it does: 1. **Backup** — creates timestamped backup branches, cleans up old ones (7 days), skips duplicates -2. **Push** — pushes `main` to `origin/main` for all 7 repos +2. **Push** — pushes `main` to `origin/main` for all 13 repos ## Repositories: diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_push-repos.md b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_push-repos.md index 175e3be0..2ebc559b 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_push-repos.md +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_push-repos.md @@ -1,5 +1,5 @@ --- -description: Push local main branch to origin for all 7 workspace repos +description: Push local main branch to origin for all 13 workspace repos --- # Push Repos @@ -18,7 +18,7 @@ done < ~/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt ## What it does: -1. Iterates over all 7 workspace repos +1. Iterates over all 13 workspace repos 2. Runs `git push origin main` in each 3. Fails fast if a repo has diverged from remote (resolve with rebase manually) diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_sync-repos.md b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_sync-repos.md index 48d83120..13a40c67 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_sync-repos.md +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repo_sync-repos.md @@ -1,5 +1,5 @@ --- -description: Pull latest from origin main across all 7 workspace repos +description: Pull latest from origin main across all 13 workspace repos --- # Sync Repos @@ -18,7 +18,7 @@ done < ~/code/mygh/learning_ai_common_plat/.windsurf/workflows/repos.txt ## What it does: -1. Iterates over all 7 workspace repos +1. Iterates over all 13 workspace repos 2. Runs `git pull --ff-only origin main` in each 3. Fails fast if there are local divergent commits (use `git pull --rebase` manually in that case) diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repos.txt b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repos.txt index 29293819..df66e8dc 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repos.txt +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/repos.txt @@ -11,3 +11,7 @@ learning_ai_jarvis_jr learning_ai_peakpulse learning_ai_notes learning_ai_flowmonk +learning_ai_trails +learning_ai_smart_auth +learning_ai_auth_app +learning_ai_productivity_web diff --git a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/run-code-review.md b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/run-code-review.md index 8b7db272..6631b2d3 100644 --- a/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/run-code-review.md +++ b/__LOCAL_LLMs/AI_IDE_CHAT_HISTORY/WINDSURF/repo_workflows/learning_ai_common_plat/run-code-review.md @@ -45,6 +45,10 @@ All code across the ByteLyst workspace repos: - learning_ai_jarvis_jr (JarvisJr) - learning_ai_peakpulse (PeakPulse) - learning_ai_notes (NoteLett) + - learning_ai_trails (ActionTrail) + - learning_ai_smart_auth (SmartAuth) + - learning_ai_auth_app (ByteLyst Auth) + - learning_ai_productivity_web (Productivity Tools) ## Domain Context @@ -52,7 +56,7 @@ This is a multi-product ecosystem with shared platform services. Key architectur - **Platform services** (Fastify 5, TypeScript ESM) provide auth, telemetry, feature flags, etc. - **Shared packages** (@bytelyst/\*) eliminate duplication across products -- **Product backends** handle domain-specific logic (port 4010-4017) +- **Product backends** handle domain-specific logic (port 4010-4018) - **Web apps** use Next.js 16 + React 19 - **Mobile apps** use native platforms (SwiftUI, Jetpack Compose, React Native) diff --git a/packages/react-auth/src/auth-context.tsx b/packages/react-auth/src/auth-context.tsx index 68e89f31..b2be03cd 100644 --- a/packages/react-auth/src/auth-context.tsx +++ b/packages/react-auth/src/auth-context.tsx @@ -175,7 +175,11 @@ export function createAuthProvider(config: Au try { const { data, error: fetchError } = await api.safeFetch(loginEndpoint, { method: 'POST', - body: JSON.stringify({ email, password }), + body: JSON.stringify( + configProductId + ? { email, password, productId: configProductId } + : { email, password } + ), }); if (data && !fetchError) { @@ -219,7 +223,11 @@ export function createAuthProvider(config: Au try { const { data, error: fetchError } = await api.safeFetch(registerEndpoint, { method: 'POST', - body: JSON.stringify({ email, password, displayName }), + body: JSON.stringify( + configProductId + ? { email, password, displayName, productId: configProductId } + : { email, password, displayName } + ), }); if (data && !fetchError) {