Skip to content

fix: register OAuth handler and guard activation awaits#12

Merged
MarcelRoozekrans merged 2 commits intomainfrom
fix/proposed-api-guard
Mar 22, 2026
Merged

fix: register OAuth handler and guard activation awaits#12
MarcelRoozekrans merged 2 commits intomainfrom
fix/proposed-api-guard

Conversation

@MarcelRoozekrans
Copy link
Copy Markdown
Contributor

Summary

  • Register URI handler for OAuth callback — the vscode://lucent-code/oauth-callback redirect had no handler, so "Open App" on OpenRouter did nothing
  • Guard all activate() awaitsloadSkills(), connectMcpServers(), and instructionsLoader.load() were unguarded; any network error or bad config would crash activation and show a blank panel

Test plan

  • 370 unit tests pass
  • Extension builds cleanly
  • OAuth flow: Sign in with OpenRouter → authorize → "Open App" redirects back and saves key
  • Extension activates even with no network / bad MCP config

🤖 Generated with Claude Code

MarcelRoozekrans and others added 2 commits March 22, 2026 19:37
The OAuth flow opens OpenRouter in the browser, but after authorizing,
the vscode://lucent-code/oauth-callback redirect had no handler registered.
Added registerUriHandler so the callback is received and the API key is
exchanged and stored automatically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
loadSkills(), connectMcpServers(), and instructionsLoader.load() were
unguarded awaits in activate(). If any threw (e.g. network error, bad
MCP config, missing file), the entire extension would fail to activate
and the webview panel would be blank.

All three now have .catch() handlers that log a warning and continue,
so the core chat functionality always comes up.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 22, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
lucent-code 60dce9c Commit Preview URL

Branch Preview URL
Mar 22 2026, 06:38 PM

@MarcelRoozekrans MarcelRoozekrans merged commit b5d2e0e into main Mar 22, 2026
3 checks passed
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