Skip to content

Update Ours#1130

Closed
sudipta26889 wants to merge 8 commits intoelie222:mainfrom
sudipta26889:main
Closed

Update Ours#1130
sudipta26889 wants to merge 8 commits intoelie222:mainfrom
sudipta26889:main

Conversation

@sudipta26889
Copy link

@sudipta26889 sudipta26889 commented Dec 22, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Added privacy mode to disable all tracking, analytics, and telemetry features
    • Improved Docker deployment with runtime environment configuration instead of build-time arguments
    • Added local development guide for easier setup
  • Documentation

    • Updated privacy policy and terms with generic contact information
    • Revised Docker build guide for runtime configuration approach
    • Updated README with streamlined setup instructions
  • Infrastructure

    • Enhanced CI/CD workflows with security scanning and code analysis
    • Improved error handling and type safety across the application
    • Optimized Redis caching with graceful fallback support

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

@vercel
Copy link

vercel bot commented Dec 22, 2025

@sudipta26889 is attempting to deploy a commit to the Inbox Zero OSS Program Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR implements a comprehensive privacy mode feature, refactors environment configuration to support runtime settings, updates Docker build workflows, improves type safety throughout the codebase, and introduces CORS middleware. The changes consolidate tracking/analytics disabling, switch from build-time to runtime environment variable resolution, and modernize several internal utilities.

Changes

