Skip to content

Payments app design fixes#1375

Open
Developing-Gamer wants to merge 54 commits into
devfrom
Payments-app-design-fixes
Open

Payments app design fixes#1375
Developing-Gamer wants to merge 54 commits into
devfrom
Payments-app-design-fixes

Conversation

@Developing-Gamer
Copy link
Copy Markdown
Contributor

@Developing-Gamer Developing-Gamer commented Apr 23, 2026

Summary

This PR brings the Payments dashboard surfaces in line with the shared design system: product creation, product-line / included-item dialogs, auth-method toggles, payments empty states, and related layout polish. Dialogs migrate from raw shadcn Dialog to DesignDialog with consistent headers, footers, inputs, and selector dropdowns.

Base: devHead: Payments-app-design-fixes
Scope: 31 files, ~+1.4k / −1.3k lines
Captured on: local dev server (internal project), signed in as [email protected]

Screenshots

Captured from http://localhost:8101 (viewport: 1920×1200 standard, 2560×1440 widescreen). Assets hosted in this gist.

Red outlines on the after shots mark the new or changed UI introduced by this PR.

Create Product — payments form redesign

Before After
Light payments-products-new-before-light payments-products-new-after-light
Dark payments-products-new-before-dark payments-products-new-after-dark

Widescreen:

Before After
Light payments-products-new-before-light-wide payments-products-new-after-light-wide
Dark payments-products-new-before-dark-wide payments-products-new-after-dark-wide

Product Lines onboarding — vertical centering fix

Before After
Light payments-product-lines-before-light payments-product-lines-after-light
Dark payments-product-lines-before-dark payments-product-lines-after-dark

Create Product Line dialog — DesignDialog migration

Before After
Light (legacy shadcn dialog on dev — open via Product Line → Create new) dialog-create-product-line-after-light
Dark dialog-create-product-line-after-dark

Auth Methods — toggle row accessibility

Before After
Light auth-methods-before-light auth-methods-after-light
Dark auth-methods-before-dark auth-methods-after-dark

Other migrated surfaces (after only)

Page Light Dark
Payments settings payments-settings-after-light payments-settings-after-dark
Sign-up rules sign-up-rules-after-light sign-up-rules-after-dark
Projects list (Create Project button) projects-after-light projects-after-dark
Playground / DesignDialog playground-dialog-after-light playground-dialog-after-dark
Included Item dialog dialog-included-item-after-light dialog-included-item-after-dark

Scroll behaviour — Sign-up Rules

Light Dark
Scroll sign-up-rules-scroll-light sign-up-rules-scroll-dark

What's new

  • DesignDialog extended with customHeader, noBodyPadding, and section className hooks; Playground updated to showcase them.
  • Payments dialogs (CreateProductLineDialog, IncludedItemDialog, price edit, item dialog) migrated to design-system components.
  • Create Product page uses DesignButton, DesignInput, DesignSelectorDropdown, and refreshed header actions.
  • Auth Methods toggle rows use semantic <Label htmlFor> instead of click-capture divs.
  • Payments layout empty-state card centers correctly; product-lines onboarding slideshow vertically centers.
  • Backend seed invariant for Growth product price; removed unused import in product switch route.

Notes for reviewers

  • Dialog migrations preserve validation + async error handling (runAsynchronouslyWithAlert where applicable).
  • Included-item dialog uses a sentinel value for “Create new item” to avoid colliding with real item IDs.
  • packages/stack / packages/js are untouched; template + dashboard-ui-components carry SDK-facing dialog changes.

Test plan

  • Visual capture on internal project ([email protected]) — light/dark, standard + widescreen
  • Create product flow: customer type → product line dropdown → create line dialog
  • Add included item dialog from create/edit product
  • Auth Methods toggles (label click + switch)
  • Payments product-lines onboarding slideshow at varied viewport heights
  • pnpm typecheck / pnpm lint / targeted E2E if API surface changed

Introduce a canonical dialog surface with structured header/body/footer slots and styling controls so feature pages can reuse a consistent modal foundation.

Made-with: Cursor
Expose the new dialog component and related helper types from the package root so dashboard pages can import the shared modal API consistently.

Made-with: Cursor
Add guidance for when and how to use DesignDialog so modal redesign work follows a single documented pattern across dashboard routes.

Made-with: Cursor
Replace the hand-wired trigger history dialog chrome with the shared DesignDialog wrapper while preserving the existing summary header and trigger list behavior.

Made-with: Cursor
Show confirmation, rich-header, tester, and parity examples so agents and developers can copy the shared modal patterns directly.

Made-with: Cursor
Introduce a dedicated dialog playground entry with shape presets and generated snippets to make modal experimentation and reuse easier.

Made-with: Cursor
Ensures popover content receives pointer events consistently in
stack-ui and the dashboard shadcn wrapper.

Made-with: Cursor
Split hover, focus, and data-[highlighted] so keyboard navigation
matches pointer hover for menu and select items.

Made-with: Cursor
Payments product flows use the updated repeating list behavior and styling.

Made-with: Cursor
Aligns the payments item dialog with the new form and popover patterns.

Made-with: Cursor
Applies the updated UI patterns to the product line creation flow.

Made-with: Cursor
Refactors included item editing to match the new dialog and input UX.

Made-with: Cursor
Aligns price editing with the shared dialog and form components.

Made-with: Cursor
Wires the new product flow to the refactored dialogs and pricing UI.

Made-with: Cursor
Replace generic Card layout with DesignCard, shared StatusRow, and
DesignBadge/DesignButton for consistent status styling across not
connected, incomplete setup, and connected states.

Made-with: Cursor
Use DesignCard with gradient by state and DesignBadge for the test-mode
feature list when active, matching the updated payments settings visuals.

Made-with: Cursor
Swap Card for DesignCard, move save/cancel into card actions, refine
rows and accordions, and add a Modified badge for pending toggles on
controllable and platform-managed sections.

Made-with: Cursor
Replace SettingSwitch with a DesignCard, optimistic Switch updates, and
tighter section spacing to match the rest of the payments settings page.

Made-with: Cursor
@Developing-Gamer Developing-Gamer self-assigned this Apr 23, 2026
Copilot AI review requested due to automatic review settings April 23, 2026 04:06
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stack-auth-hosted-components Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-auth-mcp Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-auth-skills Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-backend Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-dashboard Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-demo Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-docs Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-preview-backend Ready Ready Preview, Comment May 21, 2026 9:20pm
stack-preview-dashboard Ready Ready Preview, Comment May 21, 2026 9:20pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces DesignDialog as the standardized modal component across the dashboard while simultaneously removing the legacy "include-by-default" pricing sentinel and standardizing to explicit prices objects. It includes widespread migration of dialog-based UIs to the new design system and refactoring of payment and sign-up rule pages with design components.

Changes

DesignDialog Component Foundation & Documentation

Layer / File(s) Summary
DesignDialog Component Implementation
packages/dashboard-ui-components/src/components/dialog.tsx
New DesignDialog client component wrapping Radix primitives with class maps for sizing/variants, conditional header/body/footer rendering, overlay control, and styled composition layers.
Dialog Exports & Barrel Files
packages/dashboard-ui-components/src/index.ts, apps/dashboard/src/components/design-components/index.ts
Exports DesignDialog, related types (DesignDialogSize, DesignDialogVariant, DesignDialogProps), and primitive aliases through barrel files.
Design Guide & Documentation
apps/dashboard/DESIGN-GUIDE.md
Documents when to use DesignDialog for focus-trapping modals, specifies props, lists re-exported aliases, and provides canonical patterns for confirmations and rich layouts.

Remove Legacy Include-by-Default Pricing Sentinel

