Skip to content

refactor(wallet): remove stale isSignedInWithTrial flag - #3563

Merged
baktun14 merged 3 commits into
mainfrom
refactor/wallet-remove-signed-in-with-trial-flag
Aug 7, 2026
Merged

refactor(wallet): remove stale isSignedInWithTrial flag#3563
baktun14 merged 3 commits into
mainfrom
refactor/wallet-remove-signed-in-with-trial-flag

Conversation

@baktun14

@baktun14 baktun14 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Why

The isSignedInWithTrial jotai atom (localStorage-persisted, introduced Oct 2024) tracked "this browser once had a signed-in user with a trial wallet". It was write-only-to-true — never reset on logout, never cleared — so it went permanently stale.

More broadly, the entire "Start Trial" connect-wallet surface is obsolete: a managed wallet and trial are now created automatically when an account is created, so there is no manual wallet-connection step left for the UI to offer.

What

  • Delete the isSignedInWithTrial atom from walletStore and its only writer (a useEffect in useManagedWallet).
  • Delete ConnectManagedWalletButton ("Start Trial") and WalletConnectionButtons components + specs — dead UI now that wallets are auto-provisioned.
  • WalletStatus (top nav / mobile sidebar) renders nothing when no wallet is connected instead of the Start Trial button.
  • NoDeploymentsState always shows the Create Deployment / Explore Templates CTAs; the isWalletConnected prop and the "you may need to sign in" hint are removed.
  • GetStartedStepper keeps the "Billing is not set up" indicator but no longer offers the connect buttons.

The orphaned isSignedInWithTrial localStorage key in existing browsers is harmless and needs no cleanup migration.

Summary by CodeRabbit

  • Simplified Deployment Experience

    • Empty deployment screens now show deployment and template controls without wallet connection prompts.
    • Disconnected wallet status areas no longer display connection or trial sign-in buttons.
  • Onboarding Updates

    • Billing setup guidance now focuses on the billing status without additional wallet prompts.
  • Bug Fixes

    • Removed outdated trial sign-in state for more consistent wallet status handling.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e757c05d-670c-452c-8af6-d3730d7052f4

📥 Commits

Reviewing files that changed from the base of the PR and between 5c6a08c and 00259d9.

📒 Files selected for processing (1)
  • apps/deploy-web/src/components/get-started/GetStartedStepper.tsx
💤 Files with no reviewable changes (1)
  • apps/deploy-web/src/components/get-started/GetStartedStepper.tsx

📝 Walkthrough

Walkthrough

Changes

Trial wallet flow removal

Layer / File(s) Summary
Remove trial wallet state
apps/deploy-web/src/store/walletStore.ts, apps/deploy-web/src/hooks/useManagedWallet.ts
The persisted isSignedInWithTrial atom and its update effect were removed. useManagedWallet now uses direct user, mutation, and wallet utilities.
Simplify wallet connection UI
apps/deploy-web/src/components/home/NoDeploymentsState.tsx, apps/deploy-web/src/components/deployments/DeploymentList.tsx, apps/deploy-web/src/components/get-started/GetStartedStepper.tsx, apps/deploy-web/src/components/wallet/WalletConnectionButtons.tsx, apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
The empty state always renders deployment controls. Wallet connection components, disconnected-wallet guidance, and related rendering paths were removed.
Update wallet status behavior
apps/deploy-web/src/components/layout/WalletStatus.tsx, apps/deploy-web/src/components/layout/WalletStatus.spec.tsx
WalletStatus renders nothing for an initialized, disconnected wallet. The test verifies this behavior.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/wallet-remove-signed-in-with-trial-flag

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

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Clean removal of a dead, permanently-stale flag with matching test/behavior updates.

Extended reasoning...

Overview

The PR deletes the isSignedInWithTrial jotai atom, its only writer (a useEffect in useManagedWallet), and its two read sites (WalletConnectionButtons and NoDeploymentsState). Tests are updated to match: the jotai store/provider plumbing and the removed 'Sign in' link assertion are dropped from WalletConnectionButtons.spec.tsx.

Security risks

None. This only removes a client-side, localStorage-persisted UI flag; no auth, data access, or validation logic is touched.

Level of scrutiny

