[backport cloud/1.37] feat: add workspace session, auth, and store infrastructure (#8230)

## Summary
- Backport of #8194 to cloud/1.37
- Adds workspace session, auth, and store infrastructure for team
workspaces

## Test plan
- [ ] Verify workspace session management works correctly
- [ ] Verify team workspace store initializes properly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8230-backport-cloud-1-37-feat-add-workspace-session-auth-and-store-infrastructure-2f06d73d365081aea34df344a5ce8249)
by [Unito](https://www.unito.io)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Simula_r
2026-01-21 18:37:18 -08:00
committed by GitHub
parent 32ce523d67
commit b8a103b30e
8 changed files with 1882 additions and 33 deletions

View File

@@ -1,5 +1,5 @@
import { useFeatureFlags } from '@/composables/useFeatureFlags'
import { isCloud } from '@/platform/distribution/types'
import { remoteConfig } from '@/platform/remoteConfig/remoteConfig'
import { api } from '@/scripts/api'
import { useFirebaseAuthStore } from '@/stores/firebaseAuthStore'
@@ -19,12 +19,13 @@ export const useSessionCookie = () => {
const createSession = async (): Promise<void> => {
if (!isCloud) return
const { flags } = useFeatureFlags()
try {
const authStore = useFirebaseAuthStore()
let authHeader: Record<string, string>
if (remoteConfig.value.team_workspaces_enabled) {
if (flags.teamWorkspacesEnabled) {
const firebaseToken = await authStore.getIdToken()
if (!firebaseToken) {
console.warn(