Layer / File(s) Summary
Backend Pricing Logic & Validation
apps/backend/prisma/seed.ts, apps/backend/src/app/api/latest/payments/products/.../switch/route.ts
Removes "include-by-default" sentinel handling; derives firstPriceId from explicit prices, and updates switch endpoint to determine free-plan status via currency-aware logic instead of sentinel.
Create Product Page Pricing Refactor
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/new/page-client.tsx
Removes include-by-default from form initialization, validation, and serialization; standardizes to explicit prices object and migrates header/field UI to design components.
Edit Product Page Pricing Refactor
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/[productId]/edit/page-client.tsx
Eliminates include-by-default parsing and state; shows destructive alert for products with empty prices from legacy data; updates pricing section controls.
Product List & Pricing Display Updates
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/page-client-list-view.tsx
Adds ProductsWithoutPricesAlert for legacy data visibility; removes legacy price format handling from display and sorting logic.
Test Updates for Pricing Sentinel Removal
apps/e2e/tests/backend/endpoints/api/v1/payments/switch-plans.test.ts
Updates test to use explicit pricing instead of sentinel; replaces legacy test with admin config-override test asserting sentinel rejection.

Dialog Migrations in Payments UI

Layer / File(s) Summary
Create Product Line Dialog Migration
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/create-product-line-dialog.tsx
Migrates from shadcn Dialog primitives to DesignDialog, updates close behavior, switches inputs to DesignInput, changes async helper to runAsynchronouslyWithAlert.
Included Item Dialog Migration
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/included-item-dialog.tsx
Migrates to DesignDialog, replaces Shadcn selects with DesignSelectorDropdown using memoized options, updates footer to use DesignDialogClose.
Price Edit Dialog Migration
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/price-edit-dialog.tsx
Migrates to DesignDialog with footer prop handling; refactors Free Trial editor from EditableGrid to Popover with DesignInput; updates Server Only to DesignSelectorDropdown.
Pricing Section Component Updates
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/products/pricing-section.tsx
Replaces Button/Checkbox with DesignButton; removes free-by-default props; simplifies free product UI to single destructive clear-prices button.

Dialog Migrations Across Dashboard Pages

Layer / File(s) Summary
Playground Dialog Demo Component
apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/playground/page-client.tsx
Adds DesignDialog as selectable playground component with comprehensive shape/size/variant/styling controls, preview rendering, and code generation.
Design Language Page Dialog Examples
apps/dashboard/src/app/(main)/(protected)/projects/.../design-language/page-client.tsx
Adds comprehensive DesignDialog examples demonstrating confirmation, rich header, wide tester, and region-specific styling patterns with props reference.
Sign-up Rules Page Refactor with Design Components
apps/dashboard/src/app/(main)/(protected)/projects/.../sign-up-rules/page-client.tsx
Large refactor reorganizing page into helper components, migrating all UI to design components, extracting layout logic into PageBody, adding trigger history, rule editor state hook, and menu-based actions.

Payment Pages Design System Updates

Layer / File(s) Summary
Payment Methods Settings UI Migration
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/settings/payment-methods.tsx
Migrates from Card/Button/Typography to DesignCard/DesignButton/DesignBadge with updated accordion styling and redesigned action controls.
Stripe Connection Status Component
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/settings/stripe-connection-check.tsx
Refactors with StatusRow layout component, DesignCard/DesignButton UI, and badge-based capability display.
Checkout Controls (Block New Purchases) Toggle
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/settings/page-client.tsx
Replaces toggle with DesignCard using optimistic updates with request-id guarding to prevent stale responses.
Test Mode Toggle Redesign
apps/dashboard/src/app/(main)/(protected)/projects/.../payments/settings/test-mode-toggle.tsx
Refactors from Card primitives to DesignCard with dynamic gradient/icons and replaces styled badges with DesignBadge.

Base UI Primitives & Minor Updates

