Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 30, 2025

Remove Anonymous Users Feature

Completed Changes

API Changes (apps/api)

  • Remove route files: create-anonymous-user.router.ts and get-anonymous-user.router.ts
  • Update apps/api/src/user/routes/index.ts to remove anonymous user route exports
  • Update apps/api/src/rest-app.ts to remove anonymous user router registrations
  • Update apps/api/src/user/controllers/user/user.controller.ts to remove create() and getById() methods
  • Update apps/api/src/user/services/user/user.service.ts to remove anonymous user handling in registerUser()
  • Update apps/api/src/user/schemas/user.schema.ts to remove and re-add necessary schemas
  • Update apps/api/src/user/repositories/user/user.repository.ts to remove findAnonymousById() method
  • Remove test file: apps/api/test/functional/anonymous-user.spec.ts
  • Update other API test files that reference anonymous users
  • Update apps/api/test/services/wallet-testing.service.ts to remove methods
  • Remove feature flag ANONYMOUS_FREE_TRIAL from feature flags
  • Remove REGULAR_ANONYMOUS_USER role from ability service
  • Update auth interceptor to remove anonymous user role and token handling
  • Remove ANONYMOUS_FREE_TRIAL feature flag checks from billing controllers/services
  • Update managed-signer service to always validate providers and limits
  • Update wallet-initializer service to always publish TrialStarted event
  • Fix ESLint errors (unused imports)

Deploy-Web Changes (apps/deploy-web)

  • Remove directory: apps/deploy-web/src/context/AnonymousUserProvider
  • Remove directory: apps/deploy-web/src/queries/useAnonymousUserQuery
  • Remove file: apps/deploy-web/src/hooks/useStoredAnonymousUser.ts
  • Update apps/deploy-web/src/hooks/useUser.ts to remove anonymous user references
  • Update apps/deploy-web/src/components/user/UserProviders/UserProviders.tsx
  • Remove file: apps/deploy-web/src/config/auth.config.ts
  • Update apps/deploy-web/src/services/auth/auth/interceptors.ts
  • Update apps/deploy-web/src/pages/api/auth/signup.ts
  • Remove anonymous user analytics tracking from app-di-container
  • Update all deploy-web test files
  • Remove buildAnonymousUser function from test seeders
  • Remove feature flag anonymous_free_trial
  • Update auth.service.ts to remove anonymous user token handling
  • Remove anonymous cookie handling from auth callback

HTTP SDK Changes (packages/http-sdk)

  • Remove anonymous user methods and caching from user-http.service.ts

Summary

All anonymous user functionality has been successfully removed from the codebase. ESLint errors have been fixed by removing unused imports:

  • Removed unused FeatureFlags import from wallet controller, managed-signer service, and wallet-initializer service
  • Removed unused isNull import from user repository
  • Fixed import sorting in start-trial.spec.ts
  • Removed unused FeatureFlagsService from wallet-initializer constructor
Original prompt

This section details on the original issue you should resolve

<issue_title>Remove anonymous users feature</issue_title>
<issue_description>## Why

console switched to a new start trial flow where anonymous users are not needed anymore

What

Remove all occurrences of anonymous users:

  • creation on deploy-web (extra headers handling on signup via cookie)
  • routes on console-api (cleanup user.service.ts)
  • sdk methods/classes in http-sdk
  • remove feature flag for ANONYMOUS_START_TRIAL on deployweb and in console-api</issue_description>

<agent_instructions>Remove all occurrences of anonymous users:

creation on deploy-web (extra headers handling on signup via cookie)
routes on console-api (cleanup user.service.ts)
sdk methods/classes in http-sdk
remove feature flag for ANONYMOUS_START_TRIAL on deployweb and in console-api</issue_description>
<agent_instructions>create a PR that removes anonymous user creation/removal/handling in api and deploy-web projects. Also remove relevant feature flag</agent_instructions>