Cohort / File(s) Summary
Privacy Mode Feature
apps/unsubscriber/src/main.ts, apps/web/app/layout.tsx, apps/web/components/CrispChat.tsx, apps/web/instrumentation.ts, apps/web/instrumentation-client.ts, apps/web/providers/PostHogProvider.tsx, apps/web/utils/ai/mcp/mcp-tools.ts, apps/web/utils/auth.ts, apps/web/utils/dub.ts, apps/web/utils/fb.ts, apps/web/utils/gtm.ts, apps/web/utils/llms/index.ts, apps/web/utils/llms/model.ts, apps/web/utils/logger.ts, apps/web/utils/posthog.ts, apps/web/utils/upstash/index.ts, packages/tinybird-ai-analytics/src/publish.ts, packages/tinybird/src/publish.ts
Added PRIVACY_MODE environment flags and conditional logic to disable AI analysis, analytics, tracking (PostHog, GTM, Facebook, Dub), logging, and data collection services when privacy mode is enabled.
Environment Variable Configuration
apps/web/env.ts, apps/web/app/(landing)/home/CTAButtons.tsx, apps/web/app/(landing)/home/FAQs.tsx, apps/web/app/(landing)/home/Footer.tsx, apps/web/app/(landing)/home/Header.tsx, apps/web/app/(landing)/oss-friends/page.tsx, apps/web/app/(landing)/privacy/content.mdx, apps/web/app/(landing)/terms/content.mdx, apps/web/app/(landing)/error.tsx, apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx, apps/web/app/(app)/premium/config.ts, apps/web/components/SideNav.tsx, apps/web/ee/billing/stripe/index.ts, apps/web/utils/config.ts
Added and updated environment variables (NEXT_PUBLIC_SALES_URL, NEXT_PUBLIC_DOCS_URL, NEXT_PUBLIC_GITHUB_URL, NEXT_PUBLIC_DISCORD_URL, etc.) and replaced hardcoded URLs with dynamic environment-driven values with fallbacks. Updated contact/support email addresses.
Runtime Environment Configuration
apps/web/next.config.ts, apps/web/app/api/digest-preview/route.ts, docker-compose.yml, docker/DOCKER_BUILD_GUIDE.md, docker/Dockerfile.prod, docs/hosting/docker.md, packages/resend/emails/digest.tsx, packages/resend/emails/invitation.tsx, packages/resend/emails/summary.tsx, packages/resend/src/send.tsx
Moved NEXT_PUBLIC_BASE_URL from build-time argument to runtime configuration. Updated Docker Compose to build locally instead of pulling pre-built image. Modified email templates to use runtime base URL. Updated Docker build guide to emphasize runtime environment over build arguments.
Docker and CI Workflows
.github/workflows/build.yml, .github/workflows/build_and_publish_docker.yml, .github/workflows/claude.yml, .github/workflows/claude-code-review.yml, .github/workflows/codeql.yml, .github/workflows/security-scan.yml, .github/workflows/test.yml, .dockerignore, portainer-stack.yaml
Added new build-and-push workflow for multi-arch Docker image building. Added CodeQL and Trivy security scanning workflows. Removed old build_and_publish_docker.yml, Claude code review workflows, and test workflow. Added .dockerignore file. Added Portainer Docker stack configuration.
QStash Verification Refactoring
apps/web/app/api/ai/digest/route.ts, apps/web/app/api/clean/gmail/route.ts, apps/web/app/api/clean/route.ts, apps/web/app/api/resend/digest/route.ts, apps/web/app/api/scheduled-actions/execute/route.ts, apps/web/app/api/user/categorize/senders/batch/route.ts, apps/web/utils/qstash.ts
Introduced verifyQstashAtRequestTime utility for request-time QStash signature verification and replaced all usages of verifySignatureAppRouter with the new utility across API routes.
Type Safety Improvements
apps/web/app/(app)/error.tsx, apps/web/app/(landing)/error.tsx, apps/web/app/(app)/[emailAccountId]/smart-categories/CategorizeWithAiButton.tsx, apps/web/hooks/useApiKeys.ts, apps/web/hooks/useEmailAccountFull.ts, apps/web/hooks/useUser.ts, apps/web/utils/error.ts, apps/web/utils/types.ts, apps/web/utils/swr.ts
Narrowed types from any to more specific types (unknown, Error, proper generics). Updated error handling with better type guards. Enhanced SWR hook typing and error response handling.
Error Handling Enhancements
apps/web/utils/error.ts
Refactored error utilities with safer type guards (isError, isErrorMessage now accept unknown). Added formatGmailError function for structured Gmail error extraction. Updated Sentry capturing to respect privacy mode. Improved error message derivation in ErrorBoundary components.
State and Caching
apps/web/utils/redis/index.ts, apps/web/utils/redis/account-validation.ts, apps/web/hooks/useSetupProgress.ts
Introduced proxy-based lazy initialization for Redis client. Added best-effort Redis caching with graceful fallback to database on failure. Updated useSetupProgress hook to process SWR response.
URL and Link Handling
apps/web/__tests__/e2e/gmail-operations.test.ts, apps/web/__tests__/e2e/outlook-operations.test.ts, apps/web/__tests__/helpers.ts, apps/web/__tests__/determine-thread-status.test.ts, apps/web/components/Button.tsx
Added E2E test URL helpers (getBaseUrl, url). Updated test URLs to use helper functions. Added prefetch=false for external links in Button component.
API and Config
apps/web/app/api/v1/openapi/route.ts, apps/web/app/(app)/[emailAccountId]/stats/DetailedStats.tsx, apps/web/app/(app)/[emailAccountId]/stats/EmailAnalytics.tsx, apps/web/app/(app)/[emailAccountId]/stats/NewsletterModal.tsx, apps/web/app/(app)/[emailAccountId]/stats/StatsSummary.tsx, apps/web/utils/auth-client.ts
Made OpenAPI server URLs dynamic. Refactored query parameter construction using explicit URLSearchParams for safer handling. Removed hardcoded baseURL from auth client.
Middleware and Request Handling
apps/web/middleware.ts
Added new Next.js middleware for CORS handling with origin validation and preflight support.
Build and Package Configuration
apps/web/package.json, apps/web/scripts/build.mjs
Updated build script to use custom Node.js script (build.mjs) for orchestrated Prisma migration and Next.js build with optional skip flag.
Documentation
LOCAL_RUN.md, README.md, LICENSE
Added comprehensive local development guide. Updated README with runtime configuration guidance and removed build-arg requirements. Updated license contact information.
Routing
apps/web/app/(app)/[emailAccountId]/assistant/page.tsx
Changed onboarding redirect from query parameter ?onboarding=true to dedicated route /assistant/onboarding.
Unused Variable Cleanup
apps/web/app/api/sso/signin/route.test.ts, apps/web/utils/ai/report/analyze-email-behavior.ts, apps/web/utils/ai/report/analyze-label-optimization.ts, apps/web/utils/ai/report/generate-actionable-recommendations.ts, apps/web/utils/ai/report/generate-executive-summary.ts, apps/web/utils/ai/report/response-patterns.ts, apps/web/utils/schedule.test.ts
Renamed unused logger and variable references to prefixed-underscore convention.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60–90 minutes

  • Scope & heterogeneity: 70+ files across multiple domains (privacy feature, configuration, Docker CI, type safety, error handling, caching) with distinct reasoning required for each cohort.
  • Logic density: Several files contain intricate refactoring—particularly apps/web/utils/error.ts (new formatGmailError, type guards, privacy mode checks), apps/web/utils/swr.ts (generic type narrowing and error handling restructure), apps/web/utils/redis/index.ts (proxy-based lazy initialization pattern), and apps/web/middleware.ts (new CORS logic).
  • Critical areas requiring extra attention:
    • apps/web/utils/error.ts – Type narrowing (unknown), new formatGmailError implementation, and integration with Sentry privacy checks.
    • apps/web/utils/swr.ts – Generic parameter changes and error response handling; verify backward compatibility and type inference.
    • apps/web/utils/redis/index.ts – Proxy-based initialization; verify lazy loading works correctly and doesn't break concurrent access.
    • apps/web/middleware.ts – New CORS middleware; verify origin matching, header handling, and preflight responses align with security requirements.
    • Privacy mode consistency – Check that all privacy-mode guards across 15+ files are semantically consistent and don't inadvertently expose analytics/tracking.
    • QStash verification refactoring – Ensure verifyQstashAtRequestTime properly initializes config at request time across all API routes.
    • Docker runtime environment – Verify NEXT_PUBLIC_BASE_URL is correctly resolved at runtime in all contexts (email templates, API responses, frontend URLs).

