Skip to content

Conversation

@brendan-kellam
Copy link
Contributor

@brendan-kellam brendan-kellam commented Feb 10, 2026

This PR deletes some things:

  • Removes the deploy-demo github action
  • Removes the NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT environment variable
  • Removes the cloud:team and cloud:demo plans

It also adds SOURCEBOT_TELEMETRY_PII_COLLECTION_ENABLED (default false) so we can capture higher fidelity telemetry in our cloud environments.

Summary by CodeRabbit

  • New Features

    • Telemetry privacy controls: SOURCEBOT_TELEMETRY_PII_COLLECTION_ENABLED and SOURCEBOT_TELEMETRY_DISABLED; analytics now respect PII settings.
  • Bug Fixes

    • License page and Settings menu item always available.
    • Authentication security notice consistently displayed.
  • Chores

    • Removed demo/cloud-specific environment/configuration and related deployment workflows.
    • Cloud/demo plan entries removed from plan selection and UI.

@github-actions
Copy link
Contributor

@brendan-kellam your pull request is missing a changelog!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 10, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

Removes NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT and cloud-specific plans/workflows; deletes GCP demo deploy workflows; refactors plan selection to rely on license keys; adds telemetry flags and PII control; updates telemetry/analytics wiring and removes environment-gated UI/behavior.

Changes

Cohort / File(s) Summary
Env & Build
/.env.development, Dockerfile, packages/shared/src/constants.ts, packages/shared/src/env.client.ts
Removed NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT from env, build args, constants and client env schema/runtime mapping.
CI/CD Workflows
.github/workflows/_gcp-deploy.yml, .github/workflows/deploy-demo.yml
Deleted reusable GCP deployment workflow and demo deployment workflow.
Entitlements & Server Env
packages/shared/src/entitlements.ts, packages/shared/src/env.server.ts
Removed cloud-specific plans (cloud:team, cloud:demo), updated Plan and getPlan() to derive plan from license key only; added SOURCEBOT_TELEMETRY_DISABLED and SOURCEBOT_TELEMETRY_PII_COLLECTION_ENABLED server env flags.
Telemetry / Analytics
packages/web/src/app/layout.tsx, packages/web/src/app/posthogProvider.tsx, packages/web/src/features/chat/agent.ts
Added isPiiEnabled prop to PostHog provider and wiring; denylist behavior and identify calls now respect isPiiEnabled; telemetry enablement checks switched to SOURCEBOT_TELEMETRY_PII_COLLECTION_ENABLED.
UI — Settings & License
packages/web/src/app/[domain]/settings/layout.tsx, packages/web/src/app/[domain]/settings/license/page.tsx
Made License menu item and license page accessible unconditionally by removing environment-based guards and imports.
UI — Conditional Demo/Notices
packages/web/src/app/[domain]/components/repositoryCarousel.tsx, packages/web/src/app/components/authSecurityNotice.tsx, packages/web/src/features/chat/components/chatThread/answerCard.tsx
Removed demo-only UI blocks and environment render guards; Langfuse initialization no longer gated by cloud env (now depends only on public key presence).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • msukkari
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ 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%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 'chore(web): Remove cloud plans' directly and clearly summarizes the main objective of the PR—removing cloud-related infrastructure and plans while maintaining accuracy about the scope.

✏️ 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 bkellam/pii-telem

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.

@brendan-kellam
Copy link
Contributor Author

brendan-kellam commented Feb 10, 2026

@brendan-kellam your pull request is missing a changelog!

skipping since this doesn't impact any user facing stuff.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/web/src/app/[domain]/settings/layout.tsx (1)

14-14: ⚠️ Potential issue | 🟡 Minor

Remove unused import: env from @sourcebot/shared/client.

The env import on line 14 is no longer used in this file since the NEXT_PUBLIC_SOURCEBOT_CLOUD_ENVIRONMENT check was removed.

🧹 Nitpick comments (1)
packages/web/src/app/posthogProvider.tsx (1)

52-86: Re-initialization concern when isPiiEnabled is added to the dependency array.

posthog.init() is designed to be called once. Adding isPiiEnabled to the dependency array means if it ever changed, init() would be called again. While this won't happen in practice (env vars are static), calling posthog.init() multiple times with different configs (e.g., different property_denylist) may not update the running instance as expected—PostHog typically ignores subsequent init() calls.

In practice this is a non-issue since the env var is static per deployment, but worth being aware of.

@claude
Copy link

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@brendan-kellam brendan-kellam merged commit 42e50d5 into main Feb 10, 2026
9 of 10 checks passed
@brendan-kellam brendan-kellam deleted the bkellam/pii-telem branch February 10, 2026 03:21
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