Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@eeshm
Copy link
Contributor

@eeshm eeshm commented Nov 28, 2025

What

This PR ensures that running pnpm env-setup automatically includes default Tinybird env variables in the generated .env file:

TINYBIRD_HOST=https://api.tinybird.co
TINYBIRD_TOKEN=

Why

  • Missing Tinybird env variables caused Tinybird initialization to fail during startup.
  • This failed silently inside Effect, resulting in cryptic fiber Die/defect errors and GET / 500.\
  • Adding sane defaults prevents the crash and makes local development work out-of-the-box.

What changed

Added automatic Tinybird configuration to env-setup matching existing patterns for other environment variables.

Testing

  • Run pnpm env-setup
  • Select "Web"
  • Verify .env includes TINYBIRD_HOST and TINYBIRD_TOKEN
  • Run pnpm dev:web - should work without errors

Result

New contributors get a complete .env automatically, Tinybird is disabled locally unless a token is provided, and the “fiber crash” goes away.

Summary by CodeRabbit

  • Chores
    • Enhanced environment configuration setup with sensible defaults for backend service integration, streamlining the initial setup process.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 28, 2025

Walkthrough

The change adds default TinyBird environment variable configuration to the web build target, setting TINYBIRD_HOST to https://api.tinybird.co and TINYBIRD_TOKEN to an empty string if not already defined in the environment.

Changes

Cohort / File(s) Summary
TinyBird Environment Configuration
scripts/env-cli.js
Added default population of TINYBIRD_HOST (https://api.tinybird.co) and TINYBIRD_TOKEN ("") for the web target when not provided in allEnvs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5–10 minutes

  • Verify the default TinyBird URL is correct for the intended environment
  • Confirm that the empty string default for TINYBIRD_TOKEN is the intended behavior (vs. rejecting undefined values or using a placeholder)
  • Ensure this change only applies to the web-target branch as documented

Poem

🐰 A little hop through env so neat,
Default TinyBird config complete!
API host and token in place,
Web builds now have a proper base.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding default Tinybird environment values to the env-setup script, which aligns with the changeset modifications to scripts/env-cli.js.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2330c53 and e3c1c90.

📒 Files selected for processing (1)
  • scripts/env-cli.js (1 hunks)
🔇 Additional comments (2)
scripts/env-cli.js (2)

141-144: LGTM! Proper default handling for TINYBIRD_HOST.

The logic correctly follows the established pattern in the file: checks if the value exists in allEnvs, sets a sensible default if missing, then assigns to the envs object. The default URL matches the PR objectives and prevents the initialization crash described.


146-149: LGTM! Proper default handling for TINYBIRD_TOKEN.

The logic correctly sets an empty string as the default token value, which ensures Tinybird remains disabled locally unless a token is explicitly provided. This aligns perfectly with the PR objective to prevent initialization crashes while keeping Tinybird opt-in for local development.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.