Possibly related PRs

  • Remove publish docker #424 – Related Docker image CI workflows; replaces the old build-and-publish workflow with a new build-and-push workflow.
  • Fix dockerfile #694 – Related Docker/Dockerfile changes for NEXT_PUBLIC_BASE_URL configuration; shifts from build-time ARG to runtime environment handling.
  • WIP: better-auth migration #632 – Related code-level changes to apps/web/utils/auth.ts; both modify the authentication sign-in flow with privacy and early-return guards.

Poem

🐰 A Privacy-Conscious Hop

With privacy guards and runtime care,
We hid the URLs everywhere,
Redis now lazy, CORS in place,
Types refined with unknown grace—
Config flows free, no secrets baked,
A safer path forward we've taken! 🛡️

✨ 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2785c48 and 189566a.

📒 Files selected for processing (95)
  • .dockerignore
  • .github/workflows/build.yml
  • .github/workflows/build_and_publish_docker.yml
  • .github/workflows/claude-code-review.yml
  • .github/workflows/claude.yml
  • .github/workflows/codeql.yml
  • .github/workflows/security-scan.yml
  • .github/workflows/test.yml
  • LICENSE
  • LOCAL_RUN.md
  • README.md
  • apps/unsubscriber/src/main.ts
  • apps/web/__tests__/determine-thread-status.test.ts
  • apps/web/__tests__/e2e/gmail-operations.test.ts
  • apps/web/__tests__/e2e/outlook-operations.test.ts
  • apps/web/__tests__/helpers.ts
  • apps/web/app/(app)/[emailAccountId]/assistant/page.tsx
  • apps/web/app/(app)/[emailAccountId]/bulk-unsubscribe/BulkUnsubscribeSection.tsx
  • apps/web/app/(app)/[emailAccountId]/smart-categories/CategorizeWithAiButton.tsx
  • apps/web/app/(app)/[emailAccountId]/stats/DetailedStats.tsx
  • apps/web/app/(app)/[emailAccountId]/stats/EmailAnalytics.tsx
  • apps/web/app/(app)/[emailAccountId]/stats/NewsletterModal.tsx
  • apps/web/app/(app)/[emailAccountId]/stats/StatsSummary.tsx
  • apps/web/app/(app)/error.tsx
  • apps/web/app/(app)/premium/config.ts
  • apps/web/app/(landing)/error.tsx
  • apps/web/app/(landing)/home/CTAButtons.tsx
  • apps/web/app/(landing)/home/FAQs.tsx
  • apps/web/app/(landing)/home/Footer.tsx
  • apps/web/app/(landing)/home/Header.tsx
  • apps/web/app/(landing)/home/Testimonials.tsx
  • apps/web/app/(landing)/oss-friends/page.tsx
  • apps/web/app/(landing)/privacy/content.mdx
  • apps/web/app/(landing)/terms/content.mdx
  • apps/web/app/api/ai/digest/route.ts
  • apps/web/app/api/clean/gmail/route.ts
  • apps/web/app/api/clean/route.ts
  • apps/web/app/api/digest-preview/route.ts
  • apps/web/app/api/resend/digest/route.ts
  • apps/web/app/api/scheduled-actions/execute/route.ts
  • apps/web/app/api/sso/signin/route.test.ts
  • apps/web/app/api/user/categorize/senders/batch/route.ts
  • apps/web/app/api/v1/openapi/route.ts
  • apps/web/app/layout.tsx
  • apps/web/components/Button.tsx
  • apps/web/components/CrispChat.tsx
  • apps/web/components/SideNav.tsx
  • apps/web/ee/billing/stripe/index.ts
  • apps/web/env.ts
  • apps/web/hooks/useApiKeys.ts
  • apps/web/hooks/useEmailAccountFull.ts
  • apps/web/hooks/useSetupProgress.ts
  • apps/web/hooks/useUser.ts
  • apps/web/instrumentation-client.ts
  • apps/web/instrumentation.ts
  • apps/web/middleware.ts
  • apps/web/next.config.ts
  • apps/web/package.json
  • apps/web/providers/PostHogProvider.tsx
  • apps/web/scripts/build.mjs
  • apps/web/utils/ai/mcp/mcp-tools.ts
  • apps/web/utils/ai/report/analyze-email-behavior.ts
  • apps/web/utils/ai/report/analyze-label-optimization.ts
  • apps/web/utils/ai/report/generate-actionable-recommendations.ts
  • apps/web/utils/ai/report/generate-executive-summary.ts
  • apps/web/utils/ai/report/response-patterns.ts
  • apps/web/utils/auth-client.ts
  • apps/web/utils/auth.ts
  • apps/web/utils/config.ts
  • apps/web/utils/dub.ts
  • apps/web/utils/error.ts
  • apps/web/utils/fb.ts
  • apps/web/utils/gtm.ts
  • apps/web/utils/llms/index.ts
  • apps/web/utils/llms/model.ts
  • apps/web/utils/logger.ts
  • apps/web/utils/posthog.ts
  • apps/web/utils/qstash.ts
  • apps/web/utils/redis/account-validation.ts
  • apps/web/utils/redis/index.ts
  • apps/web/utils/schedule.test.ts
  • apps/web/utils/swr.ts
  • apps/web/utils/types.ts
  • apps/web/utils/upstash/index.ts
  • docker-compose.yml
  • docker/DOCKER_BUILD_GUIDE.md
  • docker/Dockerfile.prod
  • docs/hosting/docker.md
  • packages/resend/emails/digest.tsx
  • packages/resend/emails/invitation.tsx
  • packages/resend/emails/summary.tsx
  • packages/resend/src/send.tsx
  • packages/tinybird-ai-analytics/src/publish.ts
  • packages/tinybird/src/publish.ts
  • portainer-stack.yaml

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.