Low. This is a straightforward dead-code removal in the frontend UI layer (deploy-web), not a critical path. I grepped the repo for remaining references to isSignedInWithTrial and WalletConnectionButtons usage — no other call sites depend on the removed prop/behavior, and the PR description's stated rationale (write-only-to-true, never reset, superseded by onboarding flow) checks out against the diff.

Other factors

The behavior change (always showing 'Start Trial' instead of conditionally showing a 'Sign in' link) is intentional and explained in the PR description, and the spec file was updated consistently. Scope is small (5 files) and self-contained.

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.53%. Comparing base (c23cb72) to head (00259d9).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...loy-web/src/components/home/NoDeploymentsState.tsx 33.33% 2 Missing ⚠️
...-web/src/components/deployments/DeploymentList.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3563      +/-   ##
==========================================
- Coverage   75.39%   74.53%   -0.86%     
==========================================
  Files        1165     1073      -92     
  Lines       30316    27928    -2388     
  Branches     7540     7064     -476     
==========================================
- Hits        22856    20817    -2039     
+ Misses       6587     6268     -319     
+ Partials      873      843      -30     
Flag Coverage Δ *Carryforward flag
api 88.64% <ø> (ø) Carriedforward from 5c6a08c
deploy-web 65.14% <50.00%> (-0.03%) ⬇️
log-collector ?
notifications 93.84% <ø> (ø) Carriedforward from 5c6a08c
provider-console 81.38% <ø> (ø) Carriedforward from 5c6a08c
provider-inventory ?
provider-proxy 88.17% <ø> (ø) Carriedforward from 5c6a08c
tx-signer ?

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

Files with missing lines Coverage Δ
...b/src/components/get-started/GetStartedStepper.tsx 70.83% <100.00%> (-1.17%) ⬇️
.../deploy-web/src/components/layout/WalletStatus.tsx 100.00% <100.00%> (ø)
apps/deploy-web/src/hooks/useManagedWallet.ts 92.30% <ø> (-1.25%) ⬇️
apps/deploy-web/src/store/walletStore.ts 100.00% <ø> (ø)
...-web/src/components/deployments/DeploymentList.tsx 0.00% <0.00%> (ø)
...loy-web/src/components/home/NoDeploymentsState.tsx 20.00% <33.33%> (+7.50%) ⬆️

... and 90 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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/deploy-web/src/components/wallet/WalletConnectionButtons.spec.tsx`:
- Around line 11-19: Replace both vi.fn(ComponentMock) constructions in the test
and setup function with typed mock<typeof
DEPENDENCIES.ConnectManagedWalletButton>() instances from vitest-mock-extended,
configuring ComponentMock as the mock implementation so the component still
returns JSX. Remove the resulting as unknown as cast while preserving the
existing dependency injection and assertion behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 66beb5db-5809-4e6e-b506-58a8310da4d0

📥 Commits

Reviewing files that changed from the base of the PR and between c23cb72 and 97f1cdc.

📒 Files selected for processing (5)
  • apps/deploy-web/src/components/home/NoDeploymentsState.tsx
  • apps/deploy-web/src/components/wallet/WalletConnectionButtons.spec.tsx
  • apps/deploy-web/src/components/wallet/WalletConnectionButtons.tsx
  • apps/deploy-web/src/hooks/useManagedWallet.ts
  • apps/deploy-web/src/store/walletStore.ts
💤 Files with no reviewable changes (3)
  • apps/deploy-web/src/hooks/useManagedWallet.ts
  • apps/deploy-web/src/components/home/NoDeploymentsState.tsx
  • apps/deploy-web/src/store/walletStore.ts

Comment thread apps/deploy-web/src/components/wallet/WalletConnectionButtons.spec.tsx Outdated
@github-actions github-actions Bot added size: M and removed size: S labels Aug 6, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — the removed "Start Trial"/"Connect Wallet" copy nit below is minor and doesn't block this cleanup.

Extended reasoning...

Overview

This PR deletes the now-dead "Start Trial"/manual wallet-connect UI surface (ConnectManagedWalletButton, WalletConnectionButtons, the isSignedInWithTrial jotai atom and its writer effect) since wallets and trials are now auto-provisioned on account creation. It touches WalletStatus, NoDeploymentsState, GetStartedStepper, DeploymentList, and useManagedWallet, removing unused props/branches and updating the corresponding specs.

Security risks

None. This is a pure UI/state cleanup removing dead code paths — no auth, data access, or crypto logic is touched.

Level of scrutiny

Low-to-moderate is appropriate: it's a mechanical deletion of an obsolete flow with no behavioral risk to the remaining paths (managed wallet creation/usage is unchanged), and Codecov confirms all changed/coverable lines remain covered with all tests passing. The one flagged issue is stale instructional copy left behind by the removal — cosmetic, not a functional break, and callable out via the inline comment rather than blocking the PR.

Other factors

Tests were updated consistently with the component deletions (specs removed alongside components, WalletStatus spec updated to assert nothing renders). No outstanding unaddressed reviewer comments other than CodeRabbit's optional test-typing nit, which is stylistic and not correctness-affecting.

Comment thread apps/deploy-web/src/components/get-started/GetStartedStepper.tsx

@coderabbitai coderabbitai Bot left a comment

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/deploy-web/src/components/get-started/GetStartedStepper.tsx (1)

22-27: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Update the disconnected-wallet instructions.

On /get-started, WalletStatus renders nothing when disconnected, and the Start Trial button exists only in PaymentMethodStep. Users cannot click either "Start Trial" or "Connect Wallet" from this page. Remove the instruction or render matching controls.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/deploy-web/src/components/get-started/GetStartedStepper.tsx` around
lines 22 - 27, Update the disconnected-wallet guidance in GetStartedStepper so
it does not instruct users to click unavailable “Start Trial” or “Connect
Wallet” controls when WalletStatus renders nothing and PaymentMethodStep is not
active; remove that instruction or render controls matching those actions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@apps/deploy-web/src/components/get-started/GetStartedStepper.tsx`:
- Around line 22-27: Update the disconnected-wallet guidance in
GetStartedStepper so it does not instruct users to click unavailable “Start
Trial” or “Connect Wallet” controls when WalletStatus renders nothing and
PaymentMethodStep is not active; remove that instruction or render controls
matching those actions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 85a547b4-83b3-4959-9c49-c9cd34ae8a08

📥 Commits

Reviewing files that changed from the base of the PR and between 97f1cdc and 5c6a08c.

📒 Files selected for processing (9)
  • apps/deploy-web/src/components/deployments/DeploymentList.tsx
  • apps/deploy-web/src/components/get-started/GetStartedStepper.tsx
  • apps/deploy-web/src/components/home/NoDeploymentsState.tsx
  • apps/deploy-web/src/components/layout/WalletStatus.spec.tsx
  • apps/deploy-web/src/components/layout/WalletStatus.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.spec.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/components/wallet/WalletConnectionButtons.spec.tsx
  • apps/deploy-web/src/components/wallet/WalletConnectionButtons.tsx
💤 Files with no reviewable changes (4)
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.spec.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/components/wallet/WalletConnectionButtons.tsx
  • apps/deploy-web/src/components/wallet/WalletConnectionButtons.spec.tsx

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM — the stale copy issue I flagged in my previous review (GetStartedStepper still referencing the removed "Start Trial"/"Connect Wallet" buttons) has been fixed by a follow-up commit removing that paragraph; no other issues found.

Extended reasoning...

This PR completes a dead-code removal refactor: it deletes the obsolete isSignedInWithTrial jotai atom and its only writer, deletes the now-unused ConnectManagedWalletButton and WalletConnectionButtons components (and their specs), and simplifies WalletStatus, NoDeploymentsState, DeploymentList, and GetStartedStepper to stop rendering the removed connect-wallet UI. Grep confirms no remaining references to isSignedInWithTrial, WalletConnectionButtons, or ConnectManagedWalletButton anywhere in apps/deploy-web/src, so the removal is clean. No security risk: this is UI dead-code removal in a non-auth, non-crypto surface. Scrutiny level is low-to-moderate given the diff is almost entirely deletions plus straightforward simplification, covered by updated specs. In a prior run I flagged that GetStartedStepper left a paragraph referencing the deleted Start Trial/Connect Wallet buttons; a follow-up commit in this diff removes that paragraph, resolving the concern.

@baktun14
baktun14 added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit 6822a25 Aug 7, 2026
58 checks passed
@baktun14
baktun14 deleted the refactor/wallet-remove-signed-in-with-trial-flag branch August 7, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants