Skip to content

feat(billing): new onboarding flow#1711

Merged
baktun14 merged 28 commits intomainfrom
features/onboarding-start-page
Jul 24, 2025
Merged

feat(billing): new onboarding flow#1711
baktun14 merged 28 commits intomainfrom
features/onboarding-start-page

Conversation

@baktun14
Copy link
Contributor

@baktun14 baktun14 commented Jul 21, 2025

Summary by CodeRabbit

  • New Features

    • Introduced a comprehensive onboarding flow with multi-step UI, including free trial initiation, email verification, payment method setup, and a welcome step.
    • Added new onboarding-related components, such as stepper navigation, confetti and success animations, and Stripe-based payment verification.
    • Implemented feature flag controls for anonymous user trials and trial deployment limits.
    • Added a StripeService for managing Stripe client instances with dependency injection.
  • Enhancements

    • Improved navigation and user experience by leveraging client-side routing and updating logo dimensions.
    • Updated analytics to track detailed onboarding events and categories.
    • Refined payment method forms to include billing address collection and enhanced UI.
    • Adjusted trial allowance amount and expiration defaults for better trial management.
    • Enhanced conditional rendering and validation logic based on feature flags in deployment and wallet components.
    • Centralized Stripe integration and payment form usage for consistency.
  • Bug Fixes

    • Improved validation checks for user eligibility in trial creation.
    • Enhanced error handling and UI state management in payment method onboarding.
    • Fixed conditional rendering logic in bid display and deployment components.
  • Chores

    • Removed legacy service worker and Workbox scripts.
    • Updated test suites and helper methods to align with new onboarding and trial flows, including anonymous user wallet creation.
    • Centralized shared component exports for easier imports.
    • Refactored stepper component to use a shared implementation.
    • Updated environment variables and configuration for Auth0 and trial settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 21, 2025

Walkthrough

This update introduces a comprehensive onboarding flow for free trial users, including new React components for multi-step onboarding, email verification, payment method management, and feature flag gating. It adds a centralized Stripe service, updates navigation and analytics logic, and modifies environment/configuration settings. Extensive tests and UI enhancements are included, along with the removal of legacy service worker files.

Changes

File(s) / Path(s) Change Summary
apps/api/env/.env, apps/api/env/.env.functional.test Updated environment variables: increased trial allowance amount and expanded Auth0 settings.
apps/api/src/billing/config/env.config.ts Changed default trial allowance expiration from 14 to 30 days.
apps/api/src/billing/controllers/wallet/wallet.controller.ts, apps/api/src/billing/services/managed-signer/managed-signer.service.ts Injected FeatureFlagsService and added feature flag checks for anonymous free trial logic.
apps/api/src/core/services/feature-flags/feature-flags.ts Added ANONYMOUS_FREE_TRIAL feature flag.
apps/api/test/functional/*.spec.ts Updated test helpers to use createAnonymousUserAndWallet() for user creation in various functional tests.
apps/api/test/services/wallet-testing.service.ts Refactored and expanded wallet testing helpers; added user registration support.
apps/deploy-web/public/sw.js, apps/deploy-web/public/workbox-495fd258.js Deleted service worker and Workbox files for offline caching.
apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx, apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx Switched navigation from window.location.href to Next.js router for payment/checkout.
apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx, apps/deploy-web/src/components/layout/AkashLogo.tsx Adjusted logo default heights.
apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx, apps/deploy-web/src/components/new-deployment/CreateLease.tsx, apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx Gated trial-related UI and logic on the allowAnonymousUserTrial feature flag.
apps/deploy-web/src/components/new-deployment/BidGroup.tsx, apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx Refined bid rendering logic and made provider prop optional in BidRow.
apps/deploy-web/src/components/new-deployment/Stepper.tsx Replaced custom stepper with shared Stepper component.
apps/deploy-web/src/components/onboarding/*, apps/deploy-web/src/pages/signup/index.tsx Added new onboarding flow: multi-step onboarding container, stepper, email verification, payment method, and welcome components, plus associated tests.
apps/deploy-web/src/components/shared/ConfettiAnimation.tsx, apps/deploy-web/src/components/shared/SuccessAnimation.tsx, apps/deploy-web/src/components/shared/Stepper.tsx Introduced shared UI components for animation and stepper functionality.
apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx Refactored and renamed payment method form; added billing address and dynamic button text.
apps/deploy-web/src/components/shared/index.ts Centralized exports for shared components.
apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx, apps/deploy-web/src/components/user/payment/index.ts Switched to shared payment method form and removed local export.
apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx Updated trial connection logic to use onboarding route and Next.js router.
apps/deploy-web/src/hooks/useUser.ts Switched analytics service access to use DI context.
apps/deploy-web/src/pages/api/auth/signup.ts, apps/deploy-web/src/utils/urlUtils.ts Enhanced signup handler and URL utilities to support return URLs and onboarding routing.
apps/deploy-web/src/services/analytics/analytics.service.ts Added onboarding-related analytics events and category.
apps/deploy-web/src/services/app-di-container/app-di-container.ts, apps/deploy-web/src/services/stripe/stripe.service.ts, apps/deploy-web/src/services/stripe/stripe.service.spec.ts Introduced a new Stripe service with DI, caching, and tests.
.cursor/rules/general.mdc Updated file glob patterns for code rules, removing JSX files.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant OnboardingPage
    participant OnboardingContainer
    participant OnboardingView
    participant EmailVerificationStep
    participant PaymentMethodStep
    participant WelcomeStep

    User->>OnboardingPage: Visit /signup
    OnboardingPage->>OnboardingContainer: Render
    OnboardingContainer->>OnboardingView: Pass step state and handlers
    OnboardingView->>User: Render current step (e.g., FreeTrialLandingStep)
    User->>OnboardingView: Interact with step (e.g., Start Trial)
    OnboardingView->>OnboardingContainer: onStartTrial
    OnboardingContainer->>OnboardingView: Advance to next step (e.g., EmailVerificationStep)
    OnboardingView->>EmailVerificationStep: Render
    User->>EmailVerificationStep: Verify email, continue
    EmailVerificationStep->>OnboardingView: onContinue
    OnboardingView->>OnboardingContainer: Mark step complete, advance
    OnboardingView->>PaymentMethodStep: Render
    User->>PaymentMethodStep: Add payment method
    PaymentMethodStep->>OnboardingView: onPaymentMethodComplete
    OnboardingView->>OnboardingContainer: Mark payment step complete, advance
    OnboardingView->>WelcomeStep: Render
    User->>WelcomeStep: Click "Start Deploying"
    WelcomeStep->>OnboardingView: onComplete
    OnboardingView->>OnboardingContainer: Complete onboarding
    OnboardingContainer->>OnboardingPage: Redirect to home
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~90 minutes

Possibly related PRs

Suggested reviewers

  • stalniy

Poem

A bunny hops through code anew,
With onboarding steps and features true,
Confetti flies and payments flow,
Stripe and trials steal the show.
Feature flags now lead the way—
Hop on in, deploy today!
(And don't forget to celebrate with hay!)

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-07-23T22_48_56_652Z-debug-0.log

Note

⚡️ Unit Test Generation - Beta

CodeRabbit's unit test generation is now available in Beta! Automatically generate comprehensive unit tests for your code changes, ensuring better test coverage and catching edge cases you might miss. Our AI analyzes your code structure and creates tests that follow best practices and your project's testing patterns. Learn more here, or just try it under ✨ Finishing Touches.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch features/onboarding-start-page

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov
Copy link

codecov bot commented Jul 21, 2025

Codecov Report

Attention: Patch coverage is 87.79343% with 26 lines in your changes missing coverage. Please review.

Project coverage is 72.51%. Comparing base (218cdc4) to head (b006040).
Report is 2 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...c/components/wallet/ConnectManagedWalletButton.tsx 25.00% 6 Missing ⚠️
...s/deploy-web/src/services/stripe/stripe.service.ts 83.33% 3 Missing and 2 partials ⚠️
...rc/billing/controllers/wallet/wallet.controller.ts 66.66% 4 Missing ⚠️
...arding/OnboardingContainer/OnboardingContainer.tsx 93.65% 2 Missing and 2 partials ⚠️
...ploy-web/src/components/icons/AkashConsoleLogo.tsx 0.00% 2 Missing ⚠️
...-web/src/components/layout/WelcomeToTrialModal.tsx 33.33% 2 Missing ⚠️
.../PaymentMethodContainer/PaymentMethodContainer.tsx 95.00% 2 Missing ⚠️
...eb/src/components/new-deployment/BidRow/BidRow.tsx 85.71% 0 Missing and 1 partial ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1711      +/-   ##
==========================================
+ Coverage   72.42%   72.51%   +0.09%     
==========================================
  Files         607      606       -1     
  Lines       14188    14204      +16     
  Branches     2419     2456      +37     
==========================================
+ Hits        10275    10300      +25     
+ Misses       3779     3591     -188     
- Partials      134      313     +179     
Flag Coverage Δ *Carryforward flag
api 80.16% <77.77%> (-0.02%) ⬇️
deploy-web 57.56% <88.71%> (+1.18%) ⬆️
log-collector ?
notifications 87.25% <ø> (ø) Carriedforward from 218cdc4
provider-console 80.95% <ø> (ø) Carriedforward from 218cdc4
provider-proxy 84.35% <ø> (ø) Carriedforward from 218cdc4

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

Files with missing lines Coverage Δ
apps/api/src/billing/config/env.config.ts 100.00% <ø> (ø)
.../services/managed-signer/managed-signer.service.ts 96.66% <100.00%> (+0.23%) ⬆️
...i/src/core/services/feature-flags/feature-flags.ts 100.00% <ø> (ø)
...pps/deploy-web/src/components/layout/AkashLogo.tsx 66.66% <100.00%> (ø)
...rificationContainer/EmailVerificationContainer.tsx 100.00% <100.00%> (ø)
apps/deploy-web/src/hooks/useUser.ts 92.30% <100.00%> (+0.64%) ⬆️
...oy-web/src/services/analytics/analytics.service.ts 88.04% <ø> (ø)
.../src/services/app-di-container/app-di-container.ts 95.50% <100.00%> (-1.01%) ⬇️
apps/deploy-web/src/utils/urlUtils.ts 80.00% <100.00%> (+0.54%) ⬆️
...eb/src/components/new-deployment/BidRow/BidRow.tsx 77.58% <85.71%> (-0.99%) ⬇️
... and 7 more

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

@baktun14 baktun14 marked this pull request as ready for review July 22, 2025 11:19
@baktun14 baktun14 requested a review from a team as a code owner July 22, 2025 11:19
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

🔭 Outside diff range comments (4)
apps/api/test/functional/lease-flow.spec.ts (1)

84-91: Refactor to use setup function instead of beforeEach.

According to the coding guidelines, test files should use a setup function instead of beforeEach. The setup function should be at the bottom of the describe block, accept a single parameter with inline type definition, create the object under test, and return it.

Consider refactoring like this:

-  beforeEach(() => {
-    currentHeight = faker.number.int({ min: 1000000, max: 10000000 });
-    jest.spyOn(blockHttpService, "getCurrentHeight").mockResolvedValue(currentHeight);
-
-    // Mock provider service methods
-    jest.spyOn(providerService, "sendManifest").mockResolvedValue(true);
-    jest.spyOn(providerService, "getLeaseStatus").mockResolvedValue(LeaseStatusSeeder.create());
-  });

And add a setup function at the bottom of the describe block that handles test initialization.

apps/api/test/functional/user-init.spec.ts (1)

45-62: Refactor to use setup function instead of beforeEach.

According to the coding guidelines, test files should use a setup function instead of beforeEach. The setup function should be at the bottom of the describe block, accept a single parameter with inline type definition, and return the object under test.

Consider moving this initialization logic to a setup function at the bottom of the describe block.

apps/api/test/functional/deployment-setting.spec.ts (1)

18-20: Replace beforeEach with setup function

According to the coding guidelines, test files should use a setup function instead of beforeEach. The setup function should be at the bottom of the root describe block and create the object under test.

Apply this refactor:

-  beforeEach(() => {
-    jest.spyOn(leaseRepository, "findOneByDseqAndOwner").mockResolvedValue(DrainingDeploymentSeeder.create());
-  });

Add a setup function at the bottom of the describe block:

+  const setup = () => {
+    jest.spyOn(leaseRepository, "findOneByDseqAndOwner").mockResolvedValue(DrainingDeploymentSeeder.create());
+    
+    return {
+      walletService,
+      deploymentSettingRepository,
+      leaseRepository
+    };
+  };

Then call setup() in each test that needs it.

apps/api/test/functional/sign-and-broadcast-tx.spec.ts (1)

12-14: Missing setup function pattern

According to coding guidelines, test files should use a setup function instead of direct service instantiation. Consider refactoring to follow the established pattern.

Add a setup function at the bottom of the describe block:

+  const setup = () => {
+    const registry = container.resolve<Registry>(TYPE_REGISTRY);
+    const walletService = new WalletTestingService(app);
+    
+    return {
+      registry,
+      walletService
+    };
+  };
🧹 Nitpick comments (15)
apps/deploy-web/src/utils/stripeUtils.ts (1)

5-12: LGTM: Well-implemented Stripe utility with proper error handling.

The function correctly handles the missing publishable key scenario and provides a clean Promise-based interface. Consider memoizing the result if this function will be called multiple times to avoid redundant Stripe loading.

apps/api/env/.env (1)

3-3: LGTM: Trial allowance increase aligns with enhanced onboarding flow.

The 10x increase in trial deployment allowance supports the new onboarding experience mentioned in the PR objectives.

Consider reordering the keys alphabetically as suggested by the linter, though this doesn't affect functionality.

apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (1)

42-43: Add router to dependency array.

The router should be included in the dependency array since it's used in the callback.

-    [isTrialing, isManaged, requireAction, user?.userId]
+    [isTrialing, isManaged, requireAction, user?.userId, router]
apps/api/src/billing/services/managed-signer/managed-signer.service.ts (1)

73-82: Correct feature flag gating with potential for simplification

The conditional trial validation logic correctly gates behind the feature flag. The nested Promise.all structure is functional but could be simplified for better readability.

Consider flattening the Promise.all structure:

-    if (this.featureFlagsService.isEnabled(FeatureFlags.ANONYMOUS_FREE_TRIAL)) {
-      await Promise.all(
-        messages.map(message =>
-          Promise.all([
-            this.anonymousValidateService.validateLeaseProviders(message, userWallet, user),
-            this.anonymousValidateService.validateTrialLimit(message, userWallet)
-          ])
-        )
-      );
-    }
+    if (this.featureFlagsService.isEnabled(FeatureFlags.ANONYMOUS_FREE_TRIAL)) {
+      const validations = messages.flatMap(message => [
+        this.anonymousValidateService.validateLeaseProviders(message, userWallet, user),
+        this.anonymousValidateService.validateTrialLimit(message, userWallet)
+      ]);
+      await Promise.all(validations);
+    }
apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx (1)

26-32: Remove stale dependency from useCallback.

The refactoring looks good, but there's a stale dependency in the useCallback hook. The whenLoggedIn variable is no longer used in the function but remains in the dependency array.

-  }, [connectManagedWallet, features?.allowAnonymousUserTrial, whenLoggedIn]);
+  }, [connectManagedWallet, features?.allowAnonymousUserTrial, router]);
apps/deploy-web/src/components/shared/ConfettiAnimation.tsx (1)

22-31: Consider performance impact of 100 confetti pieces.

The animation creates 100 confetti pieces which may impact performance on lower-end devices. Consider making the count configurable or reducing it to 50-75 pieces for better performance while maintaining visual impact.

+ const CONFETTI_COUNT = 75; // Configurable count for performance
+
  for (let i = 0; i < 100; i++) {
+ for (let i = 0; i < CONFETTI_COUNT; i++) {
apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx (1)

8-16: Consider using shared types.

The PaymentMethod interface is defined locally but might be duplicated elsewhere. Consider importing from a shared types file.

#!/bin/bash
# Description: Check for duplicate PaymentMethod type definitions
# Expected: Find if this type is defined elsewhere and could be shared

rg -A 10 "interface.*PaymentMethod" --type ts --type tsx
apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx (2)

17-20: Consider memoizing the theme-dependent variables.

The isDarkMode boolean and appearance configuration are recalculated on every render. Consider memoizing the appearance options to avoid unnecessary recalculations when theme doesn't change.

export const PaymentVerificationCard: React.FunctionComponent<PaymentVerificationCardProps> = ({ setupIntent, onSuccess }) => {
  const stripePromise = useMemo(() => getStripe(), []);
  const { resolvedTheme } = useTheme();
-  const isDarkMode = resolvedTheme === "dark";
+  
+  const appearanceOptions = useMemo(() => ({
+    theme: resolvedTheme === "dark" ? "night" : "stripe",
+    variables: {
+      colorPrimary: "#ff424c",
+      colorSuccess: "#ff424c"
+    }
+  }), [resolvedTheme]);

Then use appearance: appearanceOptions in the Elements component.


40-64: Improve error boundary fallback and add loading state.

The current error boundary fallback is quite basic. Consider providing a more informative error message and ensure the component handles the loading state when stripePromise is still resolving.

        {setupIntent?.clientSecret && (
-          <ErrorBoundary fallback={<div>Failed to load payment form</div>}>
+          <ErrorBoundary fallback={
+            <div className="p-4 text-center">
+              <p className="text-destructive mb-2">Failed to load payment form</p>
+              <p className="text-sm text-muted-foreground">
+                Please refresh the page or contact support if the issue persists.
+              </p>
+            </div>
+          }>
            {stripePromise ? (
              <Elements
                stripe={stripePromise}
                options={{
                  clientSecret: setupIntent.clientSecret,
-                  appearance: {
-                    theme: isDarkMode ? "night" : "stripe",
-                    variables: {
-                      colorPrimary: "#ff424c",
-                      colorSuccess: "#ff424c"
-                    }
-                  }
+                  appearance: appearanceOptions
                }}
              >
                <PaymentMethodForm onSuccess={onSuccess} buttonText="Add Payment Method" processingText="Processing..." />
              </Elements>
            ) : (
              <div className="p-4 text-center text-muted-foreground">
-                Payment processing is not available at this time. Please try again later or contact support if the issue persists.
+                <div className="animate-pulse">Loading payment form...</div>
              </div>
            )}
          </ErrorBoundary>
        )}
apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx (1)

11-32: Extract benefits data to a separate constants file.

The benefits array is static data that could be reused elsewhere and makes this component file longer. Consider extracting it to a constants or data file.

Create a new file src/constants/onboardingBenefits.ts:

import { Cloud, Dollar, Rocket, Server } from "iconoir-react";

export const ONBOARDING_BENEFITS = [
  {
    icon: <Rocket className="h-6 w-6" />,
    title: "Start Deploying in Minutes",
    description: "Get your applications running on Akash Network with our streamlined deployment process."
  },
  // ... rest of the benefits
] as const;

Then import and use it in the component:

import { AkashLogo } from "@src/components/layout/AkashLogo";
import { Title } from "@src/components/shared/Title";
import { UrlService } from "@src/utils/urlUtils";
+import { ONBOARDING_BENEFITS } from "@src/constants/onboardingBenefits";

-const benefits = [
-  // ... benefits array
-];
apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx (1)

27-41: Consider destructuring cardToDelete parameter to avoid confusion.

The cardToDelete parameter is renamed to _cardToDelete but never used, which might indicate dead code or unclear naming.

export const PaymentMethodStep: React.FunctionComponent<PaymentMethodStepProps> = ({
  setupIntent,
  paymentMethods,
  showAddForm,
  showDeleteConfirmation,
-  cardToDelete: _cardToDelete,
+  cardToDelete,
  isLoading,
  isRemoving,
  onSuccess,
  onRemovePaymentMethod,
  onConfirmRemovePaymentMethod,
  onNext,
  onShowDeleteConfirmation,
  onSetCardToDelete
}) => {

If cardToDelete is not needed in this component, consider removing it from the props interface and passing it only where necessary.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx (1)

14-34: Consider using more specific matchers for better test readability.

While the current test structure is correct, consider using more specific matchers to improve readability and provide better error messages when tests fail.

    expect(child).toHaveBeenCalledWith(
      expect.objectContaining({
-        setupIntent: undefined,
-        paymentMethods: [],
-        showAddForm: false,
-        showDeleteConfirmation: false,
-        cardToDelete: undefined,
-        isConnectingWallet: false,
-        isLoading: false,
-        isRemoving: false,
+        setupIntent: expect.toBeUndefined(),
+        paymentMethods: expect.toEqual([]),
+        showAddForm: expect.toBe(false),
+        showDeleteConfirmation: expect.toBe(false),
+        cardToDelete: expect.toBeUndefined(),
+        isConnectingWallet: expect.toBe(false),
+        isLoading: expect.toBe(false),
+        isRemoving: expect.toBe(false),
        onSuccess: expect.any(Function),
        // ... rest of the expectations
      })
    );
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)

131-141: Consider using router.push for consistency instead of window.location.href.

The component uses Next.js router in other places but falls back to window.location.href for the signup redirect. Consider using the router consistently or document why the full page navigation is necessary.

  const handleStartTrial = useCallback(() => {
    analyticsService.track("onboarding_free_trial_started", {
      category: "onboarding"
    });

    handleStepComplete(OnboardingStepIndex.FREE_TRIAL);

    const returnUrl = `${window.location.origin}${d.UrlService.onboarding(true)}`;
-    const signupUrl = `${d.UrlService.signup()}?returnTo=${encodeURIComponent(returnUrl)}`;
-    window.location.href = signupUrl;
+    const signupUrl = `${d.UrlService.signup()}?returnTo=${encodeURIComponent(returnUrl)}`;
+    // Using window.location.href for external Auth0 redirect
+    window.location.href = signupUrl;
  }, [analyticsService, handleStepComplete, d.UrlService]);

Or if router navigation is possible:

-    window.location.href = signupUrl;
+    try {
+      router.push(signupUrl);
+    } catch (error) {
+      // Fallback to full navigation for external auth
+      window.location.href = signupUrl;
+    }
apps/api/test/services/wallet-testing.service.ts (2)

56-78: Consider simplifying the union type definition.

The union type with 21 string literals is verbose. Consider using a more maintainable approach.

+type DebugUserCode = `debug${'' | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20}`;

-  async createRegisteredUser(
-    userCode:
-      | "debug"
-      | "debug1"
-      | "debug2"
-      // ... (other debug codes)
-      | "debug20" = "debug"
-  ) {
+  async createRegisteredUser(userCode: DebugUserCode = "debug") {

80-88: Consider extracting OAuth configuration to constants.

The hardcoded OAuth URL and parameters could be extracted to constants for better maintainability.

+const OAUTH_CONFIG = {
+  TOKEN_URL: 'http://localhost:8080/default/token',
+  CLIENT_ID: 'debug-client',
+  CODE_VERIFIER: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN123456'
+} as const;

-    const tokenResponse = await axios.post(
-      "http://localhost:8080/default/token",
-      `grant_type=authorization_code&code=${userCode}&client_id=debug-client&code_verifier=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN123456`,
+    const tokenResponse = await axios.post(
+      OAUTH_CONFIG.TOKEN_URL,
+      `grant_type=authorization_code&code=${userCode}&client_id=${OAUTH_CONFIG.CLIENT_ID}&code_verifier=${OAUTH_CONFIG.CODE_VERIFIER}`,
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 027ce79 and bab5228.

⛔ Files ignored due to path filters (2)
  • apps/deploy-web/public/sw.js.map is excluded by !**/*.map
  • apps/deploy-web/public/workbox-495fd258.js.map is excluded by !**/*.map
📒 Files selected for processing (60)
  • apps/api/env/.env (1 hunks)
  • apps/api/env/.env.functional.test (1 hunks)
  • apps/api/package.json (1 hunks)
  • apps/api/src/billing/config/env.config.ts (1 hunks)
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts (2 hunks)
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts (3 hunks)
  • apps/api/src/core/services/feature-flags/feature-flags.ts (1 hunks)
  • apps/api/test/functional/api-key.spec.ts (1 hunks)
  • apps/api/test/functional/balances.spec.ts (1 hunks)
  • apps/api/test/functional/certificate.spec.ts (1 hunks)
  • apps/api/test/functional/create-deployment.spec.ts (1 hunks)
  • apps/api/test/functional/deployment-setting.spec.ts (8 hunks)
  • apps/api/test/functional/lease-flow.spec.ts (1 hunks)
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts (3 hunks)
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts (1 hunks)
  • apps/api/test/functional/user-init.spec.ts (2 hunks)
  • apps/api/test/functional/wallets-refill.spec.ts (1 hunks)
  • apps/api/test/services/wallet-testing.service.ts (2 hunks)
  • apps/deploy-web/public/sw.js (0 hunks)
  • apps/deploy-web/public/workbox-495fd258.js (0 hunks)
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (4 hunks)
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx (2 hunks)
  • apps/deploy-web/src/components/layout/AkashLogo.tsx (1 hunks)
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (2 hunks)
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx (1 hunks)
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (7 hunks)
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx (3 hunks)
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx (5 hunks)
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx (2 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx (2 hunks)
  • apps/deploy-web/src/components/shared/Stepper.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/index.ts (1 hunks)
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx (2 hunks)
  • apps/deploy-web/src/components/user/payment/index.ts (0 hunks)
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx (2 hunks)
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (2 hunks)
  • apps/deploy-web/src/hooks/useUser.ts (2 hunks)
  • apps/deploy-web/src/pages/api/auth/signup.ts (1 hunks)
  • apps/deploy-web/src/pages/signup/index.tsx (1 hunks)
  • apps/deploy-web/src/services/analytics/analytics.service.ts (1 hunks)
  • apps/deploy-web/src/utils/stripeUtils.ts (1 hunks)
  • apps/deploy-web/src/utils/urlUtils.ts (1 hunks)
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/api/test/functional/balances.spec.ts
  • apps/api/src/billing/config/env.config.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/deploy-web/src/pages/api/auth/signup.ts
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts
  • apps/deploy-web/src/components/layout/AkashLogo.tsx
  • apps/api/test/functional/certificate.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/deploy-web/src/components/shared/index.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx
  • apps/deploy-web/src/hooks/useUser.ts
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx
  • apps/deploy-web/src/utils/urlUtils.ts
  • apps/deploy-web/src/components/shared/Stepper.tsx
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx
  • apps/deploy-web/src/pages/signup/index.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx
  • apps/api/test/services/wallet-testing.service.ts
  • apps/deploy-web/src/utils/stripeUtils.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/api/test/functional/balances.spec.ts
  • apps/api/src/billing/config/env.config.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/deploy-web/src/pages/api/auth/signup.ts
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts
  • apps/deploy-web/src/components/layout/AkashLogo.tsx
  • apps/api/test/functional/certificate.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/deploy-web/src/components/shared/index.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx
  • apps/deploy-web/src/hooks/useUser.ts
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx
  • apps/deploy-web/src/utils/urlUtils.ts
  • apps/deploy-web/src/components/shared/Stepper.tsx
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx
  • apps/deploy-web/src/pages/signup/index.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx
  • apps/api/test/services/wallet-testing.service.ts
  • apps/deploy-web/src/utils/stripeUtils.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx
**/*.spec.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/no-jest-mock.mdc)

Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

**/*.spec.{ts,tsx}: Use setup function instead of beforeEach in test files
setup function must be at the bottom of the root describe block in test files
setup function creates an object under test and returns it
setup function should accept a single parameter with inline type definition
Don't use shared state in setup function
Don't specify return type of setup function

Files:

  • apps/api/test/functional/balances.spec.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/test/functional/certificate.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
apps/{deploy-web,provider-console}/**/*.spec.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/query-by-in-tests.mdc)

Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Files:

  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
🧠 Learnings (35)
apps/api/env/.env (1)

Learnt from: ygrishajev
PR: #1461
File: apps/notifications/src/modules/alert/services/deployment-alert/deployment-alert.service.ts:194-197
Timestamp: 2025-06-10T14:19:14.122Z
Learning: The alert.CONSOLE_WEB_URL environment variable in the notifications app is controlled and configured by the Akash team, reducing XSS concerns for HTML link generation in alert messages.

apps/api/test/functional/balances.spec.ts (5)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

apps/deploy-web/src/components/onboarding/OnboardingPage.tsx (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: stalniy
PR: #1362
File: apps/api/src/core/services/open-api-hono-handler/open-api-hono-handler.ts:21-21
Timestamp: 2025-05-24T04:26:25.511Z
Learning: In TypeScript strict mode, double casts like c as unknown as AppContext may be necessary even when types are structurally compatible, as strict mode enforces more restrictive type compatibility rules than regular mode.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: ygrishajev
PR: #1512
File: apps/deploy-web/src/components/deployments/DeploymentBalanceAlert/DeploymentBalanceAlert.tsx:47-68
Timestamp: 2025-06-19T16:00:05.428Z
Learning: In React Hook Form setups with zod validation, child components using useFormContext() can rely on parent form validation rather than implementing local input validation. Invalid inputs like NaN from parseFloat() are handled by the parent schema validation, eliminating the need for additional local validation in child components.

apps/api/test/functional/lease-flow.spec.ts (5)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

apps/api/test/functional/deployment-setting.spec.ts (7)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.

apps/api/test/functional/certificate.spec.ts (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/api/test/functional/user-init.spec.ts (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

apps/deploy-web/src/components/shared/index.ts (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/api/test/functional/sign-and-broadcast-tx.spec.ts (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

apps/deploy-web/src/components/new-deployment/CreateLease.tsx (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/new-deployment/BidGroup.tsx (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.

apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

apps/api/test/functional/create-deployment.spec.ts (4)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

apps/deploy-web/src/utils/urlUtils.ts (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/components/new-deployment/Stepper.tsx (4)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/pages/signup/index.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

🧬 Code Graph Analysis (14)
apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (2)
apps/deploy-web/src/hooks/useManagedWallet.ts (1)
  • useManagedWallet (15-86)
apps/deploy-web/src/queries/featureFlags.ts (1)
  • useFeatureFlags (12-21)
apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (1)
apps/deploy-web/src/utils/urlUtils.ts (1)
  • UrlService (16-79)
apps/api/src/billing/services/managed-signer/managed-signer.service.ts (1)
apps/api/src/core/services/feature-flags/feature-flags.ts (1)
  • FeatureFlags (1-5)
apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (4)
packages/ui/context/PopupProvider/PopupProvider.tsx (1)
  • usePopup (140-146)
apps/deploy-web/src/hooks/useUser.ts (1)
  • useUser (8-25)
apps/deploy-web/src/context/WalletProvider/WalletProvider.tsx (1)
  • useWallet (352-354)
apps/deploy-web/src/utils/urlUtils.ts (1)
  • UrlService (16-79)
apps/deploy-web/src/components/new-deployment/BidGroup.tsx (3)
apps/indexer/drizzle/schema.ts (1)
  • provider (205-237)
packages/network-store/src/network.store.ts (1)
  • selectedNetworkId (70-72)
packages/network-store/src/network.config.ts (1)
  • MAINNET_ID (5-5)
apps/deploy-web/src/hooks/useUser.ts (4)
apps/deploy-web/src/types/user.ts (1)
  • CustomUserProfile (18-18)
apps/deploy-web/src/hooks/useCustomUser.ts (1)
  • useCustomUser (13-23)
apps/deploy-web/src/hooks/useStoredAnonymousUser.ts (1)
  • useStoredAnonymousUser (18-48)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
  • useServices (28-30)
apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (1)
apps/deploy-web/src/types/provider.ts (1)
  • ApiProviderList (185-273)
apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx (2)
packages/ui/components/button.tsx (1)
  • Button (46-46)
packages/ui/components/loading-button.tsx (1)
  • LoadingButton (41-41)
apps/deploy-web/src/components/shared/Stepper.tsx (1)
apps/provider-console/src/utils/styleUtils.ts (1)
  • cn (4-6)
apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx (2)
apps/deploy-web/src/components/layout/AkashLogo.tsx (1)
  • AkashLogo (6-9)
apps/deploy-web/src/utils/urlUtils.ts (1)
  • UrlService (16-79)
apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (2)
apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (1)
  • OnboardingStep (6-14)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)
  • OnboardingStep (19-27)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (1)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)
  • OnboardingContainer (50-208)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (2)
apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (1)
  • OnboardingStep (6-14)
apps/deploy-web/src/services/analytics/analytics.service.ts (1)
  • analyticsService (274-291)
apps/deploy-web/src/components/shared/SuccessAnimation.tsx (2)
apps/deploy-web/src/components/shared/index.ts (2)
  • SuccessAnimation (3-3)
  • ConfettiAnimation (2-2)
apps/deploy-web/src/components/shared/ConfettiAnimation.tsx (1)
  • ConfettiAnimation (15-74)
🪛 dotenv-linter (3.3.0)
apps/api/env/.env

[warning] 3-3: [UnorderedKey] The TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT key should go before the WEBSITE_URL key

apps/api/env/.env.functional.test

[warning] 26-26: [SubstitutionKey] The AUTH0_ISSUER_HOST_WITH_DEFAULT key is not assigned properly


[warning] 27-27: [UnorderedKey] The AUTH0_AUDIENCE key should go before the AUTH0_ISSUER_HOST_WITH_DEFAULT key


[warning] 30-30: [UnorderedKey] The AUTH0_M2M_CLIENT_ID key should go before the AUTH0_M2M_DOMAIN key


[warning] 32-32: [UnorderedKey] The AUTH0_JWKS_URI key should go before the AUTH0_M2M_CLIENT_ID key


[warning] 34-34: [UnorderedKey] The AUTH0_CLIENT_ID key should go before the AUTH0_JWKS_URI key

💤 Files with no reviewable changes (3)
  • apps/deploy-web/src/components/user/payment/index.ts
  • apps/deploy-web/public/sw.js
  • apps/deploy-web/public/workbox-495fd258.js
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/api/test/functional/balances.spec.ts
  • apps/api/src/billing/config/env.config.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/deploy-web/src/pages/api/auth/signup.ts
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts
  • apps/deploy-web/src/components/layout/AkashLogo.tsx
  • apps/api/test/functional/certificate.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/deploy-web/src/components/shared/index.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx
  • apps/deploy-web/src/hooks/useUser.ts
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx
  • apps/deploy-web/src/utils/urlUtils.ts
  • apps/deploy-web/src/components/shared/Stepper.tsx
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx
  • apps/deploy-web/src/pages/signup/index.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx
  • apps/api/test/services/wallet-testing.service.ts
  • apps/deploy-web/src/utils/stripeUtils.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/api/test/functional/balances.spec.ts
  • apps/api/src/billing/config/env.config.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/deploy-web/src/pages/api/auth/signup.ts
  • apps/api/src/core/services/feature-flags/feature-flags.ts
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts
  • apps/deploy-web/src/components/layout/AkashLogo.tsx
  • apps/api/test/functional/certificate.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/deploy-web/src/components/shared/index.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx
  • apps/deploy-web/src/hooks/useUser.ts
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx
  • apps/deploy-web/src/utils/urlUtils.ts
  • apps/deploy-web/src/components/shared/Stepper.tsx
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx
  • apps/deploy-web/src/pages/signup/index.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx
  • apps/api/test/services/wallet-testing.service.ts
  • apps/deploy-web/src/utils/stripeUtils.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx
**/*.spec.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/no-jest-mock.mdc)

Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

**/*.spec.{ts,tsx}: Use setup function instead of beforeEach in test files
setup function must be at the bottom of the root describe block in test files
setup function creates an object under test and returns it
setup function should accept a single parameter with inline type definition
Don't use shared state in setup function
Don't specify return type of setup function

Files:

  • apps/api/test/functional/balances.spec.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/test/functional/certificate.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
apps/{deploy-web,provider-console}/**/*.spec.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/query-by-in-tests.mdc)

Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Files:

  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
🧠 Learnings (35)
apps/api/env/.env (1)

Learnt from: ygrishajev
PR: #1461
File: apps/notifications/src/modules/alert/services/deployment-alert/deployment-alert.service.ts:194-197
Timestamp: 2025-06-10T14:19:14.122Z
Learning: The alert.CONSOLE_WEB_URL environment variable in the notifications app is controlled and configured by the Akash team, reducing XSS concerns for HTML link generation in alert messages.

apps/api/test/functional/balances.spec.ts (5)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

apps/deploy-web/src/components/onboarding/OnboardingPage.tsx (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: stalniy
PR: #1362
File: apps/api/src/core/services/open-api-hono-handler/open-api-hono-handler.ts:21-21
Timestamp: 2025-05-24T04:26:25.511Z
Learning: In TypeScript strict mode, double casts like c as unknown as AppContext may be necessary even when types are structurally compatible, as strict mode enforces more restrictive type compatibility rules than regular mode.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: ygrishajev
PR: #1512
File: apps/deploy-web/src/components/deployments/DeploymentBalanceAlert/DeploymentBalanceAlert.tsx:47-68
Timestamp: 2025-06-19T16:00:05.428Z
Learning: In React Hook Form setups with zod validation, child components using useFormContext() can rely on parent form validation rather than implementing local input validation. Invalid inputs like NaN from parseFloat() are handled by the parent schema validation, eliminating the need for additional local validation in child components.

apps/api/test/functional/lease-flow.spec.ts (5)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

apps/api/test/functional/deployment-setting.spec.ts (7)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.

apps/api/test/functional/certificate.spec.ts (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/api/test/functional/user-init.spec.ts (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

apps/deploy-web/src/components/shared/index.ts (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/api/test/functional/sign-and-broadcast-tx.spec.ts (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

apps/deploy-web/src/components/new-deployment/CreateLease.tsx (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/new-deployment/BidGroup.tsx (3)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.

apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

apps/api/test/functional/create-deployment.spec.ts (4)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

apps/deploy-web/src/utils/urlUtils.ts (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/components/new-deployment/Stepper.tsx (4)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/pages/signup/index.tsx (2)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx (1)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx (1)

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

🧬 Code Graph Analysis (14)
apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (2)
apps/deploy-web/src/hooks/useManagedWallet.ts (1)
  • useManagedWallet (15-86)
apps/deploy-web/src/queries/featureFlags.ts (1)
  • useFeatureFlags (12-21)
apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (1)
apps/deploy-web/src/utils/urlUtils.ts (1)
  • UrlService (16-79)
apps/api/src/billing/services/managed-signer/managed-signer.service.ts (1)
apps/api/src/core/services/feature-flags/feature-flags.ts (1)
  • FeatureFlags (1-5)
apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (4)
packages/ui/context/PopupProvider/PopupProvider.tsx (1)
  • usePopup (140-146)
apps/deploy-web/src/hooks/useUser.ts (1)
  • useUser (8-25)
apps/deploy-web/src/context/WalletProvider/WalletProvider.tsx (1)
  • useWallet (352-354)
apps/deploy-web/src/utils/urlUtils.ts (1)
  • UrlService (16-79)
apps/deploy-web/src/components/new-deployment/BidGroup.tsx (3)
apps/indexer/drizzle/schema.ts (1)
  • provider (205-237)
packages/network-store/src/network.store.ts (1)
  • selectedNetworkId (70-72)
packages/network-store/src/network.config.ts (1)
  • MAINNET_ID (5-5)
apps/deploy-web/src/hooks/useUser.ts (4)
apps/deploy-web/src/types/user.ts (1)
  • CustomUserProfile (18-18)
apps/deploy-web/src/hooks/useCustomUser.ts (1)
  • useCustomUser (13-23)
apps/deploy-web/src/hooks/useStoredAnonymousUser.ts (1)
  • useStoredAnonymousUser (18-48)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
  • useServices (28-30)
apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (1)
apps/deploy-web/src/types/provider.ts (1)
  • ApiProviderList (185-273)
apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx (2)
packages/ui/components/button.tsx (1)
  • Button (46-46)
packages/ui/components/loading-button.tsx (1)
  • LoadingButton (41-41)
apps/deploy-web/src/components/shared/Stepper.tsx (1)
apps/provider-console/src/utils/styleUtils.ts (1)
  • cn (4-6)
apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx (2)
apps/deploy-web/src/components/layout/AkashLogo.tsx (1)
  • AkashLogo (6-9)
apps/deploy-web/src/utils/urlUtils.ts (1)
  • UrlService (16-79)
apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (2)
apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (1)
  • OnboardingStep (6-14)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)
  • OnboardingStep (19-27)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (1)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)
  • OnboardingContainer (50-208)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (2)
apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (1)
  • OnboardingStep (6-14)
apps/deploy-web/src/services/analytics/analytics.service.ts (1)
  • analyticsService (274-291)
apps/deploy-web/src/components/shared/SuccessAnimation.tsx (2)
apps/deploy-web/src/components/shared/index.ts (2)
  • SuccessAnimation (3-3)
  • ConfettiAnimation (2-2)
apps/deploy-web/src/components/shared/ConfettiAnimation.tsx (1)
  • ConfettiAnimation (15-74)
🪛 dotenv-linter (3.3.0)
apps/api/env/.env

[warning] 3-3: [UnorderedKey] The TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT key should go before the WEBSITE_URL key

apps/api/env/.env.functional.test

[warning] 26-26: [SubstitutionKey] The AUTH0_ISSUER_HOST_WITH_DEFAULT key is not assigned properly


[warning] 27-27: [UnorderedKey] The AUTH0_AUDIENCE key should go before the AUTH0_ISSUER_HOST_WITH_DEFAULT key


[warning] 30-30: [UnorderedKey] The AUTH0_M2M_CLIENT_ID key should go before the AUTH0_M2M_DOMAIN key


[warning] 32-32: [UnorderedKey] The AUTH0_JWKS_URI key should go before the AUTH0_M2M_CLIENT_ID key


[warning] 34-34: [UnorderedKey] The AUTH0_CLIENT_ID key should go before the AUTH0_JWKS_URI key

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
🔇 Additional comments (93)
apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx (1)

35-35: LGTM: Type casting follows TypeScript strict mode best practices.

The double cast via unknown is appropriate for strict TypeScript mode when asserting mock functions to complex types like typeof RadioGroupItem.

Also applies to: 76-76

apps/api/src/billing/config/env.config.ts (1)

9-9: LGTM: Trial period extension complements the enhanced onboarding flow.

Extending the default trial period from 14 to 30 days aligns well with the increased trial allowance, providing a more generous trial experience for new users.

apps/api/package.json (1)

28-28: LGTM: CI setup enhancement supports authentication testing.

Adding the mock OAuth2 server to the CI setup properly supports testing of the new authentication flows in the enhanced onboarding process.

apps/api/test/functional/create-deployment.spec.ts (1)

35-35: LGTM! Change aligns with anonymous user flow.

The switch to createAnonymousUserAndWallet() is consistent with the new onboarding flow that supports anonymous free trials, as indicated by the ANONYMOUS_FREE_TRIAL feature flag introduced in this PR.

apps/deploy-web/src/components/layout/AkashLogo.tsx (1)

6-6: LGTM! Consistent logo sizing adjustment.

The size adjustment aligns with similar changes across logo components to maintain visual consistency in the UI.

apps/api/test/functional/balances.spec.ts (1)

117-117: LGTM! Consistent with anonymous user flow pattern.

The change to createAnonymousUserAndWallet() aligns with the new onboarding flow and maintains consistency across functional tests. The test structure properly follows the coding guidelines with appropriate setup function usage.

apps/api/src/core/services/feature-flags/feature-flags.ts (1)

3-4: LGTM! Well-implemented feature flag for anonymous trials.

The new ANONYMOUS_FREE_TRIAL feature flag follows existing naming conventions and will enable controlled rollout of the anonymous user onboarding flow across the application.

apps/deploy-web/src/pages/api/auth/signup.ts (1)

10-13: LGTM! Enhanced signup flow with proper URL handling.

The addition of returnTo parameter extraction and decoding enables seamless post-signup redirection. The use of decodeURIComponent properly handles encoded URLs, and the default to "/" provides a safe fallback. This enhancement supports the new onboarding flow effectively.

apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts (1)

32-34: LGTM! Improved test accuracy by using anonymous user creation.

The change to createAnonymousUserAndWallet() is appropriate for this test since it specifically validates cleanup of stale anonymous users. This makes the test setup more aligned with its purpose.

Also applies to: 37-37

apps/api/test/functional/wallets-refill.spec.ts (1)

26-26: LGTM! Consistent with anonymous user testing pattern.

The change to createAnonymousUserAndWallet() maintains the test's functionality while aligning with the broader pattern of using anonymous users in functional tests for the new onboarding flow.

apps/api/test/functional/lease-flow.spec.ts (1)

35-35: LGTM! Consistent with anonymous user testing pattern.

The change to createAnonymousUserAndWallet() is appropriate and maintains test functionality while aligning with the new onboarding flow.

apps/api/test/functional/user-init.spec.ts (1)

93-93: LGTM! Appropriate use of anonymous user creation for wallet transfer tests.

The changes to createAnonymousUserAndWallet() are particularly appropriate for these test scenarios since they specifically test the transfer of anonymous wallets to registered users during the registration process.

Also applies to: 105-105

apps/api/test/functional/certificate.spec.ts (1)

27-27: LGTM! Consistent with anonymous user testing pattern.

The change to createAnonymousUserAndWallet() maintains test functionality while aligning with the broader pattern of using anonymous users in functional tests for the new onboarding flow.

apps/api/test/functional/deployment-setting.spec.ts (1)

33-33: LGTM: Consistent switch to anonymous user creation

The changes correctly replace createUserAndWallet() with createAnonymousUserAndWallet() across all test cases, which aligns with the PR's focus on anonymous free trial onboarding flows.

Also applies to: 59-62, 87-87, 140-143, 172-172, 227-227, 262-265, 297-297

apps/api/test/functional/api-key.spec.ts (1)

34-34: LGTM: Consistent anonymous user creation

The change to use createAnonymousUserAndWallet() in the test helper function aligns with the PR's anonymous free trial feature implementation.

apps/deploy-web/src/hooks/useUser.ts (1)

3-3: LGTM: Improved dependency injection pattern

The refactor to use useServices() context for accessing analyticsService follows good architectural patterns and makes the hook more testable. The dependency array update correctly includes the new analyticsService dependency.

Also applies to: 12-12, 22-22

apps/api/test/functional/sign-and-broadcast-tx.spec.ts (1)

18-18: LGTM: Consistent anonymous user creation pattern

The changes correctly switch to createAnonymousUserAndWallet() method calls, maintaining consistency with the anonymous free trial feature implementation across the test suite.

Also applies to: 30-30, 42-42

apps/deploy-web/src/components/onboarding/OnboardingPage.tsx (1)

1-17: LGTM: Well-structured onboarding page component

The component follows React best practices with proper TypeScript typing, clean separation of concerns, and effective use of the render prop pattern. The SEO setup and component composition are well-implemented for the onboarding flow.

apps/deploy-web/src/components/shared/index.ts (1)

1-3: Clean barrel export pattern for shared onboarding components.

The centralized export structure follows best practices and will improve import consistency across the app.

apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (2)

26-26: Good refactor to use Next.js router and centralized URL service.

The import additions properly support the navigation improvements.

Also applies to: 42-42, 110-110


119-121: Improved navigation pattern using client-side routing.

Replacing window.location.href with router.push(UrlService.payment()) provides better user experience by avoiding full page reloads and integrates properly with Next.js routing conventions.

apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (3)

5-5: Good addition of Next.js router and URL service imports.

These imports support the improved navigation pattern implemented in the hook.

Also applies to: 9-9, 15-15


32-34: Improved navigation with client-side routing.

The change from direct window.location.href assignment to router.push(UrlService.payment()) improves user experience and follows Next.js best practices.


33-33: Navigation endpoint verified

  • UrlService.payment() returns "/payment" (apps/deploy-web/src/utils/urlUtils.ts:53).
  • A corresponding page component exists at apps/deploy-web/src/pages/payment.tsx.

No changes required here.

apps/deploy-web/src/components/new-deployment/CreateLease.tsx (2)

33-33: Good integration of feature flags for trial functionality.

Adding the useFeatureFlags hook enables proper gating of anonymous trial features.

Also applies to: 85-85


503-516: Well-implemented conditional trial alert with improved UX.

The feature flag check features?.allowAnonymousUserTrial properly gates the trial alert, and the updated content with "Buy credits" link provides clearer user direction than the previous implementation.

apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (2)

8-8: Proper feature flag integration for modal visibility control.

Adding the useFeatureFlags hook enables appropriate gating of the trial welcome modal.

Also applies to: 14-14


34-35: Well-implemented conditional logic with correct dependencies.

The triple condition properly gates the modal visibility based on trial status, local storage flag, and feature flag. The dependency array is correctly updated to include the new feature flag dependency.

apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx (4)

23-23: LGTM: Clean feature flag implementation

The import and usage of the feature flag hook follows React best practices with proper destructuring and descriptive variable naming.

Also applies to: 75-76


50-50: Verify the significant reduction in trial deployment limit

The trial deployment limit has been reduced from 50 to 5 (a 90% decrease). Please confirm this dramatic reduction aligns with the product requirements for anonymous free trials.


241-247: Well-implemented feature flag gating for trial attributes

The conditional logic properly gates trial attribute functionality behind the feature flag while correctly differentiating between trialing and onboarding user states.


327-329: Correct implementation of feature-flagged trial limit check

The trial limit calculation properly incorporates the feature flag check with correct boolean logic and appropriate useMemo dependencies.

apps/api/src/billing/services/managed-signer/managed-signer.service.ts (2)

13-14: LGTM: Proper feature flag imports

The feature flag imports are correctly structured and follow TypeScript best practices.


37-37: Correct dependency injection pattern

The FeatureFlagsService injection follows the established dependency injection pattern used throughout the constructor.

apps/deploy-web/src/utils/urlUtils.ts (2)

50-50: LGTM: Consistent URL parameter implementation

The optional returnTo parameter follows the established pattern used throughout the UrlService class with proper typing and query parameter handling.


51-51: Well-implemented new onboarding URL method

The new onboarding method follows the established UrlService patterns with proper typing and consistent use of the appendSearchParams utility.

apps/deploy-web/src/pages/signup/index.tsx (1)

1-8: LGTM: Clean Next.js page implementation

The signup page follows Next.js conventions with proper component import/export and server-side props configuration. The implementation is minimal and well-structured.

apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx (1)

3-3: LGTM: Consistent logo sizing adjustment

The height adjustment from 19 to 20 pixels is consistently applied to both dark and light logo variants, maintaining visual consistency across the application.

Also applies to: 77-77

apps/deploy-web/src/components/new-deployment/BidGroup.tsx (1)

126-126: BidRow safely handles an undefined provider—no further changes required.

  • The provider prop is declared optional (provider?: ApiProviderList).
  • All access to provider fields is guarded:
    • Conditional checks (provider ? … : …) before use
    • Optional chaining (provider?.ipRegion, provider?.uptime7d, etc.)
    • Early return in event handlers when provider is undefined
  • Inside the JSX, property access (e.g. provider.ipRegion) only occurs within branches proven safe by those guards.

No runtime errors should occur when rendering <BidRow /> with provider={undefined}.

apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx (2)

6-7: Well-structured refactoring to shared utilities.

Good refactoring that centralizes Stripe initialization and uses a shared PaymentMethodForm component. This improves code reusability and maintainability across the application.


38-38: LGTM: Clear and customizable component usage.

The updated PaymentMethodForm usage with explicit buttonText and processingText props provides good customization while maintaining clarity.

apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx (1)

27-31: Well-implemented feature flag integration.

The logic correctly handles both anonymous trial flow and onboarding redirection based on the feature flag. This aligns well with the broader onboarding flow enhancements.

apps/deploy-web/src/services/analytics/analytics.service.ts (2)

95-102: Comprehensive onboarding analytics coverage.

Excellent addition of onboarding-related analytics events that provide comprehensive tracking of the user onboarding journey. The events follow consistent naming conventions and cover all key milestones.


104-114: LGTM: Well-structured analytics category addition.

The new "onboarding" category is appropriately added to support the onboarding analytics events, maintaining consistency with existing analytics categories.

apps/deploy-web/src/components/shared/ConfettiAnimation.tsx (1)

15-74: Well-implemented confetti animation component.

Excellent implementation of a confetti animation using framer-motion. The component properly handles randomization, cleanup, and provides a delightful user experience enhancement for success states in the onboarding flow.

apps/api/env/.env.functional.test (1)

26-34: Static analysis warnings can be safely ignored - configuration is valid.

The dotenv-linter warnings are false positives:

  1. Line 26 uses valid bash parameter expansion syntax ${AUTH0_ISSUER_HOST:-localhost} for default values
  2. The key ordering warnings are cosmetic and don't affect functionality

The Auth0 configuration structure looks correct for functional testing with proper fallback values.

apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (2)

28-28: Good defensive programming - provider prop made optional.

Making the provider prop optional enables better error handling when provider data might be unavailable.


61-61: Excellent null-safe implementation throughout.

All provider property accesses are properly guarded with:

  • Optional chaining (provider?.)
  • Conditional rendering with fallback UI elements
  • Early returns in event handlers
  • Safe default values in aria-labels

This prevents runtime errors when provider data is unavailable.

Also applies to: 83-84, 114-128, 132-132, 138-141, 158-173, 206-206

apps/deploy-web/src/components/new-deployment/Stepper.tsx (1)

5-5: Excellent refactoring to use shared Stepper component.

This change:

  • Reduces code duplication by leveraging the shared Stepper component
  • Centralizes stepper UI logic and styling
  • Maintains functionality while significantly simplifying the code
  • Adds proper click handling for navigation

The handleStepClick implementation correctly navigates to the template selection when the first step is clicked.

Also applies to: 18-25

apps/deploy-web/src/components/shared/SuccessAnimation.tsx (2)

14-26: Well-implemented animation lifecycle management.

The component properly manages the animation lifecycle with:

  • State-driven confetti control
  • Proper cleanup with clearTimeout
  • Reasonable 3-second duration for user experience
  • Optional callback support for completion handling

30-92: Excellent animation implementation with proper sequencing.

The animation structure is well-designed:

  • Proper use of AnimatePresence for mount/unmount animations
  • Layered motion effects (overlay, container, icon, text)
  • Staggered delays create smooth visual progression
  • Spring animations with appropriate damping/stiffness values
  • Clean CSS classes and responsive design

The confetti integration and backdrop blur create an engaging success experience.

apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx (2)

14-27: Well-structured component with proper analytics integration.

The component demonstrates good practices:

  • Clean separation between animation handling and completion logic
  • Proper analytics tracking for onboarding completion
  • Clear state management for animation lifecycle

29-61: Excellent UI implementation for onboarding completion.

The component provides:

  • Clear visual hierarchy with proper spacing
  • Engaging success animation integration
  • Informative setup completion checklist
  • Consistent use of UI components and icons
  • Proper accessibility with semantic structure
  • Clear call-to-action with the "Start Deploying" button

This creates an excellent user experience for completing the onboarding flow.

apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (3)

6-14: Well-designed interface for onboarding steps.

The OnboardingStep interface comprehensively covers the requirements for onboarding flow steps with appropriate optional flags and proper TypeScript typing.


16-20: Clean and minimal props interface.

The OnboardingStepperProps interface properly defines the required props with appropriate typing.


22-40: Solid component implementation with proper state management.

The component correctly maps OnboardingStep objects to the shared Stepper component format and safely renders the current step's component. The stepper configuration with disabled interactions is appropriate for guided onboarding flows.

apps/api/src/billing/controllers/wallet/wallet.controller.ts (3)

15-15: Proper import additions for new dependencies.

The new imports for StripeService, FeatureFlags, and FeatureFlagsService are correctly added and will be used in the enhanced validation logic.

Also applies to: 19-20


32-34: Proper dependency injection for new services.

The constructor correctly injects the new StripeService and FeatureFlagsService dependencies following the established dependency injection pattern.


40-47: Comprehensive validation logic with proper feature flag gating.

The validation logic correctly implements the requirements:

  • Feature flag check gates the validation appropriately
  • Sequential validation of email verification, Stripe customer ID, and payment methods
  • Proper HTTP 403 status codes for access control
  • Clear, actionable error messages

The implementation ensures users meet all prerequisites before trial wallet creation when not using anonymous trials.

apps/deploy-web/src/components/shared/Stepper.tsx (6)

6-19: Well-designed interfaces with comprehensive functionality.

The Step interface provides flexibility with string or number IDs, and StepperProps covers all necessary stepper functionality including accessibility and interaction controls.


21-21: Proper component definition with sensible defaults.

The component properly types as a functional component with appropriate default values for optional props (empty className, arrows enabled, clicking disabled).


22-27: Proper click handler with appropriate guards.

The click handler correctly checks for clickability and handler presence before executing, and properly prevents default behavior.


30-31: Excellent accessibility implementation.

The component uses proper ARIA attributes, semantic HTML structure, and correctly marks the current step while hiding decorative elements from screen readers.

Also applies to: 49-49, 71-71


34-66: Comprehensive step rendering with clear visual states.

The component properly handles three step states (completed, active, upcoming) with appropriate visual indicators, consistent styling, and intuitive iconography (check marks for completed steps).


68-77: Well-implemented arrow separators with responsive design.

The SVG-based arrow separators are properly positioned, responsive (hidden on mobile), and conditionally rendered only between steps.

apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx (2)

140-198: Excellent test structure following all coding guidelines.

The test setup follows all the specified guidelines:

  • setup function at the bottom of the root describe block
  • Single parameter with inline type definition
  • No return type specification
  • No shared state usage
  • Manual mocks via dependency injection instead of jest.mock()
  • Fresh mock creation on each call

11-138: Comprehensive test coverage with proper async handling.

The test cases thoroughly cover all scenarios:

  • Initial state verification
  • Success/error flows for both email resending and verification checking
  • Conditional completion behavior based on verification status
  • Proper service method calls and snackbar notifications
  • Correct use of act() for async operations
apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx (6)

11-17: Well-implemented dependency injection for testability.

The DEPENDENCIES object properly encapsulates all external dependencies, making the component easily testable while providing sensible defaults for production use.


19-30: Well-designed TypeScript interfaces using render props pattern.

The props interface properly implements the render props pattern, exposing all necessary state and handlers to children while maintaining clean separation of concerns.


32-39: Clean state management with appropriate use of derived state.

The component properly manages loading states locally while deriving email verification status from user data, maintaining a clear state structure.


41-73: Robust async handlers with proper error handling and user feedback.

Both handlers implement excellent patterns:

  • Appropriate guard clauses and loading state management
  • Comprehensive error handling with try/catch/finally
  • Clear user feedback via snackbars for both success and error states
  • Proper cleanup in finally blocks

75-82: Well-implemented continue handler with analytics and conditional logic.

The handler properly validates email verification status before proceeding, tracks analytics events appropriately, and maintains clean separation of concerns with the completion callback.


84-96: Clean render props implementation.

The component correctly implements the render props pattern, passing comprehensive state and handlers to the children function with a clean JSX structure.

apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx (6)

4-4: LGTM! Proper Stripe imports.

The AddressElement import is correctly added to support billing address collection.


6-11: LGTM! Well-defined TypeScript interface.

The props interface is properly typed with optional properties and good default values.


13-18: LGTM! Good use of default parameters.

The component signature properly uses default parameter values, making the component flexible and easy to use.


56-71: LGTM! Improved form structure with clear sections.

The form now has well-organized sections for billing address and card information with proper headings and spacing.


78-80: LGTM! Dynamic button text implementation.

The button properly shows different text based on processing state using the configurable props.


34-37: confirmParams removal is intentional — billing details now captured via AddressElement

The call to stripe.confirmSetup no longer needs confirmParams because billing information is collected through the AddressElement (used at apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx:59). No further action required.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx (2)

49-53: LGTM! Proper setup intent creation.

The effect correctly creates a setup intent when none exists.


55-60: LGTM! Proper wallet connection monitoring.

The effect correctly monitors wallet connection state and calls onComplete when ready.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx (4)

33-39: LGTM! Clean utility functions.

The formatting functions are well-implemented with proper padding and string manipulation.


64-84: LGTM! Well-structured payment method list.

The payment method rendering with conditional information and remove functionality is properly implemented.


90-98: LGTM! Proper loading button implementation.

The LoadingButton is correctly disabled when no payment methods exist or when loading, with appropriate loading text.


100-111: LGTM! Proper legal disclaimer.

The terms of service and privacy policy links are correctly implemented with proper styling.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (3)

12-30: LGTM! Proper component initialization test.

The test correctly verifies the component's initial state and prop structure.


32-45: LGTM! Proper analytics tracking test.

The test correctly verifies analytics tracking for step changes with proper async handling.


138-197: LGTM! Proper setup function implementation.

The setup function correctly follows the coding guidelines: positioned at bottom, accepts inline type definition parameter, creates object under test, and avoids shared state.

apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx (1)

190-258: Excellent test structure following coding guidelines.

The test suite properly follows the coding guidelines:

  • ✅ Uses setup function instead of beforeEach
  • setup function is at the bottom of the describe block
  • setup function accepts single parameter with inline type definition
  • ✅ No shared state in setup function
  • ✅ Uses jest-mock-extended pattern instead of jest.mock()
  • ✅ No return type specified on setup function
apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx (2)

8-15: Well-defined TypeScript interface with clear prop types.

The interface properly defines all required props with appropriate boolean and function types, following TypeScript best practices.


17-86: Excellent implementation with good UX patterns.

The component demonstrates solid React practices:

  • Clean conditional rendering based on verification status
  • Proper loading states for async operations
  • Good accessibility with disabled buttons during loading
  • Responsive design with appropriate spacing
  • Clear visual feedback with success/warning alerts
apps/api/test/services/wallet-testing.service.ts (2)

1-3: Appropriate imports for new functionality.

The added imports for axios and jsonwebtoken.decode are standard, well-maintained libraries suitable for HTTP requests and JWT token handling.


102-103: Proper JWT token decoding with appropriate typing.

The implementation correctly uses the standard jsonwebtoken.decode function with proper TypeScript typing for the decoded payload structure.

stalniy
stalniy previously approved these changes Jul 22, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

♻️ Duplicate comments (2)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (2)

50-74: Error handling already flagged in past review.

The localStorage access and URL parameter parsing in this useEffect lack proper error handling, which has already been identified in previous review comments.


117-120: Error handling already flagged in past review.

The localStorage cleanup and navigation in handleComplete lack proper error handling, which has already been identified in previous review comments.

🧹 Nitpick comments (1)
apps/deploy-web/src/services/stripe/stripe.service.ts (1)

5-31: Consider using the project's LoggerService for consistent logging.

The implementation is solid with good caching and error handling. However, the project uses a LoggerService (as seen in the DI container), and this service directly uses console.warn and console.error.

Consider injecting the logger service for consistency:

+import type { LoggerService } from "@akashnetwork/logging";
+
 export class StripeService {
   private stripeInstance: Stripe | null = null;
+  
+  constructor(private logger?: LoggerService) {}

   async getStripe(): Promise<Stripe | null> {
     // ... existing code ...
     
     const publishableKey = browserEnvConfig.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY;
     if (!publishableKey) {
-      console.warn("Stripe publishable key is not configured");
+      this.logger?.warn("Stripe publishable key is not configured") ?? console.warn("Stripe publishable key is not configured");
       return null;
     }

     try {
       this.stripeInstance = await loadStripe(publishableKey);
       return this.stripeInstance;
     } catch (error) {
-      console.error("Failed to load Stripe:", error);
+      this.logger?.error("Failed to load Stripe:", error) ?? console.error("Failed to load Stripe:", error);
       return null;
     }
   }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bab5228 and 8b7fa7b.

📒 Files selected for processing (12)
  • .cursor/rules/general.mdc (1 hunks)
  • apps/api/test/services/wallet-testing.service.ts (2 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx (1 hunks)
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx (3 hunks)
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts (3 hunks)
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts (1 hunks)
  • apps/deploy-web/src/services/stripe/stripe.service.ts (1 hunks)
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
**/*.spec.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/no-jest-mock.mdc)

Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

**/*.spec.{ts,tsx}: Use setup function instead of beforeEach in test files
setup function must be at the bottom of the root describe block in test files
setup function creates an object under test and returns it
setup function should accept a single parameter with inline type definition
Don't use shared state in setup function
Don't specify return type of setup function

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
apps/{deploy-web,provider-console}/**/*.spec.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/query-by-in-tests.mdc)

Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Files:

  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
🧠 Learnings (4)
.cursor/rules/general.mdc (10)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Don't add unnecessary comments to the code

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{ts,tsx} : Never use type any or cast to type any. Always define the proper TypeScript types.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/services/stripe/stripe.service.spec.ts (7)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (4)

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

🧬 Code Graph Analysis (2)
apps/deploy-web/src/services/stripe/stripe.service.ts (1)
packages/logging/src/servicies/logger/logger.service.ts (1)
  • error (107-109)
apps/deploy-web/src/services/app-di-container/app-di-container.ts (1)
apps/deploy-web/src/services/stripe/stripe.service.ts (1)
  • StripeService (5-31)
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx
  • apps/api/test/services/wallet-testing.service.ts
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
**/*.spec.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/no-jest-mock.mdc)

Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

**/*.spec.{ts,tsx}: Use setup function instead of beforeEach in test files
setup function must be at the bottom of the root describe block in test files
setup function creates an object under test and returns it
setup function should accept a single parameter with inline type definition
Don't use shared state in setup function
Don't specify return type of setup function

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
apps/{deploy-web,provider-console}/**/*.spec.tsx

📄 CodeRabbit Inference Engine (.cursor/rules/query-by-in-tests.mdc)

Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Files:

  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
🧠 Learnings (4)
.cursor/rules/general.mdc (10)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Don't add unnecessary comments to the code

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{ts,tsx} : Never use type any or cast to type any. Always define the proper TypeScript types.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

apps/deploy-web/src/services/stripe/stripe.service.spec.ts (7)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (9)

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function must be at the bottom of the root describe block in test files

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (4)

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

🧬 Code Graph Analysis (2)
apps/deploy-web/src/services/stripe/stripe.service.ts (1)
packages/logging/src/servicies/logger/logger.service.ts (1)
  • error (107-109)
apps/deploy-web/src/services/app-di-container/app-di-container.ts (1)
apps/deploy-web/src/services/stripe/stripe.service.ts (1)
  • StripeService (5-31)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Socket Security: Pull Request Alerts
🔇 Additional comments (14)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (7)

12-18: LGTM: Well-structured enum definition.

The OnboardingStepIndex enum provides clear step ordering and is properly typed for use throughout the component.


20-31: LGTM: Proper TypeScript typing for component props.

The props interface correctly defines the render prop pattern with proper typing for all callback functions and step data.


33-39: LGTM: Effective dependency injection pattern.

The DEPENDENCIES object enables proper testability by allowing mock injection while maintaining clean production code.


76-101: LGTM: Well-implemented step validation logic.

The handleStepChange function properly validates transitions between email verification and payment method steps, ensuring users can't skip required steps.


103-115: LGTM: Consistent analytics tracking implementation.

The handleStepComplete function properly tracks step completion events with consistent naming and data structure.


122-132: LGTM: Proper external navigation handling.

The handleStartTrial function correctly uses window.location.href for external navigation to signup, which is appropriate for Auth0 integration.


145-184: LGTM: Comprehensive step configuration.

The steps array provides complete metadata for each onboarding step with proper completion and disabled state management based on user state and payment methods.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (4)

11-30: LGTM: Well-structured test initialization.

The test properly verifies the component's default state and render prop structure with comprehensive assertions.


32-45: LGTM: Proper analytics tracking verification.

The test correctly verifies that step changes trigger analytics events with the expected event name and payload structure.


104-130: LGTM: Improved window object mocking with cleanup.

The window mocking implementation now properly handles cleanup, addressing the previously identified issue with global state pollution.


132-227: LGTM: Excellent setup function implementation.

The setup function correctly follows all coding guidelines:

  • Located at bottom of describe block ✓
  • Accepts single parameter with inline type definition ✓
  • No shared state usage ✓
  • No return type specification ✓
  • Proper dependency injection mocking ✓
  • Includes cleanup functionality for window mocking ✓
.cursor/rules/general.mdc (1)

3-3: No JSX Files Detected—Removal Is Safe

I ran searches for *.jsx files using both fd '\.jsx$' and rg --files -g '*.jsx' and found no matches. Since there are no JSX files in the repo, removing **/*.jsx from the glob list has no impact.

No further action required.

apps/deploy-web/src/services/app-di-container/app-di-container.ts (2)

4-4: Good naming convention to avoid conflicts.

Renaming the HTTP SDK import to HttpStripeService clearly distinguishes it from the local StripeService class.


38-41: Excellent separation of concerns.

The refactoring properly separates HTTP-based Stripe operations (with interceptors) from client-side Stripe.js instance management. The stripeService entry provides a clean singleton for Stripe.js client management without HTTP concerns.

@baktun14 baktun14 force-pushed the features/onboarding-start-page branch from 8b7fa7b to b244c61 Compare July 23, 2025 12:30
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/deploy-web/src/services/stripe/stripe.service.ts (1)

22-40: Handle the case where loadStripe returns null.

The implementation is solid with good caching and error handling. However, consider handling the case where loadStripe succeeds but returns null:

    try {
      this.stripeInstance = await this.dependencies.loadStripe(publishableKey);
-     return this.stripeInstance;
+     if (!this.stripeInstance) {
+       console.warn("Stripe failed to initialize with the provided key");
+     }
+     return this.stripeInstance;
    } catch (error) {
      console.error("Failed to load Stripe:", error);
      return null;
    }

This ensures consistent behavior and better debugging when Stripe initialization fails silently.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b244c61 and 93ee1c4.

📒 Files selected for processing (2)
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts (1 hunks)
  • apps/deploy-web/src/services/stripe/stripe.service.ts (1 hunks)
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/deploy-web/src/services/stripe/stripe.service.ts
🔇 Additional comments (3)
apps/deploy-web/src/services/stripe/stripe.service.ts (3)

1-8: Well-structured dependency injection interface.

The imports and dependency interface are properly typed and follow good dependency injection patterns, making the service testable and maintainable.


10-20: Excellent dependency injection pattern.

The class structure demonstrates good encapsulation and dependency injection practices. The constructor allows for flexible testing while maintaining sensible defaults.


42-44: Simple and effective cleanup method.

The clearStripeInstance method provides a clean way to reset the cached instance, which is particularly useful for testing scenarios.

@baktun14 baktun14 force-pushed the features/onboarding-start-page branch from c6f5e8a to b006040 Compare July 23, 2025 22:46
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (2)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (2)

50-74: Add error handling to localStorage and URL parameter operations.

The localStorage access and URL parameter parsing lack error handling, which could cause runtime exceptions. The parseInt result should also be validated for NaN.

Apply this diff to add proper error handling:

  useEffect(() => {
-    const savedStep = localStorage.getItem("onboardingStep");
-    if (savedStep) {
-      const step = parseInt(savedStep, 10);
-      if (step >= 0 && step < Object.keys(OnboardingStepIndex).length / 2) {
-        setCurrentStep(step);
-      }
-    }
+    try {
+      const savedStep = localStorage.getItem("onboardingStep");
+      if (savedStep) {
+        const step = parseInt(savedStep, 10);
+        if (!isNaN(step) && step >= 0 && step < Object.keys(OnboardingStepIndex).length / 2) {
+          setCurrentStep(step);
+        }
+      }
+    } catch (error) {
+      console.warn("Failed to restore onboarding step from localStorage:", error);
+    }

-    const urlParams = new URLSearchParams(window.location.search);
-    const fromSignup = urlParams.get("fromSignup");
-    if (fromSignup === "true") {
+    try {
+      const urlParams = new URLSearchParams(window.location.search);
+      const fromSignup = urlParams.get("fromSignup");
+      if (fromSignup === "true") {
        analyticsService.track("onboarding_account_created", {
          category: "onboarding"
        });

        setCompletedSteps(prev => new Set([...prev, OnboardingStepIndex.SIGNUP]));
        setCurrentStep(OnboardingStepIndex.EMAIL_VERIFICATION);
        localStorage.setItem("onboardingStep", OnboardingStepIndex.EMAIL_VERIFICATION.toString());

        const newUrl = new URL(window.location.href);
        newUrl.searchParams.delete("fromSignup");
        window.history.replaceState({}, "", newUrl.toString());
-    }
+      }
+    } catch (error) {
+      console.warn("Failed to process URL parameters:", error);
+    }
  }, [analyticsService]);

117-120: Add error handling to navigation and cleanup operations.

The cleanup and navigation operations lack error handling and could fail silently.

Apply this diff to add proper error handling:

  const handleComplete = useCallback(() => {
-    localStorage.removeItem("onboardingStep");
-    router.push("/");
+    try {
+      localStorage.removeItem("onboardingStep");
+    } catch (error) {
+      console.warn("Failed to clear onboarding step from localStorage:", error);
+    }
+    
+    try {
+      router.push("/");
+    } catch (error) {
+      console.error("Failed to navigate to home page:", error);
+      // Fallback to window.location for critical navigation
+      window.location.href = "/";
+    }
  }, [router]);
🧹 Nitpick comments (2)
apps/api/env/.env.functional.test (1)

30-34: Use unmistakably dummy secrets in VCS

Even though this is a test env file, AUTH0_M2M_SECRET, AUTH0_SECRET, etc. resemble real credentials. Replace with clearly bogus values (e.g., example_secret) to avoid future confusion or accidental use in non-test contexts.

-AUTH0_M2M_SECRET=not-used
-AUTH0_SECRET=random_super_secret
+AUTH0_M2M_SECRET=example_secret
+AUTH0_SECRET=example_secret
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1)

186-198: Consider removing unnecessary React Fragment.

The render implementation is clean, but the Fragment wrapper is unnecessary since there's only one child element.

Apply this diff to simplify:

  return (
-    <>
-      {children({
-        currentStep,
-        steps,
-        onStepChange: handleStepChange,
-        onStepComplete: handleStepComplete,
-        onStartTrial: handleStartTrial,
-        onPaymentMethodComplete: handlePaymentMethodComplete,
-        onComplete: handleComplete
-      })}
-    </>
+    children({
+      currentStep,
+      steps,
+      onStepChange: handleStepChange,
+      onStepComplete: handleStepComplete,
+      onStartTrial: handleStartTrial,
+      onPaymentMethodComplete: handlePaymentMethodComplete,
+      onComplete: handleComplete
+    })
  );
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c6f5e8a and b006040.

⛔ Files ignored due to path filters (2)
  • apps/deploy-web/public/sw.js.map is excluded by !**/*.map
  • apps/deploy-web/public/workbox-495fd258.js.map is excluded by !**/*.map
📒 Files selected for processing (62)
  • .cursor/rules/general.mdc (1 hunks)
  • apps/api/env/.env (1 hunks)
  • apps/api/env/.env.functional.test (1 hunks)
  • apps/api/src/billing/config/env.config.ts (1 hunks)
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts (2 hunks)
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts (3 hunks)
  • apps/api/src/core/services/feature-flags/feature-flags.ts (1 hunks)
  • apps/api/test/functional/api-key.spec.ts (1 hunks)
  • apps/api/test/functional/balances.spec.ts (1 hunks)
  • apps/api/test/functional/certificate.spec.ts (1 hunks)
  • apps/api/test/functional/create-deployment.spec.ts (1 hunks)
  • apps/api/test/functional/deployment-setting.spec.ts (8 hunks)
  • apps/api/test/functional/lease-flow.spec.ts (1 hunks)
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts (3 hunks)
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts (1 hunks)
  • apps/api/test/functional/user-init.spec.ts (2 hunks)
  • apps/api/test/functional/wallets-refill.spec.ts (1 hunks)
  • apps/api/test/services/wallet-testing.service.ts (2 hunks)
  • apps/deploy-web/public/sw.js (0 hunks)
  • apps/deploy-web/public/workbox-495fd258.js (0 hunks)
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (4 hunks)
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx (2 hunks)
  • apps/deploy-web/src/components/layout/AkashLogo.tsx (1 hunks)
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx (2 hunks)
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx (1 hunks)
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx (7 hunks)
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx (3 hunks)
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx (5 hunks)
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx (2 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx (1 hunks)
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx (2 hunks)
  • apps/deploy-web/src/components/shared/Stepper.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx (1 hunks)
  • apps/deploy-web/src/components/shared/index.ts (1 hunks)
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx (3 hunks)
  • apps/deploy-web/src/components/user/payment/index.ts (0 hunks)
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx (2 hunks)
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx (2 hunks)
  • apps/deploy-web/src/hooks/useUser.ts (2 hunks)
  • apps/deploy-web/src/pages/api/auth/signup.ts (1 hunks)
  • apps/deploy-web/src/pages/signup/index.tsx (1 hunks)
  • apps/deploy-web/src/services/analytics/analytics.service.ts (1 hunks)
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts (3 hunks)
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts (1 hunks)
  • apps/deploy-web/src/services/stripe/stripe.service.ts (1 hunks)
  • apps/deploy-web/src/utils/urlUtils.ts (1 hunks)
💤 Files with no reviewable changes (3)
  • apps/deploy-web/src/components/user/payment/index.ts
  • apps/deploy-web/public/sw.js
  • apps/deploy-web/public/workbox-495fd258.js
✅ Files skipped from review due to trivial changes (3)
  • apps/deploy-web/src/services/analytics/analytics.service.ts
  • apps/deploy-web/src/components/shared/SuccessAnimation.tsx
  • apps/api/src/core/services/feature-flags/feature-flags.ts
🚧 Files skipped from review as they are similar to previous changes (53)
  • apps/api/src/billing/config/env.config.ts
  • apps/api/test/functional/create-deployment.spec.ts
  • apps/api/test/functional/api-key.spec.ts
  • apps/api/test/functional/lease-flow.spec.ts
  • apps/api/test/functional/user-init.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.spec.tsx
  • apps/api/test/functional/balances.spec.ts
  • apps/deploy-web/src/components/new-deployment/CreateLease.tsx
  • apps/api/test/functional/wallets-refill.spec.ts
  • apps/api/test/functional/stale-anonymous-users-cleanup.spec.ts
  • apps/deploy-web/src/hooks/usePayingCustomerRequiredEventHandler.tsx
  • apps/deploy-web/src/services/app-di-container/app-di-container.ts
  • apps/deploy-web/src/components/layout/WelcomeToTrialModal.tsx
  • apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx
  • apps/deploy-web/src/components/new-deployment/ManifestEdit.tsx
  • apps/deploy-web/src/components/new-deployment/Stepper.tsx
  • apps/deploy-web/src/utils/urlUtils.ts
  • .cursor/rules/general.mdc
  • apps/api/src/billing/services/managed-signer/managed-signer.service.ts
  • apps/deploy-web/src/services/stripe/stripe.service.spec.ts
  • apps/deploy-web/src/components/onboarding/OnboardingPage.tsx
  • apps/deploy-web/src/hooks/useUser.ts
  • apps/api/test/functional/sign-and-broadcast-tx.spec.ts
  • apps/deploy-web/src/components/new-deployment/BidRow/BidRow.tsx
  • apps/deploy-web/src/components/user/payment/AddPaymentMethodPopup.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.tsx
  • apps/deploy-web/src/components/wallet/ConnectManagedWalletButton.tsx
  • apps/deploy-web/src/pages/signup/index.tsx
  • apps/deploy-web/src/components/onboarding/steps/WelcomeStep/WelcomeStep.tsx
  • apps/deploy-web/src/components/shared/ConfettiAnimation.tsx
  • apps/deploy-web/src/components/icons/AkashConsoleLogo.tsx
  • apps/deploy-web/src/components/shared/index.ts
  • apps/api/src/billing/controllers/wallet/wallet.controller.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodStep/PaymentMethodStep.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingStepper/OnboardingStepper.tsx
  • apps/deploy-web/src/components/shared/PaymentMethodForm/PaymentMethodForm.tsx
  • apps/api/test/functional/certificate.spec.ts
  • apps/deploy-web/src/components/onboarding/steps/PaymentVerificationCard/PaymentVerificationCard.tsx
  • apps/api/test/functional/deployment-setting.spec.ts
  • apps/deploy-web/src/pages/api/auth/signup.ts
  • apps/deploy-web/src/components/shared/Stepper.tsx
  • apps/api/test/services/wallet-testing.service.ts
  • apps/deploy-web/src/components/layout/AkashLogo.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodContainer/PaymentMethodContainer.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingView/OnboardingView.tsx
  • apps/deploy-web/src/components/onboarding/steps/PaymentMethodsDisplay/PaymentMethodsDisplay.tsx
  • apps/deploy-web/src/components/new-deployment/BidGroup.tsx
  • apps/deploy-web/src/components/onboarding/steps/FreeTrialLandingStep/FreeTrialLandingStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationStep/EmailVerificationStep.tsx
  • apps/deploy-web/src/components/onboarding/steps/EmailVerificationContainer/EmailVerificationContainer.spec.tsx
  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.spec.tsx
  • apps/deploy-web/src/services/stripe/stripe.service.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)

**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx
🧠 Learnings (2)
apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (4)

Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.

Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files

Learnt from: baktun14
PR: #1432
File: apps/deploy-web/src/components/deployments/DeploymentAlerts/DeploymentCloseAlert.tsx:38-38
Timestamp: 2025-06-05T21:07:51.985Z
Learning: The ContactPointSelect component in apps/deploy-web/src/components/alerts/ContactPointSelectForm/ContactPointSelect.tsx uses the useFormContext hook internally to connect to React Hook Form, so it doesn't need to be wrapped in a FormField component.

apps/api/env/.env (1)

Learnt from: ygrishajev
PR: #1461
File: apps/notifications/src/modules/alert/services/deployment-alert/deployment-alert.service.ts:194-197
Timestamp: 2025-06-10T14:19:14.122Z
Learning: The alert.CONSOLE_WEB_URL environment variable in the notifications app is controlled and configured by the Akash team, reducing XSS concerns for HTML link generation in alert messages.

🪛 dotenv-linter (3.3.0)
apps/api/env/.env

[warning] 3-3: [UnorderedKey] The TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT key should go before the WEBSITE_URL key

apps/api/env/.env.functional.test

[warning] 26-26: [SubstitutionKey] The AUTH0_ISSUER_HOST_WITH_DEFAULT key is not assigned properly


[warning] 27-27: [UnorderedKey] The AUTH0_AUDIENCE key should go before the AUTH0_ISSUER_HOST_WITH_DEFAULT key


[warning] 30-30: [UnorderedKey] The AUTH0_M2M_CLIENT_ID key should go before the AUTH0_M2M_DOMAIN key


[warning] 32-32: [UnorderedKey] The AUTH0_JWKS_URI key should go before the AUTH0_M2M_CLIENT_ID key


[warning] 34-34: [UnorderedKey] The AUTH0_CLIENT_ID key should go before the AUTH0_JWKS_URI key

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
🔇 Additional comments (8)
apps/api/env/.env (1)

3-3: Ensure downstream systems and tests align with the new trial allowance

The jump from 10 000 000 to 100 000 000 uAKT is significant—please verify that all production code, external integrations, and documentation have been updated accordingly, and consider updating tests to reference the new value.

• Test seeders still use the old max (10 000 000) in:

  • apps/api/test/seeders/akash-message.seeder.ts
  • apps/api/test/seeders/deployment-grant.seeder.ts
  • apps/api/test/seeders/fees-authorization.seeder.ts
  • apps/api/test/seeders/lease.seeder.ts
  • apps/api/test/seeders/provider-snapshot.seeder.ts

• Confirm that:

  • Refill thresholds and credit-card spend limits in business logic use TRIAL_DEPLOYMENT_ALLOWANCE_AMOUNT and not a hard-coded value.
  • Stripe price tiers, billing alerts, and UI copy reflect the new magnitude.
  • Any other services (e.g., monitoring, notifications) have been updated.

Optional: for consistency, derive test-seeder max values from the env var rather than hard-coding 10 000 000.

apps/api/env/.env.functional.test (1)

26-29: dotenv-expand ensures ${VAR:-default} interpolation works

The functional test environment loads and expands variables via dotenv-expand in apps/api/test/setup-functional-env.ts, so your default‐value syntax (${AUTH0_ISSUER_HOST:-localhost}) will be correctly resolved. No changes needed here.

apps/deploy-web/src/components/onboarding/OnboardingContainer/OnboardingContainer.tsx (6)

1-18: Clean imports and well-structured enum definition.

The imports are properly organized and the OnboardingStepIndex enum with explicit numeric values is well-suited for localStorage persistence.


20-39: Excellent dependency injection pattern for testability.

The dependency injection approach with the DEPENDENCIES object makes this component highly testable while maintaining clean separation of concerns.


41-48: Well-structured component definition with proper state initialization.

The component follows React best practices with clean state management and proper dependency usage.


122-132: Well-implemented trial start flow with proper URL handling.

The handler properly tracks analytics, constructs URLs using the service, and handles external navigation appropriately.


134-143: Clean payment method completion handler with proper flow control.

The handler correctly validates payment methods before proceeding and maintains proper step flow with analytics tracking.


145-184: Well-structured steps configuration with proper state management.

The steps array is clearly defined with appropriate conditional logic for disabled states and completion tracking.

@baktun14 baktun14 merged commit e05506c into main Jul 24, 2025
62 of 63 checks passed
@baktun14 baktun14 deleted the features/onboarding-start-page branch July 24, 2025 16:21
stalniy pushed a commit that referenced this pull request Nov 20, 2025
* fix: remove sw.js from source code

* feat(user): add onboarding stepper components

* feat(billing): refacto stripe form to be reused in signup

* feat(billing): add payment methods to the onboarding

* feat(billing): add enum for steps

* feat(billing): email verification

* feat(billing): check session instead of refresh page for email verified

* fix(deployment): show the bid when it's sandbox

* feat(billing):  signup start free trial

* fix(billing): improve onboarding

* feat(billing): refactor payment form to add billing address

* feat(billing): free trial verfication

* fix(billing): trial validation behind feature flag

* feat(billing): add analytics for the onboarding

* feat(billing): refactor onboarding for testing

* feat(billing): add confetti animation on trial activate

* fix(billing): unit testing

* feat(billing): improve free trial landing page

* feat(billing): add TOS to free trial accept

* fix(billing): pr fixes

* fix(billing): refactor payments to container

* fix(billing): remove add payment method form

* fix(billing): onboarding tests

* fix(billing): tests with anonymous users

* fix(billing): pr fixes

* fix(billing): improve stripe service tests

* fix: revert launching auth0 mock server

* fix: tests
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.

2 participants

Comments