@macroscopeapp
Copy link
Contributor

macroscopeapp bot commented Dec 22, 2025

Add privacy mode across web app and services, switch QStash verification to apps/web/utils/qstash.verifyQstashAtRequestTime, and gate Sentry/PostHog/Crisp/AI/Tinybird via env-driven runtime config

Introduce env-driven privacy mode that disables analytics, telemetry, external fetches, AI/MCP/Tinybird publishing, and logging; move QStash verification to a runtime wrapper; make external links, base URLs, and emails configurable via NEXT_PUBLIC_*; add dynamic CORS middleware and CSP tightening; refactor Redis to lazy init and make cache best-effort; standardize SWR response handling; update Docker/build scripts to read NEXT_PUBLIC_* at runtime; and adjust error boundaries and OpenAPI server resolution.

📍Where to Start

Start with privacy mode wiring in createEnv at apps/web/env.ts, then review the QStash verifier introduced in apps/web/utils/qstash.ts and its adoption in API routes such as apps/web/app/api/clean/route.ts and apps/web/app/api/ai/digest/route.ts.


Macroscope summarized 189566a.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

12 issues found across 95 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="apps/web/__tests__/helpers.ts">

<violation number="1" location="apps/web/__tests__/helpers.ts:191">
P2: The trimmed value is checked for truthiness but the untrimmed value is returned. If an env var has leading/trailing whitespace, the returned URL would include that whitespace, causing malformed URLs.</violation>
</file>

