Skip to content

fix(docs): remove unused billing env vars that break search API#1467

Merged
Kitenite merged 1 commit into
mainfrom
kitenite/egg
Feb 13, 2026
Merged

fix(docs): remove unused billing env vars that break search API#1467
Kitenite merged 1 commit into
mainfrom
kitenite/egg

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Feb 13, 2026

Summary

  • Removed unused billing env vars (SLACK_BILLING_WEBHOOK_URL, Stripe keys) from the docs app's env.ts
  • SLACK_BILLING_WEBHOOK_URL was required (non-optional) but never set in the Vercel deployment, causing the Sentry instrumentation hook to crash on startup
  • This made all server-rendered routes — including /api/search — return 500, completely breaking docs search

Test plan

  • Deploy to Vercel preview and verify /api/search?query=workspace returns results instead of 500
  • Verify search dialog works on docs site

Summary by CodeRabbit

  • Chores
    • Removed five server environment variables related to payments and billing, simplifying deployment and reducing required configuration.
  • Tests
    • Stabilized terminal-related tests by consolidating mocks to avoid duplicate registrations and flaky CI.
    • Added test setup stubs for database/ORM imports to prevent runtime crashes during test runs.

SLACK_BILLING_WEBHOOK_URL was required (non-optional) in the docs env
config but never set in the Vercel deployment. This caused the Sentry
instrumentation hook to crash on startup, making all server-rendered
routes (including /api/search) return 500.

Removed all billing-related env vars (Stripe, Slack webhook) since
they were copy-pasted from the web app and unused in the docs site.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Removes five server-scoped environment keys from apps/docs/src/env.ts, relocates local-db mocks to global test setup, and adds drizzle-orm stubs and a focused main/lib/terminal mock to stabilize desktop tests.

Changes

Cohort / File(s) Summary
Environment Configuration
apps/docs/src/env.ts
Removed server-scoped env keys: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRO_MONTHLY_PRICE_ID, STRIPE_PRO_YEARLY_PRICE_ID, SLACK_BILLING_WEBHOOK_URL. SENTRY_AUTH_TOKEN remains.
Desktop Terminal Tests
apps/desktop/src/lib/trpc/routers/terminal/terminal.stream.test.ts
Removed inline mocks for @superset/local-db / main/lib/local-db (now globally mocked); retained focused mock for main/lib/terminal (getDaemonTerminalManager) and added explanatory comments.
Test Setup / Drizzle stubs
apps/desktop/test-setup.ts, package.json
Added chainable proxy-based stubs for drizzle-orm and drizzle-orm/sqlite-core exports to prevent runtime crashes when Bun re-resolves modules; updated test setup to host global mocks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • saddlepaddle

Poem

🐰 I hopped through envs and gently pruned,

Five tiny secrets the garden rued.
Tests now sleep beneath a shared mock tree,
Drizzle stubs hum softly for Bun and me,
Repos and carrots—both tidy and cheered. 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is missing required template sections (Related Issues, Type of Change, Testing, Screenshots, Additional Notes) and only includes a custom summary format rather than following the provided template structure. Restructure the description to follow the template: add Related Issues section with relevant issue links, check Type of Change box, expand Testing section with verification steps, and include any Additional Notes section as needed.
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (31 files):

⚔️ .github/workflows/deploy-preview.yml (content)
⚔️ .github/workflows/deploy-production.yml (content)
⚔️ apps/api/src/env.ts (content)
⚔️ apps/desktop/src/lib/trpc/routers/projects/projects.ts (content)
⚔️ apps/desktop/src/lib/trpc/routers/terminal/terminal.stream.test.ts (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/collections.ts (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/settings/components/SettingsSidebar/ProjectsSettings.tsx (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/settings/layout.tsx (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/settings/project/$projectId/components/ProjectSettings/ProjectSettings.tsx (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/settings/project/$projectId/components/ProjectSettings/index.ts (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/settings/project/$projectId/page.tsx (content)
⚔️ apps/desktop/src/renderer/routes/_authenticated/settings/utils/settings-search/settings-search.ts (content)
⚔️ apps/desktop/src/renderer/stores/settings-state.ts (content)
⚔️ apps/desktop/src/shared/tabs-types.ts (content)
⚔️ apps/desktop/test-setup.ts (content)
⚔️ apps/docs/src/env.ts (content)
⚔️ apps/mobile/lib/collections/collections.ts (content)
⚔️ packages/db/drizzle/meta/0018_snapshot.json (content)
⚔️ packages/db/drizzle/meta/_journal.json (content)
⚔️ packages/db/src/schema/enums.ts (content)
⚔️ packages/db/src/schema/index.ts (content)
⚔️ packages/db/src/schema/relations.ts (content)
⚔️ packages/db/src/schema/schema.ts (content)
⚔️ packages/local-db/drizzle/meta/_journal.json (content)
⚔️ packages/local-db/src/schema/schema.ts (content)
⚔️ packages/shared/src/constants.ts (content)
⚔️ packages/trpc/src/env.ts (content)
⚔️ packages/trpc/src/root.ts (content)
⚔️ packages/trpc/src/router/organization/organization.ts (content)
⚔️ packages/trpc/src/router/task/schema.ts (content)
⚔️ packages/trpc/src/router/task/task.ts (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically addresses the main change: removing unused billing environment variables from the docs app that were breaking the search API.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kitenite/egg
⚔️ Resolve merge conflicts (beta)
  • Auto-commit resolved conflicts to branch kitenite/egg
  • Create stacked PR with resolved conflicts
  • Post resolved changes as copyable diffs in a comment

No actionable comments were generated in the recent review. 🎉


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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 13, 2026

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Fly.io Electric (Fly.io) View App
Fly.io Streams (Fly.io) View App
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

@Kitenite Kitenite merged commit 452e8a3 into main Feb 13, 2026
18 of 20 checks passed
@Kitenite Kitenite deleted the kitenite/egg branch February 13, 2026 21:10
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