Layer / File(s) Summary
Payment Item Dialog Migration
apps/dashboard/src/components/payments/item-dialog.tsx
Migrates to DesignDialog; centralizes CUSTOMER_TYPE_OPTIONS; updates form fields to design components.
Shadcn Primitive Style Updates
apps/dashboard/src/components/ui/action-dialog.tsx, apps/dashboard/src/components/ui/dropdown-menu.tsx, apps/dashboard/src/components/ui/select.tsx, packages/stack-ui/src/components/ui/popover.tsx, apps/dashboard/src/components/ui/popover.tsx
ActionDialog gains keepOpenOnOutsideInteraction and contentClassName props; DropdownMenuItem and SelectItem get explicit hover/highlighted state styling; popovers gain pointer-events-auto.
Minor Styling & Layout Adjustments
apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/layout.tsx, apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/product-lines/page-client.tsx
Button border-radius addition, payments layout container flexbox update, product-lines slideshow centering adjustment.

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly Related PRs

  • hexclave/stack-auth#1350: Removes legacy "include-by-default" pricing model, refactors switch endpoint and product validation logic similar to this PR's backend pricing changes.

Suggested Reviewers

  • BilalG1
  • N2D4

🐰 Dialog dreams refined, prices now defined,
No more defaults left behind,
Components cascade through dashboards wide,
Design system's pride!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch Payments-app-design-fixes

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 23, 2026

Greptile Summary

This PR migrates dashboard payment and auth pages to a new design-component system (DesignButton, DesignInput, DesignDialog, etc.) and introduces a full Conversations/Support feature including a DB schema, backend API routes, and a dashboard UI. It also refactors the payments plan-switch logic to correctly handle free non-recurring plans.

  • Design system migration: Payment settings, product creation/editing dialogs, sign-up rules, and auth-methods pages are updated to use glassmorphic design components (DesignDialog, DesignButton, DesignInput, DesignSelectorDropdown), alongside new ActionDialog props (keepOpenOnOutsideInteraction, contentClassName).
  • Conversations feature: Adds Conversation, ConversationEntryPoint, and ConversationMessage database tables with a new backend library, internal dashboard routes, and user-facing dogfood routes, all using createSmartRouteHandler per the existing convention.
  • Payments switch logic fix: isPriceFree/fromIsFreePlan is now computed before the "one-time purchase" guard so $0 non-recurring plans are correctly exempted from the "cannot switch" error.

Confidence Score: 5/5

Safe to merge; the logic changes are well-scoped and the new conversations feature follows established patterns.

The payments switch refactor correctly moves the free-plan check earlier without altering downstream authorization. All new conversation routes use createSmartRouteHandler and properly scope reads through viewerProjectUserId. The design migration is additive. The only finding is a redundant direct-source-path re-export that is currently harmless but could diverge in a production build.

apps/dashboard/src/components/design-components/index.ts — redundant cross-package source import that duplicates what the package index already exports.

Important Files Changed

Filename Overview
apps/backend/src/app/api/latest/payments/products/[customer_type]/[customer_id]/switch/route.ts isPriceFree/fromIsFreePlan moved earlier so free $0 non-recurring plans correctly bypass the one-time-purchase guard; both authorization checks are preserved unchanged.
apps/backend/prisma/migrations/20260420000000_add_conversations/migration.sql Adds Conversation, ConversationEntryPoint, and ConversationMessage tables with CHECK constraints, cascade FK relationships, and appropriate composite indexes.
apps/backend/src/lib/conversations.tsx New 1016-line conversations library; viewerProjectUserId correctly gates conversation reads. UPDATE statements after getConversationState rely on the preceding ownership check without re-applying the userId filter in the write — acceptable since conversation ownership is immutable.
apps/dashboard/src/components/design-components/index.ts Re-exports DesignDialog both via export * from "@stackframe/dashboard-ui-components" (which now includes it) and via an explicit cross-package relative path import — the named export shadows the wildcard, but the redundant direct source path is fragile.
packages/dashboard-ui-components/src/components/dialog.tsx New DesignDialog component with glassmorphic/plain variants, size map, and composable header/body/footer regions; conditional rendering guards prevent empty DialogBody from rendering padding.
apps/backend/src/lib/conversations-api.ts Shared auth schemas, pagination helpers, and public (snake_case) response schemas for conversation API routes; toPublicConversationDetail correctly maps camelCase internals to the public API shape.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/price-edit-dialog.tsx Migrated to DesignDialog/DesignButton; save button correctly wraps onSave in runAsynchronouslyWithAlert.
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/auth-methods/page-client.tsx Large redesign of auth-methods page; async toggle handlers use runAsynchronouslyWithAlert correctly; InlineSaveDiscard wraps save callbacks.

Sequence Diagram

sequenceDiagram
    participant U as End User
    participant DU as Dashboard UI (dogfood routes)
    participant DI as Dashboard Internal (admin routes)
    participant CL as conversations.tsx lib
    participant DB as PostgreSQL

    Note over DU,DB: User-facing conversation flow
    U->>DU: POST /dogfood/support/conversations (subject, message)
    DU->>CL: createConversation(tenancyId, userId, ...)
    CL->>DB: INSERT Conversation + ConversationEntryPoint + ConversationMessage
    DU-->>U: "{ conversation_id }"

    U->>DU: PATCH /dogfood/support/conversations/:id (message)
    DU->>CL: "appendConversationMessage(viewerProjectUserId=userId, ...)"
    CL->>DB: "SELECT Conversation WHERE projectUserId=viewerProjectUserId (auth gate)"
    CL->>DB: INSERT ConversationMessage + UPDATE Conversation timestamps
    DU-->>U: updated conversation detail

    Note over DI,DB: Admin / support-agent flow
    DI->>CL: listConversationSummaries(tenancyId, status?, userId?)
    CL->>DB: SELECT with LEFT JOIN ProjectUser for display name/email
    DI-->>DI: agent replies / status changes / metadata updates
    DI->>CL: updateConversationStatus / appendConversationMessage (agent sender)
    CL->>DB: INSERT message + UPDATE Conversation (SLA timestamps, status)
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/dashboard/src/components/design-components/index.ts:1-14
`DesignDialog` and its siblings are now exported from `packages/dashboard-ui-components/src/index.ts` (added in this PR), so `export * from "@stackframe/dashboard-ui-components"` already surfaces them. The explicit re-export via a 5-level relative path to the package source is redundant: if the package ever resolves to its compiled `dist/` output in a production build, this direct source import would produce a second, distinct module instance — breaking React component identity comparisons (`===`) for anything wrapping or memoising these components.

```suggestion
export * from "@stackframe/dashboard-ui-components";
```

Reviews (2): Last reviewed commit: "Enhance PageClient with customizable dia..." | Re-trigger Greptile

Copy link
Copy Markdown
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.

Caution

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

⚠️ Outside diff range comments (1)
apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/create-product-line-dialog.tsx (1)

55-63: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Close/reset should happen only after successful create.

Line 55 starts async creation, but Lines 57-63 immediately clear state and close the dialog. If creation fails, the user loses input and must re-enter everything.

Proposed fix
-    runAsynchronouslyWithAlert(onCreate({ id: productLineId.trim(), displayName: displayName.trim() }));
-
-    // Reset form
-    setDisplayName("");
-    setProductLineId("");
-    setHasManuallyEditedId(false);
-    setErrors({});
-    onOpenChange(false);
+    runAsynchronouslyWithAlert(
+      Promise.resolve()
+        .then(() => onCreate({ id: productLineId.trim(), displayName: displayName.trim() }))
+        .then(() => {
+          setDisplayName("");
+          setProductLineId("");
+          setHasManuallyEditedId(false);
+          setErrors({});
+          onOpenChange(false);
+        }),
+    );

As per coding guidelines, “always carefully deal with loading and error states; be very explicit with these; ensure errors are NEVER just silently swallowed.”

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

