Skip to content

Enhance payment successful page #3131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 19, 2025
Merged

Conversation

phatgg221
Copy link
Collaborator

@phatgg221 phatgg221 commented Jun 19, 2025

Summary by CodeRabbit

  • New Features

    • Introduced downloadable HTML invoices for workspace subscriptions, accessible via a new API endpoint.
    • Added a 24-hour expiration period for the "Download Receipt" link, with the UI displaying expiration status and disabling the button when expired.
  • UI Enhancements

    • Improved payment amount display and updated product pricing information.
    • Added animations and interactive effects to icons, buttons, and cards for a more engaging user experience.
    • Enhanced the "What's Next?" section with animated check icons and updated support link styles.

Copy link
Contributor

coderabbitai bot commented Jun 19, 2025

Walkthrough

A new API route for generating downloadable HTML invoices for workspace subscriptions was introduced. The billing success page was updated to fetch subscription pricing more precisely, implement a 24-hour expiration for the receipt download link, and enhance UI interactivity with animations and improved feedback for expired links.

Changes

File(s) Change Summary
apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx Refined subscription price fetching, added 24-hour receipt link expiration, enhanced UI with animations, conditional button states, updated support links, and improved interactive feedback.
apps/web/src/app/api/billing/[wsId]/invoice/route.ts Added new API route to generate and serve styled downloadable HTML invoices for subscriptions, including error handling and invoice HTML generation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SuccessPage
    participant API_Route
    participant Supabase

    User->>SuccessPage: Visits billing success page
    SuccessPage->>Supabase: Fetch subscription & price data
    SuccessPage->>User: Displays subscription info, download receipt button

    User->>SuccessPage: Clicks "Download Receipt"
    alt Link not expired
        SuccessPage->>API_Route: GET /api/billing/[wsId]/invoice
        API_Route->>Supabase: Query subscription & product price
        Supabase-->>API_Route: Return subscription data
        API_Route->>API_Route: Generate HTML invoice
        API_Route-->>SuccessPage: Return HTML invoice as attachment
        SuccessPage-->>User: Prompts invoice download
    else Link expired
        SuccessPage-->>User: Disables button, shows expiration notice
    end
Loading

Poem

🕰️
A rabbit hops with invoice flair,
Now receipts expire with timely care.
Buttons fade and icons spin,
Animations make the dashboard grin.
Download quick—don’t let time slip!
For invoices now are one short trip.
🧾✨

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.

apps/web/src/app/api/billing/[wsId]/invoice/route.ts