remove corresponding to anonymous user tests and seeders</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@stalniy @baktun14 does it sound good? @baktun14 > [@baktun14](https://github.com/baktun14) does it sound good?

Yea makes sense, we need to make sure anonymous users are not created anymore and also the transfer logic</comment_new>


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Remove all occurrences of anonymous users Remove anonymous user feature Dec 30, 2025
Copilot AI requested a review from stalniy December 30, 2025 12:58
@stalniy stalniy changed the title Remove anonymous user feature refactor: remove anonymous user feature Dec 31, 2025
@stalniy stalniy force-pushed the copilot/remove-anonymous-users-feature-yet-again branch from a7587d3 to 01d44e9 Compare December 31, 2025 04:00
@codecov
Copy link

codecov bot commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 76.92308% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.02%. Comparing base (c3ee8f0) to head (8bd773c).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...web/src/components/new-deployment/ManifestEdit.tsx 0.00% 6 Missing ⚠️
...src/components/deployments/DeploymentSubHeader.tsx 0.00% 2 Missing ⚠️
...rc/billing/controllers/wallet/wallet.controller.ts 94.44% 1 Missing ⚠️
...b/src/components/deployments/DeploymentListRow.tsx 0.00% 1 Missing ⚠️
...ponents/new-deployment/CreateLease/CreateLease.tsx 80.00% 1 Missing ⚠️
...c/components/wallet/ConnectManagedWalletButton.tsx 50.00% 1 Missing ⚠️

❌ Your project status has failed because the head coverage (79.85%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2436      +/-   ##
==========================================
- Coverage   51.34%   51.02%   -0.32%     
==========================================
  Files        1069     1062       -7     
  Lines       29439    29188     -251     
  Branches     6466     6442      -24     
==========================================
- Hits        15115    14894     -221     
- Misses      13912    13939      +27     
+ Partials      412      355      -57     
Flag Coverage Δ *Carryforward flag
api 79.85% <96.55%> (-0.48%) ⬇️
deploy-web 31.04% <52.17%> (-0.36%) ⬇️
log-collector 75.35% <ø> (ø)
notifications 87.94% <ø> (ø)
provider-console 81.48% <ø> (ø) Carriedforward from c3ee8f0
provider-proxy 84.35% <ø> (ø) Carriedforward from c3ee8f0

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...s/api/src/auth/services/ability/ability.service.ts 96.00% <ø> (-0.16%) ⬇️
apps/api/src/auth/services/auth.interceptor.ts 94.02% <100.00%> (-0.78%) ⬇️
.../services/managed-signer/managed-signer.service.ts 97.61% <100.00%> (-0.26%) ⬇️
...s/wallet-initializer/wallet-initializer.service.ts 88.23% <100.00%> (-0.34%) ⬇️
...i/src/core/services/feature-flags/feature-flags.ts 100.00% <ø> (ø)
apps/api/src/rest-app.ts 98.80% <100.00%> (ø)
...s/api/src/user/controllers/user/user.controller.ts 100.00% <100.00%> (ø)
.../api/src/user/repositories/user/user.repository.ts 94.44% <100.00%> (-5.56%) ⬇️
apps/api/src/user/schemas/user.schema.ts 100.00% <100.00%> (ø)
apps/api/src/user/services/user/user.service.ts 93.47% <100.00%> (+1.67%) ⬆️
... and 15 more

... and 56 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stalniy stalniy force-pushed the copilot/remove-anonymous-users-feature-yet-again branch from 01d44e9 to 1d30a80 Compare January 2, 2026 04:58
@stalniy
Copy link
Contributor

stalniy commented Jan 2, 2026

@copilot there are some eslint errors in gha results, please fix them

Copy link
Contributor Author

Copilot AI commented Jan 2, 2026

@copilot there are some eslint errors in gha results, please fix them

Fixed in 3a088ac. Removed unused imports: FeatureFlags from wallet controller and billing services, isNull from user repository, FeatureFlagsService from wallet-initializer constructor, and fixed import sorting in start-trial.spec.ts.

@stalniy stalniy force-pushed the copilot/remove-anonymous-users-feature-yet-again branch 2 times, most recently from 5dac836 to 4d3d818 Compare January 2, 2026 06:36
@stalniy stalniy marked this pull request as ready for review January 2, 2026 06:36
@stalniy stalniy requested a review from a team as a code owner January 2, 2026 06:36
ygrishajev
ygrishajev previously approved these changes Jan 2, 2026
baktun14
baktun14 previously approved these changes Jan 2, 2026
Copilot AI and others added 8 commits January 3, 2026 07:25
Co-authored-by: stalniy <1159966+stalniy@users.noreply.github.com>
…ests

Co-authored-by: stalniy <1159966+stalniy@users.noreply.github.com>
Co-authored-by: stalniy <1159966+stalniy@users.noreply.github.com>
Co-authored-by: stalniy <1159966+stalniy@users.noreply.github.com>
Co-authored-by: stalniy <1159966+stalniy@users.noreply.github.com>
Co-authored-by: stalniy <1159966+stalniy@users.noreply.github.com>
@stalniy stalniy dismissed stale reviews from baktun14 and ygrishajev via 8bd773c January 3, 2026 06:28
@stalniy stalniy force-pushed the copilot/remove-anonymous-users-feature-yet-again branch from f443218 to 8bd773c Compare January 3, 2026 06:28
@stalniy stalniy merged commit d221387 into main Jan 3, 2026
65 of 66 checks passed
@stalniy stalniy deleted the copilot/remove-anonymous-users-feature-yet-again branch January 3, 2026 07:04
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.

Remove anonymous users feature

4 participants