fix(control-center): load Supabase env for direct local dashboard startup - #352
Merged
i-xtsu-sixyou-ken-mei merged 5 commits intoSep 3, 2026
Merged
Conversation
This was referenced Sep 2, 2026
…lose exclusions Move Fly compute run-rate to usage-only (compute_run_rate_monthly) and require operator-recorded billed figure for accrued/projected; keep run-rate as saturation ceiling, not a forecast. Blend early-month OpenRouter/DeBank projections with prior-month daily rate for first 7 days to avoid linear-extrapolation spikes. Extract cost-history aggregation, withhold stale previous-month snapshots from headline totals, and surface excluded providers on Economics/Home KPIs, ProviderLedger and RunwayChart. Switch to light high-contrast operator palette, enforce AI boundary (no LLM inference), and keep collector failures visible even when a manual Fly figure is carried forward.
…ght palette Replace dark-palette literals left after light operator palette switch (.source-sentry #b9a7ff 2.09:1 on #ffffff) with darkened accessible variant and semantic tokens (var(--success)/var(--warning)/var(--ink-faint)), and add missing provider cost-driver panel styles (three-column grid, proportional track, tabular figures) so the economics view renders correctly. Co-Authored-By: internal-model
i-xtsu-sixyou-ken-mei
deleted the
fix/control-center-local-supabase-env
branch
September 3, 2026 02:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Fix local Control Center startup so direct
pnpm ops:dashboardlaunches receive the same Infisical/dev environment aspnpm ops.Without this, the dashboard can boot successfully while
SUPABASE_URLandSUPABASE_SERVICE_ROLE_KEYare absent from the Control Center process, causing Pipeline, Growth, Product, and podcast cost reads to report Supabase as not connected even though Home can still render non-Supabase operational evidence.Context
The root
pnpm opscommand already runs insidescripts/env/run.mjs, which resolves committed dev env plus Infisical secrets before startingscripts/ops.mjs.The standalone
pnpm ops:dashboardcommand previously bypassed that loader and invoked Turbo directly.--env-mode=looseonly preserves variables already present in the parent shell; it does not resolve Infisical itself.The existing
scripts/ops.mjslauncher then routed its dashboard child through the same publicops:dashboardscript. Once the public command becomes env-aware, the full-stack path needs an internal raw command so it does not resolve Infisical twice.Scope
pnpm ops:dashboardrun throughscripts/env/run.mjs.ops:dashboard:rawfor the already-injectedpnpm opslauncher.--env-mode=looseso injected server credentials survive into the Control Center process.Out of scope
Product contract / invariants
Affected invariant:
apps/control-center/src/server/launch-contract.test.tsand the local launch contract documented byscripts/ops.mjs: Infisical-injected credentials must reach the Control Center server through Turbo.Why:
The standalone dashboard entrypoint accidentally skipped the env-resolution half of that contract.
Acceptance criteria
pnpm ops:dashboardresolves dev env throughscripts/env/run.mjsbefore starting Control Center.pnpm opsreuses its already-resolved env instead of resolving Infisical a second time.--env-mode=loose.Implementation
Split the dashboard command into two layers:
ops:dashboard— public local entrypoint; resolves env, then delegates.ops:dashboard:raw— internal Turbo command that assumes env has already been injected.scripts/ops.mjscalls the raw command becausepnpm opsitself is already wrapped byscripts/env/run.mjs.Contract alignment
AGENTS.mdremains accurate.Validation
mainand is 3 commits ahead / 0 behind at PR creation time.Validation gaps
Known unrelated failures
None known.
Reviewer notes
Please scrutinize the two-entrypoint split. The intended invariant is that env resolution happens exactly once:
pnpm ops:dashboard→ public env wrapper → raw Turbo commandpnpm ops→ public env wrapper aroundops.mjs→ raw Turbo command