Oops! Something went wrong! :(

ESLint: 9.29.0

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@typescript-eslint/parser' imported from /eslint.config.mjs
at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
at packageResolve (node:internal/modules/esm/resolve:767:81)
at moduleResolve (node:internal/modules/esm/resolve:853:18)
at defaultResolve (node:internal/modules/esm/resolve:983:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
at #link (node:internal/modules/esm/module_job:201:49)


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 07c0258 and 642a7fa.

📒 Files selected for processing (1)
  • apps/web/src/app/api/billing/[wsId]/invoice/route.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/app/api/billing/[wsId]/invoice/route.ts
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Deploy-Preview
  • GitHub Check: Prettier Check (23)
  • GitHub Check: Deploy-Preview
  • GitHub Check: Verify generated types
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Post Copyable Unit Tests in Comment
  • Commit Unit Tests in branch feat/enhance-success-billing-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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 auto-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.

Copy link

graphite-app bot commented Jun 19, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @phatgg221, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the post-payment experience by revamping the billing success page with modern UI/UX elements and introducing a robust system for managing and generating payment receipts. Users will now benefit from a more interactive success confirmation and the ability to download a detailed, time-sensitive HTML invoice directly from the application.

Highlights

  • Enhanced Billing Success Page UI/UX: I've updated the billing success page (page.tsx) with new animations and interactive hover effects for various elements, including the header, payment summary, and 'What's Next' sections, to provide a more dynamic and engaging user experience.
  • Receipt Download Link Expiration: The success page now includes logic to calculate and display whether the payment receipt download link has expired (24 hours after payment). The 'Download Receipt' button is dynamically enabled or disabled based on this expiration status, with a clear notice to the user.
  • Dynamic HTML Invoice Generation API: A new API endpoint (invoice/route.ts) has been introduced to generate and serve a styled HTML invoice/receipt. This endpoint fetches subscription details and constructs a comprehensive, downloadable HTML document, ensuring users can easily obtain their payment records.
  • Improved Subscription Data Handling: Both the success page and the new invoice API now fetch more granular subscription data, specifically including the price from workspace_subscription_products, to ensure accurate display of payment amounts.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces enhancements to the billing success page, including UI animations and a new feature to download an HTML invoice. The changes aim to improve user experience and provide essential billing documentation.

Key feedback points include:

  • Critical: There are significant inconsistencies in how product prices are handled and displayed between the success page and the new invoice generation logic. This needs immediate attention to ensure financial accuracy.
  • High: The subscription object in the invoice generation API route lacks strong typing (any), which can hide bugs and make maintenance harder.
  • Medium: Several areas could be improved for robustness and clarity, such as the handling of API route parameters, fallback logic for missing data, placeholder links, and hardcoded values in the invoice.

Addressing these points, especially the critical ones related to price consistency, will greatly improve the quality and reliability of this feature.

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: 6

🧹 Nitpick comments (1)
apps/web/src/app/api/billing/[wsId]/invoice/route.ts (1)

58-58: Consider extracting CSS to external file for maintainability.

The embedded CSS spans over 300 lines, making the function difficult to read and maintain. Consider extracting it to a separate template file or CSS file.

This would improve:

  • Code readability and maintainability
  • Separation of concerns
  • Potential for CSS reuse across other invoice templates
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6f0d340 and 3af9477.

📒 Files selected for processing (2)
  • apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx (7 hunks)
  • apps/web/src/app/api/billing/[wsId]/invoice/route.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
apps/web/src/app/api/billing/[wsId]/invoice/route.ts (2)

16-16: Verify the database query structure for consistency.

The query selects from workspace_subscription_products(price) which should match the data structure used in the success page for consistency.

Let me verify the database schema to ensure this join is correct:

#!/bin/bash
# Search for similar database queries in the codebase
rg -A 5 -B 5 "workspace_subscription_products.*price"
ast-grep --pattern 'workspace_subscription_products($_)'

32-32: Consider security implications of dynamic filename.

Using the subscription ID directly in the filename could potentially expose sensitive information or lead to path traversal issues if not properly sanitized.

Let me verify if there are any filename sanitization utilities in the codebase:

#!/bin/bash
# Search for filename sanitization patterns
rg -A 3 -B 3 "filename.*sanitiz|sanitiz.*filename" 
rg -A 3 -B 3 "Content-Disposition.*attachment"
apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx (6)

21-21: LGTM! Query structure matches the API route for consistency.

The database query has been properly updated to include the nested product pricing data, ensuring consistency with the invoice generation API.


47-52: LGTM! Well-implemented expiration logic.

The 24-hour expiration calculation is correctly implemented using date-fns functions. The logic properly handles edge cases with fallback to current date.


213-233: LGTM! Excellent implementation of conditional button states.

The conditional rendering properly handles both expired and active states with appropriate styling and user feedback. The disabled state provides clear visual indication.


139-158: LGTM! Well-designed expiration notice with clear user communication.

The expiration notice provides excellent user experience with:

  • Clear visual indication using Clock icon and amber styling
  • Conditional messaging based on expiration status
  • Formatted expiration date for transparency

75-247: LGTM! Excellent UI animation implementation.

The progressive animation delays create a smooth, professional user experience. The hover effects and transitions are well-implemented and enhance interactivity without being overwhelming.


228-228: Verify API route path consistency.

Ensure the API route path matches the actual file structure and routing configuration.

#!/bin/bash
# Verify the API route exists at the expected path
fd -t f "route.ts" apps/web/src/app/api/billing
# Check for any route configuration files
fd -t f "route.*" apps/web/src/app/api/billing

Copy link

codecov bot commented Jun 19, 2025

Codecov Report

Attention: Patch coverage is 0% with 562 lines in your changes missing coverage. Please review.

Project coverage is 0.80%. Comparing base (6f0d340) to head (642a7fa).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
...ps/web/src/app/api/billing/[wsId]/invoice/route.ts 0.00% 469 Missing and 1 partial ⚠️
[...ocale]/(dashboard)/[wsId]/billing/success/page.tsx](https://app.codecov.io/gh/tutur3u/platform/pull/3131?src=pr&el=tree&filepath=apps%2Fweb%2Fsrc%2Fapp%2F%5Blocale%5D%2F%28dashboard%29%2F%5BwsId%5D%2Fbilling%2Fsuccess%2Fpage.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tutur3u#diff-YXBwcy93ZWIvc3JjL2FwcC9bbG9jYWxlXS8oZGFzaGJvYXJkKS9bd3NJZF0vYmlsbGluZy9zdWNjZXNzL3BhZ2UudHN4) 0.00% 92 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3131      +/-   ##
==========================================
- Coverage    0.80%    0.80%   -0.01%     
==========================================
  Files        2539     2540       +1     
  Lines      323861   324382     +521     
  Branches     3041     3042       +1     
==========================================
  Hits         2622     2622              
- Misses     319072   319592     +520     
- Partials     2167     2168       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

♻️ Duplicate comments (4)
apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx (4)

47-52: Address the fallback date handling issue.

The fallback to new Date() when subscription?.created_at is unavailable creates misleading expiration information for users. Consider displaying an error message or specific notice when subscription data is incomplete.

-  const createdAt = subscription?.created_at
-    ? new Date(subscription.created_at)
-    : new Date();
+  const createdAt = subscription?.created_at
+    ? new Date(subscription.created_at)
+    : null;
+  
+  if (!createdAt) {
+    // Handle missing creation date appropriately
+    return <div>Unable to determine receipt availability</div>;
+  }

161-161: Fix conflicting duration classes.

There are conflicting duration classes (duration-300 and duration-700) in the same className string. The latter will override the former.

-      <div className="mb-8 rounded-lg border border-border bg-card p-8 shadow-sm transition-all delay-1000 duration-300 duration-700 animate-in slide-in-from-bottom-6 hover:scale-[1.02] hover:shadow-lg dark:bg-card/80">
+      <div className="mb-8 rounded-lg border border-border bg-card p-8 shadow-sm transition-all delay-1000 duration-700 animate-in slide-in-from-bottom-6 hover:scale-[1.02] hover:shadow-lg dark:bg-card/80">

57-58: Critical: Verify pricing calculation consistency.

This change from subscription.price / 100 to subscription.workspace_subscription_products.price represents a significant shift in how pricing is calculated. The new approach assumes:

  1. workspace_subscription_products.price is stored in dollars (not cents)
  2. The relationship is properly structured (not an array)

Additionally, null safety is still missing:

-        amount: subscription.workspace_subscription_products.price
+        amount: subscription.workspace_subscription_products?.price

251-252: Update placeholder support links.

The support team and help center links still use placeholder /# hrefs, which don't provide functional navigation.

-            href="/#"
+            href="/support"
-            href="/#"
+            href="/help"

Consider adding functional URLs or removing the links if the pages aren't ready.

Also applies to: 258-259

🧹 Nitpick comments (1)
apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx (1)

75-90: Enhance animation implementation.

The animations look good, but there are some optimization opportunities:

  1. Multiple duration classes on line 90 may conflict
  2. Consider using CSS custom properties for consistent timing
-      <div className="mb-8 rounded-lg border border-border bg-card p-8 shadow-sm transition-all delay-700 duration-700 animate-in slide-in-from-bottom-6 hover:scale-[1.02] hover:shadow-lg dark:bg-card/80">
+      <div className="mb-8 rounded-lg border border-border bg-card p-8 shadow-sm transition-all delay-700 duration-500 animate-in slide-in-from-bottom-6 hover:scale-[1.02] hover:shadow-lg dark:bg-card/80">
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3af9477 and 07c0258.

📒 Files selected for processing (1)
  • apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx (7 hunks)
🧰 Additional context used
🪛 GitHub Check: codecov/patch
apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx

[warning] 6-6: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L6
Added line #L6 was not covered by tests


[warning] 10-10: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L10
Added line #L10 was not covered by tests


[warning] 21-21: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L21
Added line #L21 was not covered by tests


[warning] 47-53: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L47-L53
Added lines #L47 - L53 were not covered by tests


[warning] 57-58: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L57-L58
Added lines #L57 - L58 were not covered by tests


[warning] 75-77: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L75-L77
Added lines #L75 - L77 were not covered by tests


[warning] 80-80: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L80
Added line #L80 was not covered by tests


[warning] 83-83: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L83
Added line #L83 was not covered by tests


[warning] 90-90: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L90
Added line #L90 was not covered by tests


[warning] 96-96: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L96
Added line #L96 was not covered by tests


[warning] 102-102: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L102
Added line #L102 was not covered by tests


[warning] 108-108: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L108
Added line #L108 was not covered by tests


[warning] 116-116: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L116
Added line #L116 was not covered by tests


[warning] 122-122: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L122
Added line #L122 was not covered by tests


[warning] 128-128: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L128
Added line #L128 was not covered by tests


[warning] 130-130: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L130
Added line #L130 was not covered by tests


[warning] 138-159: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L138-L159
Added lines #L138 - L159 were not covered by tests


[warning] 161-161: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L161
Added line #L161 was not covered by tests


[warning] 166-167: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L166-L167
Added lines #L166 - L167 were not covered by tests


[warning] 177-178: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L177-L178
Added lines #L177 - L178 were not covered by tests


[warning] 188-189: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L188-L189
Added lines #L188 - L189 were not covered by tests


[warning] 203-207: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L203-L207
Added lines #L203 - L207 were not covered by tests


[warning] 209-209: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L209
Added line #L209 was not covered by tests


[warning] 213-238: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L213-L238
Added lines #L213 - L238 were not covered by tests


[warning] 240-240: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L240
Added line #L240 was not covered by tests


[warning] 247-247: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L247
Added line #L247 was not covered by tests


[warning] 251-252: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L251-L252
Added lines #L251 - L252 were not covered by tests


[warning] 258-259: apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx#L258-L259
Added lines #L258 - L259 were not covered by tests

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Verify generated types
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
  • GitHub Check: Deploy-Preview
🔇 Additional comments (4)
apps/web/src/app/[locale]/(dashboard)/[wsId]/billing/success/page.tsx (4)

6-6: LGTM - New imports for enhanced functionality.

The Clock icon and date-fns utilities are properly imported to support the new download link expiration feature.

Also applies to: 10-10


138-158: Well-implemented expiration notice feature.

The download link expiration notice provides clear user feedback with appropriate conditional messaging and styling. The 24-hour expiration window is clearly communicated.


213-233: Excellent conditional download functionality.

The implementation properly handles expired download links by:

  • Disabling the button when expired
  • Providing clear visual feedback
  • Using appropriate ARIA attributes for accessibility

The download link points to the correct API endpoint when active.


21-21: Verify the subscription products data structure.

The query now selects workspace_subscription_products(price) which suggests a related table. This change aligns with the pricing calculation update but needs verification.

Please verify the data structure returned by this query:

#!/bin/bash
# Description: Search for workspace_subscription_products table definition and usage
# Expected: Confirm if it's a one-to-one or one-to-many relationship

# Search for table schema or type definitions
rg -A 10 "workspace_subscription_products" --type ts

# Search for other usages of this relationship
ast-grep --pattern 'workspace_subscription_products'

@vhpx vhpx changed the title Feat/enhance success billing page Enhance payment successful page Jun 19, 2025
Copy link
Member

@vhpx vhpx left a comment

Choose a reason for hiding this comment

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

Please fix inconsistent price source. Thank you!

Copy link
Member

@vhpx vhpx left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @phatgg221.

@vhpx vhpx merged commit 8eb8152 into main Jun 19, 2025
19 checks passed
@vhpx vhpx deleted the feat/enhance-success-billing-page branch June 19, 2025 15:12
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