From cb65d615eaa7a20acfc6a29783a82a35c82faae1 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 9 Oct 2025 23:27:30 +0530 Subject: [PATCH] chore: Add auto-refresh and self-hosted redirect logic to the billing page (#12615) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Pull Request Template ## Description This PR includes billing page improvements with the following updates: ### Self-hosted Users * Automatically redirected to the dashboard when accessing the billing page. ### Cloud Users – No Billing Plan (First Visit) * Shows a loading spinner with the `Your billing account is being configured. Please refresh the page and try again.` message. * Automatically refreshes the page after 5 seconds to check for billing setup. ### Cloud Users – No Billing Plan (After Refresh) * Prevents infinite refresh loops using `sessionStorage` tracking. * Displays the standard `Your billing account is being configured. Please refresh the page and try again.` message without further refresh attempts. * Cleans up session flags for future visits. ### Cloud Users – With Billing Plan * Displays the existing billing page normally with no refresh or redirection logic. Fixes https://linear.app/chatwoot/issue/CW-5559/your-billing-page-is-being-set-up-message-on-billing-page-is-confusing ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? ### Loom video https://www.loom.com/share/d0ea13d6b90b4ab1acbc581b524f6382?sid=d3dd19f3-85aa-4127-9233-7eecb1be0884 ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Muhsin Keloth --- .../dashboard/settings/billing/Index.vue | 61 ++++++++++++++++--- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue index fc3905014..8ba3d69a9 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue @@ -1,9 +1,11 @@