Skip to content

fix(console): add preprod build script#2593

Open
riderx wants to merge 1 commit into
mainfrom
codex/preprod-build-command
Open

fix(console): add preprod build script#2593
riderx wants to merge 1 commit into
mainfrom
codex/preprod-build-command

Conversation

@riderx

@riderx riderx commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

  • add build:preprod so the console can be built with BRANCH=preprod
  • make config selection use exact branch keys like preprod before falling back to prod
  • keeps existing alpha -> development and local behavior

Validation

  • bun run build:preprod
  • generated bundle scan: https://api.capgo.app = 0, https://console.capgo.app = 0, https://api.preprod.capgo.app = 3
  • bun lint exited 0; existing warnings only
  • commit hook: bun run cli:typecheck && bun run typecheck:backend && bun run typecheck:frontend

Note

Low Risk
Small build-script and config-resolution change; wrong keys would only affect preprod bundle URLs, not runtime prod behavior.

Overview
Adds a build:preprod npm script so production Vite builds can run with BRANCH=preprod, matching the existing dev-style build:dev pattern.

Updates getRightKey in scripts/utils.mjs so when BRANCH is a named environment (e.g. preprod), it picks the matching entry from configs.json before defaulting to prod. alpha still maps to development and local is unchanged—this fixes preprod builds that would otherwise bake in production Supabase/API URLs.

Reviewed by Cursor Bugbot for commit dbca8ce. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 146f36f8-72d8-4148-8d99-226bc4ad4766

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@codspeed-hq

codspeed-hq Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing codex/preprod-build-command (dbca8ce) with main (845a149)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sonarqubecloud

Copy link
Copy Markdown

@riderx riderx marked this pull request as ready for review June 29, 2026 20:32
@cursor

cursor Bot commented Jun 29, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_630df52a-1dd3-4718-9cba-230530b8ac10)

@riderx

riderx commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

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