Skip to content

chore: Remove dead code and park chat onboarding - #3920

Merged
elie222 merged 6 commits into
mainfrom
cleanup/remove-dead-code
Sep 29, 2026
Merged

elie222 merged 6 commits into
mainfrom
cleanup/remove-dead-code

Conversation

@elie222

@elie222 elie222 commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Part of a codebase cleanup stack.

Removes code with no production importers. Checked by import path across this repo (including dynamic imports and test mocks) and against every @/ import in the marketing repo, which is cloned into app/(marketing) at build time.

Parked, not lost: the chat onboarding experiment (UI, /api/chat/onboarding route, prompt, answers action, feature-flag hook, LLM use case) is removed from main and kept whole on the parked/chat-onboarding branch, so it can come back when it goes live.

Removed:

  • Unused UI: digest settings forms, old landing home sections, ManageSplitsDialog, RuleTab, useModifierKey, ai-elements/actions.
  • Server actions only referenced by tests (snooze, mail mutation/label, generate reply, local mail sync), unused Redis/snippet/receipt helpers, the Slack reactions helper.
  • Unregistered update-rule chat tools (their output types stay in the renderer so old chat history still renders).
  • docker/Dockerfile.web and setup.sh.

Kept on purpose: PricingLazy, Banner, LegalPage and utils/text (used by the marketing site), the wait and write-tests skills (user-invoked), the paused follow-up draft cleanup, the Tinybird delete module (rewritten in #3933), and the ai/summarise / ai/compose-autocomplete routes.

Validation: non-test type check clean; all marketing @/ imports resolve; related tests pass.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Removed Features
    • The chat-based onboarding flow, including inbox scanning, setup guidance, cleanup suggestions, plan selection, and account switching, is no longer available.
    • Newsletter and receipt discovery, digest settings, split management, and Slack reaction controls have been removed.
    • AI-generated reply suggestions, snippet discovery, and several mail actions—including labeling, snoozing, and archiving—are no longer available.
    • Some landing-page sections covering features, privacy, and testimonials have been removed.

@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
inbox-zero Ignored Ignored Preview Sep 29, 2026 1:04am UTC

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: elie222/inbox-zero/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 0b317d9a-a2ea-4d3f-a4b3-3b435a059e82

📥 Commits

Reviewing files that changed from the base of the PR and between 3438e66 and 08fc884.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (68)
  • apps/web/__tests__/ai-regression/ai-find-snippets.test.ts
  • apps/web/__tests__/integration/slack-notifications.test.ts
  • apps/web/app/(app)/[emailAccountId]/assistant/RuleTab.tsx
  • apps/web/app/(app)/[emailAccountId]/mail/ManageSplitsDialog.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/ChatOnboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/ChatOnboardingChatPane.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/Onboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingAccountMenu.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCleanupCard.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingPlanCards.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingSetupCard.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/chatOnboardingConfig.test.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/chatOnboardingConfig.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/useInboxScan.ts
  • apps/web/app/(app)/[emailAccountId]/settings/DigestItemsForm.tsx
  • apps/web/app/(app)/[emailAccountId]/settings/DigestScheduleForm.tsx
  • apps/web/app/(landing)/home/Features.tsx
  • apps/web/app/(landing)/home/Privacy.tsx
  • apps/web/app/(landing)/home/Testimonials.tsx
  • apps/web/app/api/chat/onboarding/route.test.ts
  • apps/web/app/api/chat/onboarding/route.ts
  • apps/web/app/api/chat/onboarding/test-utils.ts
  • apps/web/app/api/chat/onboarding/validation.test.ts
  • apps/web/app/api/chat/onboarding/validation.ts
  • apps/web/components/ai-elements/actions.tsx
  • apps/web/components/assistant-chat/tools.tsx
  • apps/web/components/email-list/EmailMessage.test.tsx
  • apps/web/components/email-list/EmailThread.test.tsx
  • apps/web/hooks/useAnalytics.ts
  • apps/web/hooks/useFeatureFlags.ts
  • apps/web/hooks/useModifierKey.ts
  • apps/web/utils/actions/generate-reply.test.ts
  • apps/web/utils/actions/generate-reply.ts
  • apps/web/utils/actions/generate-reply.validation.ts
  • apps/web/utils/actions/local-mail-sync.test.ts
  • apps/web/utils/actions/local-mail-sync.ts
  • apps/web/utils/actions/mail-bulk-action.constants.ts
  • apps/web/utils/actions/mail-label.test.ts
  • apps/web/utils/actions/mail-label.ts
  • apps/web/utils/actions/mail-label.validation.ts
  • apps/web/utils/actions/mail-mutation.test.ts
  • apps/web/utils/actions/mail-mutation.ts
  • apps/web/utils/actions/mail-mutation.validation.test.ts
  • apps/web/utils/actions/mail-mutation.validation.ts
  • apps/web/utils/actions/onboarding.test.ts
  • apps/web/utils/actions/onboarding.ts
  • apps/web/utils/actions/onboarding.validation.ts
  • apps/web/utils/actions/rule.validation.test.ts
  • apps/web/utils/actions/rule.validation.ts
  • apps/web/utils/actions/snooze.ts
  • apps/web/utils/ai/assistant/tools/rules/update-rule-actions-tool.ts
  • apps/web/utils/ai/assistant/tools/rules/update-rule-conditions-tool.ts
  • apps/web/utils/ai/group/find-newsletters.ts
  • apps/web/utils/ai/group/find-receipts.ts
  • apps/web/utils/ai/onboarding/chat.ts
  • apps/web/utils/ai/snippets/find-snippets.ts
  • apps/web/utils/ai/web-search.ts
  • apps/web/utils/drive/providers/token-helpers.ts
  • apps/web/utils/gmail/message.ts
  • apps/web/utils/llms/use-cases.test.ts
  • apps/web/utils/llms/use-cases.ts
  • apps/web/utils/messaging/providers/slack/reactions.ts
  • apps/web/utils/redis/category.ts
  • docker/Dockerfile.web
  • packages/tinybird/package.json
  • packages/tinybird/src/delete.ts
  • packages/tinybird/src/index.ts
  • setup.sh
💤 Files with no reviewable changes (63)
  • apps/web/utils/llms/use-cases.test.ts
  • setup.sh
  • apps/web/utils/actions/mail-bulk-action.constants.ts
  • apps/web/app/(landing)/home/Privacy.tsx
  • apps/web/app/(landing)/home/Testimonials.tsx
  • apps/web/tests/integration/slack-notifications.test.ts
  • docker/Dockerfile.web
  • apps/web/hooks/useModifierKey.ts
  • apps/web/app/api/chat/onboarding/validation.test.ts
  • packages/tinybird/package.json
  • apps/web/utils/actions/mail-label.validation.ts
  • apps/web/utils/actions/mail-label.test.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/chatOnboardingConfig.test.ts
  • apps/web/components/email-list/EmailThread.test.tsx
  • apps/web/utils/actions/generate-reply.validation.ts
  • apps/web/app/api/chat/onboarding/route.test.ts
  • packages/tinybird/src/delete.ts
  • apps/web/utils/actions/generate-reply.ts
  • packages/tinybird/src/index.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/ChatOnboarding.tsx
  • apps/web/app/(app)/[emailAccountId]/assistant/RuleTab.tsx
  • apps/web/components/email-list/EmailMessage.test.tsx
  • apps/web/utils/actions/local-mail-sync.test.ts
  • apps/web/app/(app)/[emailAccountId]/settings/DigestItemsForm.tsx
  • apps/web/app/api/chat/onboarding/route.ts
  • apps/web/utils/actions/local-mail-sync.ts
  • apps/web/utils/actions/rule.validation.test.ts
  • apps/web/app/(landing)/home/Features.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingAccountMenu.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingCleanupCard.tsx
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingSetupCard.tsx
  • apps/web/utils/actions/mail-mutation.test.ts
  • apps/web/app/(app)/[emailAccountId]/settings/DigestScheduleForm.tsx
  • apps/web/hooks/useFeatureFlags.ts
  • apps/web/app/(app)/[emailAccountId]/mail/ManageSplitsDialog.tsx
  • apps/web/app/api/chat/onboarding/test-utils.ts
  • apps/web/utils/actions/mail-label.ts
  • apps/web/utils/actions/onboarding.validation.ts
  • apps/web/utils/messaging/providers/slack/reactions.ts
  • apps/web/tests/ai-regression/ai-find-snippets.test.ts
  • apps/web/utils/actions/mail-mutation.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/OnboardingPlanCards.tsx
  • apps/web/utils/ai/web-search.ts
  • apps/web/utils/actions/onboarding.ts
  • apps/web/utils/actions/snooze.ts
  • apps/web/utils/ai/snippets/find-snippets.ts
  • apps/web/utils/actions/generate-reply.test.ts
  • apps/web/utils/ai/assistant/tools/rules/update-rule-conditions-tool.ts
  • apps/web/utils/drive/providers/token-helpers.ts
  • apps/web/components/ai-elements/actions.tsx
  • apps/web/utils/gmail/message.ts
  • apps/web/utils/actions/mail-mutation.validation.test.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/ChatOnboardingChatPane.tsx
  • apps/web/utils/actions/rule.validation.ts
  • apps/web/utils/ai/onboarding/chat.ts
  • apps/web/utils/redis/category.ts
  • apps/web/utils/ai/assistant/tools/rules/update-rule-actions-tool.ts
  • apps/web/utils/actions/mail-mutation.validation.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/useInboxScan.ts
  • apps/web/utils/llms/use-cases.ts
  • apps/web/utils/ai/group/find-receipts.ts
  • apps/web/app/api/chat/onboarding/validation.ts
  • apps/web/app/(app)/[emailAccountId]/onboarding/chatOnboardingConfig.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The change removes chat onboarding and several mail, assistant, discovery, and landing-page features. It also deletes supporting tests, validation, storage and integration utilities, and development setup files. Assistant result components now use locally defined types.

Changes

Chat onboarding

Layer / File(s) Summary
Chat contracts and processing
apps/web/app/(app)/[emailAccountId]/onboarding/chatOnboardingConfig*, apps/web/app/(app)/[emailAccountId]/onboarding/chatOnboardingConfig.test.ts, apps/web/app/api/chat/onboarding/*, apps/web/utils/ai/onboarding/chat.ts, apps/web/utils/actions/onboarding*
Onboarding chat schemas, stage logic, AI processing, API handling, and chat-answer persistence are removed with related tests.
Chat UI and experiment references
apps/web/app/(app)/[emailAccountId]/onboarding/*, apps/web/hooks/useAnalytics.ts, apps/web/hooks/useFeatureFlags.ts
The chat UI, scan hook, and setup, cleanup, plan, and account components are removed. The onboarding comment and analytics and feature-flag references are narrowed.

Mail and assistant actions

Layer / File(s) Summary
Reply and local sync actions
apps/web/utils/actions/generate-reply*, apps/web/utils/actions/local-mail-sync*, apps/web/components/email-list/EmailMessage.test.tsx, apps/web/components/email-list/EmailThread.test.tsx
Reply generation and local mail sync actions, validation, tests, and reply-action mocks are removed.
Label and mail mutation actions
apps/web/utils/actions/mail-label*, apps/web/utils/actions/mail-mutation*, apps/web/utils/actions/mail-bulk-action.constants.ts, apps/web/utils/actions/snooze.ts
Thread labeling and mail mutation actions, schemas, tests, and the message archive limit constant are removed.
Rule editing and assistant results
apps/web/utils/actions/rule.validation*, apps/web/utils/ai/assistant/tools/rules/*, apps/web/components/assistant-chat/tools.tsx, apps/web/components/ai-elements/actions.tsx
Rule-condition validation and AI rule-update tools are removed. Assistant result components use local parameter and action-diff types.

Discovery and AI helpers

Layer / File(s) Summary
Snippet and inbox discovery
apps/web/utils/ai/snippets/find-snippets.ts, apps/web/__tests__/ai-regression/ai-find-snippets.test.ts, apps/web/utils/ai/group/find-newsletters.ts, apps/web/utils/ai/group/find-receipts.ts
Snippet generation and its regression tests, newsletter discovery, and inbox-based receipt discovery are removed.
Discovery model and query helpers
apps/web/utils/llms/use-cases*, apps/web/utils/ai/web-search.ts, apps/web/utils/gmail/message.ts
The FindSnippets use case, related model mappings, web-search provider helper, and paginated batch-message query helper are removed.

App surfaces

Layer / File(s) Summary
Assistant, mail, and settings surfaces
apps/web/app/(app)/[emailAccountId]/assistant/RuleTab.tsx, apps/web/app/(app)/[emailAccountId]/mail/ManageSplitsDialog.tsx, apps/web/app/(app)/[emailAccountId]/settings/Digest*Form.tsx, apps/web/hooks/useModifierKey.ts
The rule tab, split-management dialog, digest forms, and modifier-key hook are deleted.

Landing-page content

Layer / File(s) Summary
Landing-page sections
apps/web/app/(landing)/home/Features.tsx, apps/web/app/(landing)/home/Privacy.tsx, apps/web/app/(landing)/home/Testimonials.tsx
The feature sections, privacy content, and testimonial layouts are deleted.

Slack reactions

Layer / File(s) Summary
Reaction utilities and tests
apps/web/utils/messaging/providers/slack/reactions.ts, apps/web/__tests__/integration/slack-notifications.test.ts
The add and remove reaction utilities and their integration tests are deleted.

Account and storage helpers

Layer / File(s) Summary
Drive and Redis helpers
apps/web/utils/drive/providers/token-helpers.ts, apps/web/utils/redis/category.ts
Drive connection token helpers and Redis category schema and operations are deleted.

Tinybird delete operation

Layer / File(s) Summary
Datasource deletion
packages/tinybird/src/delete.ts, packages/tinybird/src/index.ts, packages/tinybird/package.json
The delete request and retry implementation are deleted. The package no longer exports it or declares p-retry.

Development setup files

Layer / File(s) Summary
Docker and setup scripts
docker/Dockerfile.web, setup.sh
The web Dockerfile and the script that installed dependencies and initialized development setup are deleted.

Priority: ⬇️ Low

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Other

Suggested reviewers: gentlemandev

Merge Risk: ⚪ Minimal · up to 46dcf

No actionable merge-blocking risk was established; the checked-in image workflows do not depend on the removed web Dockerfile.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 08fc8

Removing the onboarding route and unused capabilities appears to reduce exposed functionality. The remaining assistant components display legacy rule results rather than adding a way to execute the retired tools. Deployment behavior and some upstream controls were not fully verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The identified assistant changes affect presentation of rule results, not execution authority. No expansion from the changed display payloads to a rule mutation was established.

Trust Boundaries and Controls

  • observed — Non-preview rule controls remain separate from the rendered action and condition fields. Upstream validation of chat-message data was not established by the scoped source evidence.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the primary changes: removing unused code and moving chat onboarding out of the main branch for future use.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@elie222
elie222 added this pull request to stack #3927 September 28, 2026 17:11
@elie222 elie222 changed the title cleanup/remove dead code chore: Remove dead code Sep 28, 2026
@elie222
elie222 force-pushed the cleanup/remove-dead-code branch 4 times, most recently from fb59f20 to 021ffe1 Compare September 28, 2026 18:11
@elie222
elie222 force-pushed the cleanup/remove-dead-code branch 2 times, most recently from 826b734 to a484a36 Compare September 28, 2026 18:25
Base automatically changed from cleanup/shared-ssrf-guard to main September 28, 2026 18:46
@elie222
elie222 force-pushed the cleanup/remove-dead-code branch from a484a36 to 7a5545c Compare September 28, 2026 18:46
elie222 and others added 4 commits September 28, 2026 14:55
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…, and stale skills

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Restores the components and text helpers the marketing site imports and
the user-invoked skills. Removes the chat onboarding API route, prompt,
answers action and feature flag hook, which only the parked UI used; the
full feature is kept on the parked/chat-onboarding branch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@elie222
elie222 force-pushed the cleanup/remove-dead-code branch from 7a5545c to 7013d22 Compare September 28, 2026 18:56
@elie222 elie222 changed the title chore: Remove dead code chore: Remove dead code and park chat onboarding Sep 28, 2026
@elie222
elie222 marked this pull request as ready for review September 28, 2026 20:47
elie222 and others added 2 commits September 28, 2026 17:04
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@elie222
elie222 merged commit 32c4011 into main Sep 29, 2026
47 checks passed
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