Skip to content

fix(ci): target staging environment for desktop release builds#464

Merged
FSM1 merged 3 commits into
mainfrom
fix/desktop-release-staging-env
May 26, 2026
Merged

fix(ci): target staging environment for desktop release builds#464
FSM1 merged 3 commits into
mainfrom
fix/desktop-release-staging-env

Conversation

@FSM1

@FSM1 FSM1 commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Desktop release workflow was using the production GitHub environment which has no vars configured
  • This caused empty VITE_API_URL (Rust backend fell back to localhost:3000) and empty VITE_GOOGLE_CLIENT_ID (Google OAuth failed)
  • Also caused the Web3Auth network mismatch (VITE_ENVIRONMENT=production mapped to MAINNET, but the client ID is registered on sapphire_devnet)
  • Switch all three build jobs (macOS, Windows, Linux) to use the staging environment, STAGING_API_URL, and VITE_ENVIRONMENT=staging

Supersedes #462 — the NETWORK_MAP code change is no longer needed since staging already maps to DEVNET.

Test plan

  • CI desktop build completes successfully
  • Built binary connects to staging API (not localhost)
  • Google OAuth login works
  • Email OTP login works
  • Web3Auth initializes without network mismatch error

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated internal deployment configurations for build processes.

Review Change Stack

Desktop releases should use the staging environment and API until a
production deployment is set up. This fixes missing env vars
(GOOGLE_CLIENT_ID, API_URL) that caused login failures in production
binaries, and also resolves the Web3Auth network mismatch since staging
maps to DEVNET which matches the client ID registration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 45316dc217a8
Copilot AI review requested due to automatic review settings May 26, 2026 12:44
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@FSM1, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 54 minutes and 3 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1f3a2013-1803-448d-a579-d342e0f4a610

📥 Commits

Reviewing files that changed from the base of the PR and between a990f58 and 702138b.

📒 Files selected for processing (1)
  • .github/workflows/desktop-staging-release.yml

Walkthrough

The Desktop Release workflow is updated to build desktop binaries against the staging environment instead of production. All three platform jobs (macOS, Windows, Linux) have their environment setting and build-time variables (VITE_API_URL, VITE_ENVIRONMENT) switched to staging sources.

Changes

Desktop Release Workflow Staging Configuration

Layer / File(s) Summary
Switch all build platforms from production to staging environment
.github/workflows/desktop-release.yml
macOS, Windows, and Linux build jobs each changed their environment from production to staging, with corresponding VITE_API_URL and VITE_ENVIRONMENT build variables updated to staging values.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • FSM1/cipher-box#370: Updates staging desktop CI workflow build jobs with Tauri signing key secrets for staging builds.
  • FSM1/cipher-box#155: Adjusts desktop build workflows to use staging VITE_* environment values for desktop binary production.
  • FSM1/cipher-box#425: Updates Rust to fall back to compile-time VITE_API_URL, directly affected by this workflow's staging environment variable changes.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: switching desktop release builds from production to staging environment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/desktop-release-staging-env

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Targets the staging GitHub environment for the desktop release workflow so that release builds are compiled with the correct Vite env vars (API URL, Google OAuth client ID context, and Web3Auth network selection), avoiding fallbacks to localhost and Web3Auth network mismatch.

Changes:

  • Switched macOS/Windows/Linux desktop release jobs to use the staging GitHub Actions environment.
  • Updated build-time Vite variables to use vars.STAGING_API_URL and VITE_ENVIRONMENT=staging across all three jobs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: efb07ddb8f56
@github-actions

Copy link
Copy Markdown
Contributor

Release Preview

No version bumps detected. All changes are in unversioned paths or use exempt commit types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: bb337ece2327
@codecov

codecov Bot commented May 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.34%. Comparing base (1318138) to head (702138b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #464      +/-   ##
==========================================
- Coverage   62.37%   62.34%   -0.03%     
==========================================
  Files         135      135              
  Lines       10157    10157              
  Branches     1083     1081       -2     
==========================================
- Hits         6335     6332       -3     
- Misses       3598     3601       +3     
  Partials      224      224              
Flag Coverage Δ
api 84.67% <ø> (-0.06%) ⬇️
api-client 84.67% <ø> (-0.06%) ⬇️
core 84.67% <ø> (-0.06%) ⬇️
crypto 84.67% <ø> (-0.06%) ⬇️
sdk 84.67% <ø> (-0.06%) ⬇️
sdk-core 84.67% <ø> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@FSM1 FSM1 enabled auto-merge (squash) May 26, 2026 12:53
@FSM1 FSM1 merged commit cb5458d into main May 26, 2026
26 checks passed
@FSM1 FSM1 deleted the fix/desktop-release-staging-env branch May 26, 2026 12:54
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.

2 participants