d3ro-voice/apps/desktop/src/main/services
윤찬 9498380f7f fix(desktop+supabase): OAuth 로그인 완주 + RLS 재귀 픽스 (빅뱅 Phase 5 Part 1)
빅뱅 Phase 5 실증 중 발견한 3개 버그 해결:

1. implicit flow 응답 무시:
   - supabase-js가 persistSession:false 일 때 PKCE code_verifier 저장 못해
     implicit flow로 fallback, fragment(#access_token=...&refresh_token=...)로
     토큰 전달. handleDeepLink는 ?code=만 파싱하고 있어 무시됨.
   - handleDeepLink에 fragment parser 추가 (access_token + refresh_token)
   - CloudSyncService.handleAuthTokens() 신규 — setSession() 후
     기존 _onAuthenticated SSOT로 수렴
   - 에러 query/fragment(error, error_description) 상세 로깅
   - 토큰 값은 로그에 안 찍히도록 (query=yes/no, fragment=yes/no 만)

2. Supabase RLS 무한 재귀:
   - team_members_read_same_team 정책이 자기 테이블 재조회 →
     Postgres RLS 엔진 무한 재귀 탐지 에러
   - meetings / meeting_memos / meeting_documents / team_invites 정책이
     team_members 서브쿼리 경유해서 전부 같이 터짐 + Realtime TIMED_OUT
   - migration 20260411000001: SECURITY DEFINER 함수 2개
     (user_team_ids, user_admin_team_ids) 신규 — Supabase 권장 패턴
   - 영향 정책: team_members(4) + meetings(2) + meeting_memos(1) +
     meeting_documents(2) + team_invites(1) 전부 함수 기반으로 재작성
   - supabase db push 완료

3. LoginScreen stale 번들:
   - Phase 1.5에서 import 제거했는데도 vite HMR/cache 어딘가에서
     stale state 유지해서 렌더러에 계속 뜸
   - LoginScreen.tsx 파일 자체 삭제 (vite 컴파일 대상 제거)

로그인 성공 확인: yunchan8804@gmail.com 으로 Google OAuth 완주 →
users/7da3dd02-9f2f-4ee9-a9b3-1c2c24875a93/d3ro.db 생성 → Initial sync 시작.
2026-04-11 11:55:42 +09:00
..
AudioCaptureService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
AutoLaunchService.ts feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
CaptionService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
ChainService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
CloudSyncService.ts fix(desktop+supabase): OAuth 로그인 완주 + RLS 재귀 픽스 (빅뱅 Phase 5 Part 1) 2026-04-11 11:55:42 +09:00
ConfigService.ts feat(desktop): SaaS [4] 온보딩 — Cloud Sync 티저 step + AppConfig 타입 정리 (빅뱅 Phase 2) 2026-04-11 10:16:06 +09:00
CustomInstructionService.ts feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
DictationTemplateService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
DictionaryService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
FileTranscriptionService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
HistoryService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
HotkeyService.ts fix(desktop): hold 핫키 macOS beep 차단 + bootstrap import 누락 픽스 2026-04-11 09:17:01 +09:00
index.ts feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
LicenseService.ts feat(desktop): SaaS [6] 로컬 우선 sync + login_required UI (빅뱅 Phase 3) 2026-04-11 10:35:17 +09:00
LocalLLMService.ts fix(desktop): qwen3 reasoning 모드로 LLM refine 39초 + 빈 응답 2026-04-11 09:28:55 +09:00
LocalSTTService.ts fix(desktop): sidecar 동적 포트 + orphan 프로세스 충돌 방지 2026-04-11 09:20:38 +09:00
LoggerService.ts feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
MeetingDocTemplateService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
MeetingModeService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
MeetingSummaryService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
MemoService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
RAGService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
ScreenContextService.ts feat(V2-5): macOS 빌드 지원 — 플랫폼 분기 + electron-builder mac 타겟 + CI 2026-04-08 15:57:16 +09:00
SoundEffectService.ts feat(V2-5): macOS 빌드 지원 — 플랫폼 분기 + electron-builder mac 타겟 + CI 2026-04-08 15:57:16 +09:00
TextInsertService.ts fix(desktop): macOS 텍스트 붙여넣기 — Cmd+V로 분기 2026-04-11 09:23:04 +09:00
TTSPlaybackService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
VoiceActionService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
VoiceCommandService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
VoiceConversationService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00
VoiceModeService.ts feat(V2-1b): packages/core 추출 — 공유 타입/에러/채널/유틸 분리 2026-04-08 14:39:46 +09:00