Skip to content

feat(website): introduce DB_ID_SPACE env var for environment-specific collection IDs#1278

Draft
fhennig wants to merge 1 commit into
mainfrom
feat/db-id-space-env-var
Draft

feat(website): introduce DB_ID_SPACE env var for environment-specific collection IDs#1278
fhennig wants to merge 1 commit into
mainfrom
feat/db-id-space-env-var

Conversation

@fhennig

@fhennig fhennig commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Introduces DB_ID_SPACE env var (prod | staging | local) to control which collection IDs the wastewater dashboard uses, replacing the existing isStaging boolean ternaries
  • Adds a byEnv(env, prod, staging, local) helper for readable three-way ID mapping
  • Defaults to prod when DB_ID_SPACE is unset

This should fix the CI issues.

TODO - set the env in the servers repo for prod and staging.

Test plan

  • Set DB_ID_SPACE=local locally and verify resistance mutation collections load correctly on the wastewater dashboard
  • Verify staging deploy picks up DB_ID_SPACE=staging and loads the correct IDs
  • Unit tests pass: vitest run src/types/wastewaterConfig.spec.ts

🤖 Generated with Claude Code

… collection IDs

Wastewater dashboard collection IDs differ between prod, staging, and local
environments. Previously the config used isStaging booleans with hardcoded
ternaries. This introduces DB_ID_SPACE (prod/staging/local) and a byEnv()
helper to make the three-way mapping explicit and readable. Defaults to prod
when unset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboards Ready Ready Preview, Comment Jun 12, 2026 3:45pm

Request Review

@fhennig

fhennig commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@fengelniederhammer I think this might be the way to go.

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