Skip to content

Remove anonymous users feature - #2428

Closed
stalniy with Copilot wants to merge 4 commits into
mainfrom
copilot/remove-anonymous-users-feature-another-one
Closed

stalniy with Copilot wants to merge 4 commits into
mainfrom
copilot/remove-anonymous-users-feature-another-one

Conversation

Copilot AI commented Dec 27, 2025 •

Copy link
Copy Markdown
Contributor

Console switched to a new start trial flow where anonymous users are no longer needed. This removes all anonymous user creation, handling, and the ANONYMOUS_FREE_TRIAL feature flag.

API Changes

  • Removed routes: POST /v1/anonymous-users, GET /v1/anonymous-users/:id
  • Removed ANONYMOUS_FREE_TRIAL from feature flags
  • Removed REGULAR_ANONYMOUS_USER role from ability service
  • Removed findAnonymousById from user repository
  • Removed anonymousUserId parameter and wallet transfer logic from user.service.ts
  • Updated wallet.controller.ts to always enforce email verification + payment method
  • Updated managed-signer.service.ts to remove anonymous trial validation
  • Updated wallet-initializer.service.ts to always publish TrialStarted event

Deploy-web Changes

  • Removed AnonymousUserProvider, useStoredAnonymousUser, useAnonymousUserQuery
  • Removed auth.config.ts (ANONYMOUS_USER_TOKEN_KEY, ANONYMOUS_USER_KEY)
  • Removed anonymous_free_trial from feature flags type
  • Updated auth interceptors to remove anonymous token handling
  • Updated signup page to remove anonymous cookie handling
  • Simplified components:
    • ConnectManagedWalletButton: Always navigates to onboarding
    • ManifestEdit: Removed trial deployment limit, always uses TRIAL_REGISTERED_ATTRIBUTE
    • CreateLease: Removed zero bids warning for anonymous users
    • Trial badges now show for all trial users

HTTP-SDK

  • Removed getOrCreateAnonymousUser, createAnonymousUser, getAnonymousUser from UserHttpService

Tests

  • Updated test files to remove anonymous user mocks and assertions
  • Removed buildAnonymousUser seeder
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>create a PR that removes anonymous user creation/removal/handling in api and deploy-web projects. Also remove relevant feature flag</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>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Dec 27, 2025
@coderabbitai

coderabbitai Bot commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

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.

@stalniy

stalniy commented Dec 27, 2025

Copy link
Copy Markdown
Contributor

@copilot use semantic release commit messages please

Copilot AI and others added 3 commits December 27, 2025 06:49
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>
Copilot AI changed the title [WIP] Remove anonymous users feature from api and deploy-web Remove anonymous users feature Dec 27, 2025
Copilot AI requested a review from stalniy December 27, 2025 07:10

Copilot AI commented Dec 27, 2025

Copy link
Copy Markdown
Contributor Author

@copilot use semantic release commit messages please

The more recent commits already use semantic release format (e.g., fix: address code review feedback - remove unused code). I cannot rewrite the earlier commit messages as force push is not available, but all future commits will follow the semantic release convention.

Comment thread package-lock.json
@@ -395,7 +395,6 @@
"resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.0.tgz",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔄 Carefully review the package-lock.json diff

Resolve the comment if everything is ok

+ node_modules/git-semver-tags/node_modules/conventional-commits-filter                    5.0.0   
+ node_modules/git-semver-tags/node_modules/conventional-commits-parser                    6.2.1   

@codecov

codecov Bot commented Dec 27, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.16%. Comparing base (1a6728d) to head (122120e).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

❌ Your project status has failed because the head coverage (79.91%) 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    #2428      +/-   ##
==========================================
- Coverage   51.31%   51.16%   -0.16%     
==========================================
  Files        1071     1071              
  Lines       29336    29135     -201     
  Branches     6463     6391      -72     
==========================================
- Hits        15055    14906     -149     
+ Misses      13947    13872      -75     
- Partials      334      357      +23     
Flag Coverage Δ *Carryforward flag
api 79.91% <ø> (-0.15%) ⬇️ Carriedforward from 1a6728d
deploy-web 31.26% <ø> (-0.18%) ⬇️ Carriedforward from 1a6728d
log-collector 75.35% <ø> (ø)
notifications 87.94% <ø> (ø)
provider-console 81.48% <ø> (ø)
provider-proxy 84.35% <ø> (ø)

*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 93.93% <ø> (-0.87%) ⬇️
...rc/billing/controllers/wallet/wallet.controller.ts 100.00% <ø> (+1.61%) ⬆️
.../services/managed-signer/managed-signer.service.ts 97.33% <ø> (-0.29%) ⬇️
...s/wallet-initializer/wallet-initializer.service.ts 85.71% <ø> (-2.17%) ⬇️
...i/src/core/services/feature-flags/feature-flags.ts 100.00% <ø> (ø)
apps/api/src/rest-app.ts 98.79% <ø> (-0.02%) ⬇️
...s/api/src/user/controllers/user/user.controller.ts 100.00% <ø> (ø)
.../api/src/user/repositories/user/user.repository.ts 100.00% <ø> (ø)
apps/api/src/user/schemas/user.schema.ts 100.00% <ø> (ø)
... and 15 more

... and 7 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 commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

@copilot rebase and fix conflicts

Copilot AI commented Dec 29, 2025

Copy link
Copy Markdown
Contributor Author

@copilot rebase and fix conflicts

I'm unable to perform git rebase operations as force push is not available in my environment. Could you please rebase this branch and resolve the conflicts, or alternatively, I can help identify and manually re-apply the changes on top of the latest main branch if you create a new branch for me to work on.

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

2 participants