Problem
You can't reliably log into the desktop app, and login must work the same way as Director's Palette — same everything. Login is also a prerequisite for the AI agent to authenticate and read/act on your project (timeline, generations) to help you test.
Current state (verified in code)
- Email/password login exists (Settings → Palette Connection) and authenticates against DP's Supabase project, storing a JWT + refresh token.
frontend/components/SettingsModal.tsx (login UI), backend/handlers/sync_handler.py, backend/services/palette_sync_client/palette_sync_client_impl.py.
dp_ API-key login is broken — palette_sync_client_impl.py returns a 404 ("dp_ keys not supported yet") because it validates against Supabase directly instead of DP's already-deployed /api/desktop/me endpoint.
- No Google sign-in on the desktop, even though directorspal.com supports Google OAuth (
directors-palette-v2/src/features/auth/services/auth.service.ts) plus email/password, both via Supabase.
- DP already exposes
authenticateDesktopRequest (accepts a dp_ key or a Supabase JWT) and /api/desktop/me (directors-palette-v2/src/lib/auth/desktop-auth.ts).
Goal — login parity with Director's Palette
- Same methods as the web: email/password and Google OAuth, against the same Supabase project, so the same account/credentials work.
- Fix the
dp_ API-key path by validating against DP's existing https://directorspal.com/api/desktop/me (it already accepts both dp_ keys and JWTs) instead of hitting Supabase directly.
- Persistent session — store + auto-refresh the token so the user stays logged in across restarts (refresh-token handling already exists).
- Agent login — a logged-in (or
dp_-keyed) session must let the AI agent authenticate headlessly to call /api/generations and (future) the timeline/project read API, so it can help test and act on the project.
Investigate first
- Reproduce the exact failure: does email/password fail, or is the user pasting a
dp_ key (the stubbed path)? Capture the error.
Files
Desktop: frontend/components/SettingsModal.tsx, backend/_routes/sync.py, backend/handlers/sync_handler.py, backend/services/palette_sync_client/palette_sync_client_impl.py, backend/state/app_settings.py (palette_api_key, palette_refresh_token).
DP: src/lib/auth/desktop-auth.ts, src/app/api/desktop/me/route.ts, src/features/auth/services/auth.service.ts.
Done when
A user signs in with the same credentials and methods as directorspal.com (including Google), the session persists across restarts, a dp_ key also works, and the AI agent can authenticate to query generations/timeline.
Problem
You can't reliably log into the desktop app, and login must work the same way as Director's Palette — same everything. Login is also a prerequisite for the AI agent to authenticate and read/act on your project (timeline, generations) to help you test.
Current state (verified in code)
frontend/components/SettingsModal.tsx(login UI),backend/handlers/sync_handler.py,backend/services/palette_sync_client/palette_sync_client_impl.py.dp_API-key login is broken —palette_sync_client_impl.pyreturns a 404 ("dp_ keys not supported yet") because it validates against Supabase directly instead of DP's already-deployed/api/desktop/meendpoint.directors-palette-v2/src/features/auth/services/auth.service.ts) plus email/password, both via Supabase.authenticateDesktopRequest(accepts adp_key or a Supabase JWT) and/api/desktop/me(directors-palette-v2/src/lib/auth/desktop-auth.ts).Goal — login parity with Director's Palette
dp_API-key path by validating against DP's existinghttps://directorspal.com/api/desktop/me(it already accepts bothdp_keys and JWTs) instead of hitting Supabase directly.dp_-keyed) session must let the AI agent authenticate headlessly to call/api/generationsand (future) the timeline/project read API, so it can help test and act on the project.Investigate first
dp_key (the stubbed path)? Capture the error.Files
Desktop:
frontend/components/SettingsModal.tsx,backend/_routes/sync.py,backend/handlers/sync_handler.py,backend/services/palette_sync_client/palette_sync_client_impl.py,backend/state/app_settings.py(palette_api_key,palette_refresh_token).DP:
src/lib/auth/desktop-auth.ts,src/app/api/desktop/me/route.ts,src/features/auth/services/auth.service.ts.Done when
A user signs in with the same credentials and methods as directorspal.com (including Google), the session persists across restarts, a
dp_key also works, and the AI agent can authenticate to query generations/timeline.