<file name="apps/web/utils/config.ts">

<violation number="1" location="apps/web/utils/config.ts:25">
P2: Bypasses the project&#39;s env validation system. Consider importing and using the validated `env` object from `@/env.ts` instead of accessing `process.env` directly with a type assertion.</violation>
</file>

<file name="LOCAL_RUN.md">

<violation number="1" location="LOCAL_RUN.md:9">
P2: Hardcoded user-specific path won&#39;t work for other developers. Use a relative path or generic placeholder instead.</violation>

<violation number="2" location="LOCAL_RUN.md:347">
P3: Incomplete placeholder URL. Either provide the actual documentation URL or remove this line.</violation>
</file>

<file name="apps/web/utils/auth.ts">

<violation number="1" location="apps/web/utils/auth.ts:148">
P1: Early return skips critical business logic, not just marketing integrations. The `handlePendingPremiumInvite` and `handleReferralOnSignUp` calls at the end of this function will also be skipped in privacy mode, preventing new users from being added to premium plans they were invited to and from having their referral codes processed. Consider wrapping only the marketing section (Loops, Resend, Dub) with this check instead of returning early from the entire function.</violation>
</file>

<file name=".github/workflows/security-scan.yml">

<violation number="1" location=".github/workflows/security-scan.yml:27">
P2: Consider pinning third-party actions to commit SHA for supply chain security. For a security scanning workflow, this is especially important. You can find the SHA for version 0.24.0 and use it like: `aquasecurity/trivy-action@&lt;full-sha&gt;`</violation>
</file>

<file name="LICENSE">

<violation number="1" location="LICENSE:34">
P1: The LICENSE file&#39;s enterprise licensing contact information has been replaced with placeholder values (`support@example.com`, `https://example.com`). The `example.com` domain is reserved for documentation and cannot be used for actual communication. Users seeking enterprise licensing inquiries will be unable to reach the company. This also creates inconsistency with the valid contact info at the end of this same file (`enterprise@inboxzero.com`, `https://www.inboxzero.com`).</violation>
</file>

<file name="apps/web/app/(landing)/privacy/content.mdx">

