Skip to content

Make v3 code compatible with Cloudflare workers for web deployments#1616

Merged
unknownskl merged 26 commits into
main-v2from
feature/cloudflare-worker-deployment
May 24, 2026
Merged

Make v3 code compatible with Cloudflare workers for web deployments#1616
unknownskl merged 26 commits into
main-v2from
feature/cloudflare-worker-deployment

Conversation

@unknownskl
Copy link
Copy Markdown
Owner

This pull request introduces major improvements to authentication, workflow, and workspace management for the desktop-v3 app. The most significant changes are the implementation of a complete authentication context with device code flow, integration of tRPC for backend communication via IPC, and updates to the monorepo and build workflows to support new packages and deployment flows.

Authentication and User Context:

  • Added a comprehensive AuthContext in renderer/contexts/AuthContext.tsx to manage authentication state, device code flow, token retrieval, and logout logic, with persistent storage and React context for easy access throughout the app.
  • Updated the sidebar and main app layout to display the authenticated user's gamertag, provide a logout option, and protect routes based on authentication state. [1] [2] [3]
  • Implemented an authentication page (auth/home.tsx) that handles device code login flow and displays a QR code for user authentication.

tRPC Integration and IPC Communication:

  • Integrated tRPC for type-safe backend communication, exposing a trpcIpc handler via Electron's IPC and wiring it up in both the main and preload scripts. [1] [2] [3] [4]
  • Added necessary tRPC and related dependencies to package.json and configured the workspace to include the shared platform package.

Monorepo and Build Workflow Updates:

  • Expanded the monorepo structure to include a new pages package and updated workspace and build scripts to support building and deploying the new package.
  • Broadened GitHub Actions workflow triggers and build steps to cover all packages, not just desktop-related ones, and improved build step naming for clarity. [1] [2] [3] [4]
  • Updated .gitignore to exclude .wrangler/ artifacts in the desktop-v3 package.

These changes collectively modernize the authentication flow, improve code maintainability, and set up the project for easier scaling and deployment.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16]

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
greenlight ff79467 May 24 2026, 02:49 PM

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
23.5% Duplication on New Code (required ≤ 4%)

See analysis details on SonarQube Cloud

@unknownskl unknownskl merged commit d8ef47b into main-v2 May 24, 2026
36 of 37 checks passed
@unknownskl unknownskl deleted the feature/cloudflare-worker-deployment branch May 24, 2026 15:07
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