Repository navigation
chore: remove unused feature flags - #8845
Conversation
- FEATURE_FLAGS loses CLOUD_ACCESS, DISABLE_REMOTE_AGENT and CHAT_V3. Nothing has read them since desktop 1.22.0, 1.21.0 and 1.37.0; chat is gated by acp-chat. - The activation-email gate goes. Experiment 387868 closed in August and its flag has been off since, which already sent `user.signed_up` for every signup; now the code does so directly. The flags themselves are deleted in PostHog. Co-authored-by: Claude <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Emit signup events for all new users packages/auth/src/lib/lifecycle.ts, packages/auth/src/server.ts, packages/email/scripts/sync-automations.ts |
The auth server no longer checks an activation variant before emitting user.signed_up. The activation-variant module was deleted. Related welcome automation comments were updated. |
Feature flag constants
| Layer / File(s) | Summary |
|---|---|
Remove feature flag entries packages/shared/src/constants.ts |
CLOUD_ACCESS, DISABLE_REMOTE_AGENT, and CHAT_V3 were removed from FEATURE_FLAGS. MOBILE_VOICE_MODE remains. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Suggested reviewers: kitenite
Merge Risk: 
Minimal · up to 02d28
-
The supplied changes identify no issue that needs resolution before merge.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "chore: remove unused feature flags" matches the main change. The PR removes the unused FEATURE_FLAGS entries CLOUD_ACCESS, DISABLE_REMOTE_AGENT, and CHAT_V3, plus the activation-email-campaign flag and its lifecycle.ts module. It uses conventional commit format. It does not name the auth signup change, but that is secondary to the flag cleanup.
Full details: Description check
-
Explanation
The description follows the template well. The "What & why" section explains the removed flags, the reasons they are safe to remove, and the flags kept on purpose, and it states there is no behavior change. The "How I tested it" section lists the test runs, type checks, lint, and a git grep check. The checklist is missing. It is not ticked, and the description does not confirm the PR title format, lint/typecheck results beyond Biome, or the fork-maintainer setting. Screenshots are not needed because no user-visible change is claimed. The issue link is not present, but none is required when no issue exists.
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
[Medium impact] The signup email flow changes for every newly created account. The PR appears safe to merge, with one non-blocking correction to the campaign instructions. Findings
Fix with agent prompt### Issue 1
packages/auth/src/server.ts:329-331
The signup hook now always sends `user.signed_up`, but `sync-automations.ts:20–24` still says it withholds the event from the experiment's control group and requires a separate event before adding another automation. Update that paragraph too. It could lead future campaign authors to split events unnecessarily.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryRemoves three unused entries from
saddlepaddle explicitly identifies the experiment's removal as intentional because it ended and the disabled flag already enrolled every signup. Reviews (1) · Last reviewed commit: "chore: remove unused feature flags" · Reviewed by Greptile |
| try { | ||
| const { error } = await resend.events.send({ | ||
| event: "user.signed_up", |
There was a problem hiding this comment.
Campaign instructions describe removed gate
The signup hook now always sends user.signed_up, but sync-automations.ts:20–24 still says it withholds the event from the experiment's control group and requires a separate event before adding another automation. Update that paragraph too. It could lead future campaign authors to split events unnecessarily.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/auth/src/server.ts
Line: 329-331
Comment:
**Campaign instructions describe removed gate**
The signup hook now always sends `user.signed_up`, but `sync-automations.ts:20–24` still says it withholds the event from the experiment's control group and requires a separate event before adding another automation. Update that paragraph too. It could lead future campaign authors to split events unnecessarily.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Preview update published for development build |
Co-authored-by: Claude <noreply@anthropic.com>
What & why
Flags that no longer change anything, removed from the code and deleted in PostHog:
CLOUD_ACCESS,DISABLE_REMOTE_AGENT,CHAT_V3were still inFEATURE_FLAGS, but nothing has read them since desktop 1.22.0 (chore(desktop,trpc,db): delete v1 cloud secrets surface and dead v1 cloud routers #6431), 1.21.0 (feat(desktop,mobile,trpc): replace Electric sync with plain tRPC + React Query #6328) and 1.37.0 (feat(chat): a chat pane of its own, host-started chats, and no leaked chat agents #8242). Chat is gated byacp-chat.activation-email-campaign: experiment 387868 closed in August, and the flag has been off since. Off already meant "test", so every signup already gotuser.signed_up. The signup hook now sends it without asking PostHog, andpackages/auth/src/lib/lifecycle.tsis gone.No behavior change for anyone.
Left in place on purpose:
mobile-pane(hidden until thesuperset mobileCLI ships),star-nag-card, andnew-workspace-prompt-cards(+ override). Each of those needs a product decision before removal.How I tested it
packages/auth(83) andpackages/shared(1444) tests pass.tscfor auth, shared and email shows no errors in the touched files. Biome is clean.git grepfinds no other references to the removed constants orgetActivationVariant.🤖 Generated with Claude Code
Summary by CodeRabbit