Skip to content

Fix API key changes across capture and copilot - #30

Open
drukpa1455 wants to merge 2 commits into
video-db:mainfrom
drukpa1455:fix/stale-session-token-after-login
Open

Fix API key changes across capture and copilot#30
drukpa1455 wants to merge 2 commits into
video-db:mainfrom
drukpa1455:fix/stale-session-token-after-login

Conversation

@drukpa1455

@drukpa1455 drukpa1455 commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • validate API key changes and persist them to the authenticated user with the matching VideoDB collection
  • update renderer state only after the server succeeds, then reinitialize the copilot
  • bind cached VideoDB session tokens to both the local account and API key so capture regenerates them when either changes
  • add a regression test and test command

Problem

Changing the API key in Settings only updated the renderer's persisted state. Server routes continued reading the old key from the user database. Separately, the renderer retained a still-valid session token across logout and registration, allowing the recorder to reuse the previous credentials. Restarting happened to clear that in-memory token.

Verification

  • npm test
  • npm run build
  • focused TypeScript check for the changed store and regression test

Full npm run typecheck still reports the existing LiveAssistPanel.tsx:379 and LiveAssistPanel.tsx:392 ref-type errors; this branch does not change that file.

@drukpa1455 drukpa1455 changed the title Fix stale capture token reuse after account change Fix API key changes across capture and copilot Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant