feat(dashboard): wallet layout split tabs#5025
Conversation
Signed-off-by: rpavlini <rpavlinic@daytona.io>
|
View your CI Pipeline Execution ↗ for commit 269a18e
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
4 issues found across 18 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Signed-off-by: rpavlini <rpavlinic@daytona.io>
|
@cubic-dev-ai review this PR |
@rpavlini I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
2 issues found across 18 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/dashboard/src/components/billing/AutomaticTopUpCard.tsx">
<violation number="1" location="apps/dashboard/src/components/billing/AutomaticTopUpCard.tsx:27">
P1: Automatic top-up state starts as `undefined`, causing a false dirty state on first render and allowing an unintended Save request before form state is synchronized from the wallet.</violation>
</file>
<file name="apps/dashboard/src/App.tsx">
<violation number="1" location="apps/dashboard/src/App.tsx:370">
P2: The wallet index route mounts `Wallet` and then redirects, causing avoidable billing query work before navigation to `/general`.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| } | ||
|
|
||
| export function AutomaticTopUpCard({ organizationId, wallet }: AutomaticTopUpCardProps) { | ||
| const [automaticTopUp, setAutomaticTopUp] = useState<AutomaticTopUp | undefined>(undefined) |
There was a problem hiding this comment.
P1: Automatic top-up state starts as undefined, causing a false dirty state on first render and allowing an unintended Save request before form state is synchronized from the wallet.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/dashboard/src/components/billing/AutomaticTopUpCard.tsx, line 27:
<comment>Automatic top-up state starts as `undefined`, causing a false dirty state on first render and allowing an unintended Save request before form state is synchronized from the wallet.</comment>
<file context>
@@ -0,0 +1,195 @@
+}
+
+export function AutomaticTopUpCard({ organizationId, wallet }: AutomaticTopUpCardProps) {
+ const [automaticTopUp, setAutomaticTopUp] = useState<AutomaticTopUp | undefined>(undefined)
+ const paymentMethodsQuery = usePaymentMethodsQuery({ organizationId })
+ const setAutomaticTopUpMutation = useSetAutomaticTopUpMutation()
</file context>
| element: <BillingOwnerAccessOutlet pageTitle="Wallet" />, | ||
| children: [{ index: true, lazy: lazyRoutes.Wallet }], | ||
| children: [ | ||
| { index: true, lazy: lazyRoutes.Wallet }, |
There was a problem hiding this comment.
P2: The wallet index route mounts Wallet and then redirects, causing avoidable billing query work before navigation to /general.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/dashboard/src/App.tsx, line 370:
<comment>The wallet index route mounts `Wallet` and then redirects, causing avoidable billing query work before navigation to `/general`.</comment>
<file context>
@@ -366,7 +366,10 @@ const router = createBrowserRouter([
element: <BillingOwnerAccessOutlet pageTitle="Wallet" />,
- children: [{ index: true, lazy: lazyRoutes.Wallet }],
+ children: [
+ { index: true, lazy: lazyRoutes.Wallet },
+ { path: ':page', lazy: lazyRoutes.Wallet },
+ ],
</file context>
| { index: true, lazy: lazyRoutes.Wallet }, | |
| { index: true, loader: () => redirect(`${RoutePath.BILLING_WALLET}/general`) }, |
2c15a7f to
b40f732
Compare
Summary by cubic
Split the Wallet page into General and History tabs with URL-based navigation to improve clarity. Added overview, automatic top-up, and one-time top-up cards for faster billing actions.
New Features
Refactors
WalletOverviewCard,AutomaticTopUpCard, andOneTimeTopUpCard.components/billing/*and fixed relative imports.Wallet.tsxwith smaller components, improved loading skeletons, and a clearer error state.Written for commit 269a18e. Summary will update on new commits.