<violation number="1" location="apps/web/app/(landing)/privacy/content.mdx:21">
P1: Using `example.com` in a production privacy policy is incorrect - this is a reserved domain for documentation purposes and cannot receive emails. Users attempting to make data protection inquiries will be unable to reach anyone, which could be a GDPR compliance issue. This appears to be a placeholder that should be replaced with a real contact email.</violation>
</file>

<file name="README.md">

<violation number="1" location="README.md:47">
P2: Text references documentation but provides no way to access it. Either remove this sentence, restore the link, or link to internal documentation (e.g., the existing `docs/` folder).</violation>

<violation number="2" location="README.md:413">
P2: Text tells users to &#39;join our community&#39; but provides no way to do so. Either remove the reference to community, provide an alternative contact method, or link to a community platform.</violation>
</file>

<file name="apps/web/app/(landing)/terms/content.mdx">

<violation number="1" location="apps/web/app/(landing)/terms/content.mdx:29">
P1: Using `support@example.com` as a contact email in Terms of Service is problematic. The `example.com` domain is reserved for documentation purposes and cannot receive real emails. Users will be unable to reach support through this address. Consider using the actual support email or a placeholder that will be configured dynamically.</violation>
</file>

<file name="apps/web/app/api/digest-preview/route.ts">

<violation number="1" location="apps/web/app/api/digest-preview/route.ts:46">
P2: Empty string fallback could result in broken URLs in the digest email. Consider providing a meaningful default (e.g., `&quot;http://localhost:3000&quot;`) to match the default in `env.ts`, or import from the typed env configuration.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Ask questions if you need clarification on any suggestion

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

process.env.BASE_URL ||
process.env.APP_BASE_URL;
if (envUrl?.trim()) {
return envUrl.replace(/\/$/, "");
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P2: The trimmed value is checked for truthiness but the untrimmed value is returned. If an env var has leading/trailing whitespace, the returned URL would include that whitespace, causing malformed URLs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/__tests__/helpers.ts, line 191:

<comment>The trimmed value is checked for truthiness but the untrimmed value is returned. If an env var has leading/trailing whitespace, the returned URL would include that whitespace, causing malformed URLs.</comment>

<file context>
@@ -179,3 +179,26 @@ export function getMockExecutedRule({
+    process.env.BASE_URL ||
+    process.env.APP_BASE_URL;
+  if (envUrl?.trim()) {
+    return envUrl.replace(/\/$/, &quot;&quot;);
+  }
+  return &quot;http://localhost:3000&quot;;
</file context>
Suggested change
return envUrl.replace(/\/$/, "");
return envUrl.trim().replace(/\/$/, "");
Fix with Cubic


export const EXTENSION_URL = "https://go.getinboxzero.com/extension";
export const EXTENSION_URL =
(process.env.NEXT_PUBLIC_EXTENSION_URL as string) || "#";
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P2: Bypasses the project's env validation system. Consider importing and using the validated env object from @/env.ts instead of accessing process.env directly with a type assertion.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/utils/config.ts, line 25:

<comment>Bypasses the project&#39;s env validation system. Consider importing and using the validated `env` object from `@/env.ts` instead of accessing `process.env` directly with a type assertion.</comment>

<file context>
@@ -21,4 +21,5 @@ export type CoreConditionType = Extract&lt;ConditionType, &quot;AI&quot; | &quot;STATIC&quot;&gt;;
 
-export const EXTENSION_URL = &quot;https://go.getinboxzero.com/extension&quot;;
+export const EXTENSION_URL =
+  (process.env.NEXT_PUBLIC_EXTENSION_URL as string) || &quot;#&quot;;
</file context>
Fix with Cubic


## 🔗 Useful Links

- **Documentation**: <your-docs-url>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P3: Incomplete placeholder URL. Either provide the actual documentation URL or remove this line.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At LOCAL_RUN.md, line 347:

<comment>Incomplete placeholder URL. Either provide the actual documentation URL or remove this line.</comment>

<file context>
@@ -0,0 +1,385 @@
+
+## 🔗 Useful Links
+
+- **Documentation**: &lt;your-docs-url&gt;
+- **Main README**: [README.md](README.md)
+- **Architecture**: [ARCHITECTURE.md](ARCHITECTURE.md)
</file context>
Fix with Cubic


```bash
# Navigate to project
cd /Users/sudipta/Workspace/personal/AI/Email/inbox-zero
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P2: Hardcoded user-specific path won't work for other developers. Use a relative path or generic placeholder instead.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At LOCAL_RUN.md, line 9:

<comment>Hardcoded user-specific path won&#39;t work for other developers. Use a relative path or generic placeholder instead.</comment>

<file context>
@@ -0,0 +1,385 @@
+
+```bash
+# Navigate to project
+cd /Users/sudipta/Workspace/personal/AI/Email/inbox-zero
+
+# Start Docker services (if not already running)
</file context>
Fix with Cubic

user: User;
isNewUser: boolean;
}) {
if (env.PRIVACY_MODE) {
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P1: Early return skips critical business logic, not just marketing integrations. The handlePendingPremiumInvite and handleReferralOnSignUp calls at the end of this function will also be skipped in privacy mode, preventing new users from being added to premium plans they were invited to and from having their referral codes processed. Consider wrapping only the marketing section (Loops, Resend, Dub) with this check instead of returning early from the entire function.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/utils/auth.ts, line 148:

<comment>Early return skips critical business logic, not just marketing integrations. The `handlePendingPremiumInvite` and `handleReferralOnSignUp` calls at the end of this function will also be skipped in privacy mode, preventing new users from being added to premium plans they were invited to and from having their referral codes processed. Consider wrapping only the marketing section (Loops, Resend, Dub) with this check instead of returning early from the entire function.</comment>

<file context>
@@ -145,6 +145,10 @@ async function handleSignIn({
   user: User;
   isNewUser: boolean;
 }) {
+  if (env.PRIVACY_MODE) {
+    // Skip any marketing/analytics integrations in privacy mode
+    return;
</file context>
Fix with Cubic

**Company:** Inbox Zero Inc.
**Address:** 131 Continental Dr, Suite 305, Newark, Delaware, 19713, United States
**Email:** [elie@getinboxzero.com](mailto:elie@getinboxzero.com)
**Email:** [support@example.com](mailto:support@example.com)
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P1: Using example.com in a production privacy policy is incorrect - this is a reserved domain for documentation purposes and cannot receive emails. Users attempting to make data protection inquiries will be unable to reach anyone, which could be a GDPR compliance issue. This appears to be a placeholder that should be replaced with a real contact email.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/app/(landing)/privacy/content.mdx, line 21:

<comment>Using `example.com` in a production privacy policy is incorrect - this is a reserved domain for documentation purposes and cannot receive emails. Users attempting to make data protection inquiries will be unable to reach anyone, which could be a GDPR compliance issue. This appears to be a placeholder that should be replaced with a real contact email.</comment>

<file context>
@@ -18,7 +18,7 @@ This privacy policy aims to give you information on how Inbox Zero collects and
 **Company:** Inbox Zero Inc.  
 **Address:** 131 Continental Dr, Suite 305, Newark, Delaware, 19713, United States  
-**Email:** [elie@getinboxzero.com](mailto:elie@getinboxzero.com)
+**Email:** [support@example.com](mailto:support@example.com)
 
 **Data Protection Inquiries:** For data protection inquiries, contact us at the email above.
</file context>
Fix with Cubic


You can view open tasks in our [GitHub Issues](https://github.com/elie222/inbox-zero/issues).
Join our [Discord](https://www.getinboxzero.com/discord) to discuss tasks and check what's being worked on.
Join our community to discuss tasks and check what's being worked on.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P2: Text tells users to 'join our community' but provides no way to do so. Either remove the reference to community, provide an alternative contact method, or link to a community platform.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 413:

<comment>Text tells users to &#39;join our community&#39; but provides no way to do so. Either remove the reference to community, provide an alternative contact method, or link to a community platform.</comment>

<file context>
@@ -416,6 +410,6 @@ For more detailed Docker build instructions and security considerations, see [do
 
 You can view open tasks in our [GitHub Issues](https://github.com/elie222/inbox-zero/issues).
-Join our [Discord](https://www.getinboxzero.com/discord) to discuss tasks and check what&#39;s being worked on.
+Join our community to discuss tasks and check what&#39;s being worked on.
 
 [ARCHITECTURE.md](./ARCHITECTURE.md) explains the architecture of the project (LLM generated).
</file context>
Fix with Cubic

- **Email Analytics:** Track your activity and trends over time.

Learn more in our [docs](https://docs.getinboxzero.com).
Learn more in our docs.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P2: Text references documentation but provides no way to access it. Either remove this sentence, restore the link, or link to internal documentation (e.g., the existing docs/ folder).

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.md, line 47:

<comment>Text references documentation but provides no way to access it. Either remove this sentence, restore the link, or link to internal documentation (e.g., the existing `docs/` folder).</comment>

<file context>
@@ -44,7 +44,7 @@ To help you spend less time in your inbox, so you can focus on what matters.
 - **Email Analytics:** Track your activity and trends over time.
 
-Learn more in our [docs](https://docs.getinboxzero.com).
+Learn more in our docs.
 
 ## Feature Screenshots
</file context>
Suggested change
Learn more in our docs.
Learn more in our [docs](docs/).
Fix with Cubic

## 6. Contact Information

Questions or comments about the Website or these Terms of Service may be directed to our support team at support@getinboxzero.com.
Questions or comments about the Website or these Terms of Service may be directed to our support team at support@example.com.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P1: Using support@example.com as a contact email in Terms of Service is problematic. The example.com domain is reserved for documentation purposes and cannot receive real emails. Users will be unable to reach support through this address. Consider using the actual support email or a placeholder that will be configured dynamically.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/app/(landing)/terms/content.mdx, line 29:

<comment>Using `support@example.com` as a contact email in Terms of Service is problematic. The `example.com` domain is reserved for documentation purposes and cannot receive real emails. Users will be unable to reach support through this address. Consider using the actual support email or a placeholder that will be configured dynamically.</comment>

<file context>
@@ -26,7 +26,7 @@ We reserve the right to revise and update these Terms of Service from time to ti
 ## 6. Contact Information
 
-Questions or comments about the Website or these Terms of Service may be directed to our support team at support@getinboxzero.com.
+Questions or comments about the Website or these Terms of Service may be directed to our support team at support@example.com.
 
 ## 7. Disclaimer of Warranties
</file context>
Fix with Cubic

function createMockDigestData(categories: string[]): DigestEmailProps {
const digestData: DigestEmailProps = {
baseUrl: "https://www.getinboxzero.com",
baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "",
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 22, 2025

Choose a reason for hiding this comment

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

P2: Empty string fallback could result in broken URLs in the digest email. Consider providing a meaningful default (e.g., "http://localhost:3000") to match the default in env.ts, or import from the typed env configuration.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/app/api/digest-preview/route.ts, line 46:

<comment>Empty string fallback could result in broken URLs in the digest email. Consider providing a meaningful default (e.g., `&quot;http://localhost:3000&quot;`) to match the default in `env.ts`, or import from the typed env configuration.</comment>

<file context>
@@ -43,7 +43,7 @@ export async function GET(request: NextRequest) {
 function createMockDigestData(categories: string[]): DigestEmailProps {
   const digestData: DigestEmailProps = {
-    baseUrl: &quot;https://www.getinboxzero.com&quot;,
+    baseUrl: process.env.NEXT_PUBLIC_BASE_URL || &quot;&quot;,
     unsubscribeToken: &quot;preview-token&quot;,
     emailAccountId: &quot;preview-account&quot;,
</file context>
Suggested change
baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "",
baseUrl: process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000",
Fix with Cubic

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.

2 participants