In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/payments/products/create-product-line-dialog.tsx
around lines 55 - 63, The code currently calls
runAsynchronouslyWithAlert(onCreate(...)) and immediately clears the form and
closes the dialog (setDisplayName, setProductLineId, setHasManuallyEditedId,
setErrors, onOpenChange), which loses user input if creation fails; change the
flow so you wait for the async create to succeed before resetting/closing:
invoke and await runAsynchronouslyWithAlert(onCreate({ id: productLineId.trim(),
displayName: displayName.trim() })) (or use its returned promise .then), and
only on successful resolution perform the resets (setDisplayName,
setProductLineId, setHasManuallyEditedId, setErrors) and call
onOpenChange(false); ensure errors from onCreate are propagated/handled by
runAsynchronouslyWithAlert so you do not clear state on failure and consider
setting/clearing an explicit loading state around the call.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In
`@apps/dashboard/src/app/`(main)/(protected)/projects/[projectId]/payments/products/create-product-line-dialog.tsx:
- Around line 55-63: The code currently calls
runAsynchronouslyWithAlert(onCreate(...)) and immediately clears the form and
closes the dialog (setDisplayName, setProductLineId, setHasManuallyEditedId,
setErrors, onOpenChange), which loses user input if creation fails; change the
flow so you wait for the async create to succeed before resetting/closing:
invoke and await runAsynchronouslyWithAlert(onCreate({ id: productLineId.trim(),
displayName: displayName.trim() })) (or use its returned promise .then), and
only on successful resolution perform the resets (setDisplayName,
setProductLineId, setHasManuallyEditedId, setErrors) and call
onOpenChange(false); ensure errors from onCreate are propagated/handled by
runAsynchronouslyWithAlert so you do not clear state on failure and consider
setting/clearing an explicit loading state around the call.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5aa16616-578d-442e-8b3a-379f9dc1c14b

📥 Commits

Reviewing files that changed from the base of the PR and between cdc26f8 and cc8e319.

📒 Files selected for processing (7)
  • apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/playground/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/layout.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/product-lines/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/payments/products/create-product-line-dialog.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx
  • docs/src/components/mdx/app-card.tsx
✅ Files skipped from review due to trivial changes (2)
  • docs/src/components/mdx/app-card.tsx
  • apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/projects/page-client.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/dashboard/src/app/(main)/(protected)/(outside-dashboard)/playground/page-client.tsx
  • apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/sign-up-rules/page-client.tsx

@mantrakp04 mantrakp04 requested a review from nams1570 May 19, 2026 19:43
- Removed redundant checks for free plans in the payment switch logic to streamline the process.
- Added a new function to determine if a price is free based on all supported currencies.
- Updated error handling to ensure subscriptions cannot be switched without an existing subscription or valid free plan.
- Minor UI adjustments in the dashboard to improve user experience, including a button fix in the RuleTriggerHistoryDialog.

This commit improves the clarity and efficiency of the payment switching functionality while ensuring proper validation of subscription states.
- Introduced `designFieldTriggerClasses` and `designPopoverSurfaceClasses` for consistent styling across payment-related components.
- Updated `IncludedItemDialog`, `PriceEditDialog`, `RepeatingInput`, and `ItemDialog` to utilize the new design tokens, enhancing maintainability and visual consistency.
- Removed redundant local definitions of options in favor of centralized constants for repeat and free trial units.

This commit streamlines the styling process and improves the overall design coherence in the payment dialogs.
Copy link
Copy Markdown
Collaborator

@nams1570 nams1570 left a comment

Choose a reason for hiding this comment

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

Assuming the diff doesnt end up readding default prod changes, I think the PR is good to merge. The UI/UX changes are correct and non breaking for payments

- Updated the `validateAndCreate` function to be asynchronous, allowing for proper error handling during product line creation.
- Ensured the dialog remains open with user input intact if creation fails, improving user experience.
- Adjusted the button click handler to correctly await the validation function before proceeding.

This commit improves the reliability and usability of the product line creation process in the payments dialog.
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.

4 participants