feat: add freemium auth gating for Budgets and Goals - #252
Conversation
👷 Deploy request for finnboard0 pending review.Visit the deploys page to approve it
|
✅ Deploy Preview for finnboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@Antra1705 thanks for the contribution! the freemium gating idea is a good addition, and the redirect preservation in however, the pr is not merge-ready yet because there are a few blocking issues:
also, there are some cleanup issues:
once these issues are cleaned up, i’ll be happy to review it again 👍 |
Hi @khanirfan18 — thanks for the thorough review! I double-checked the current branch against the points you raised:
I also re-ran the app locally and confirmed:
Happy to adjust further if you’re seeing something different on a specific commit or file view — just point me at it. Thanks again for the feedback! |
|
Thanks for the detailed follow-up @Antra1705... appreciate you double checking each point. Sidebar.jsx, App.jsx, and the Budgets.jsx/Goals.jsx Supabase changes all look resolved on my end too. Budgets and Goals are each defined once with a clean requiresAuth flag, the routes are each registered once under ProtectedRoute, and the if (!user) return early guard is a legit refactor, not duplication. Good to close those out. Header.jsx is still the outstanding blocker though. On the current branch, the {!user ? (...) : (...)} block's authenticated branch still nests a second full profile trigger button and dropdown (second id="profile-menu-btn", second profile-dropdown markup), and it looks like there are two different onClick handlers stacked on what should be a single button (navigate("/profile") vs navigate("/signin")). Could you paste the current full contents of Header.jsx, or push a small follow-up commit so I can diff it fresh? Just want to make sure we're looking at the same version before re-reviewing. Once that's sorted I think this is close to mergeable, the freemium gating and redirect preservation work is solid. |
|
Thanks for taking another look @khanirfan18 ! On Header.jsx, the guest Sign in button and the authenticated profile menu were never meant to render together — they’re opposite branches of {!user ? … : …}. The navigate("/signin") and navigate("/profile") handlers are on different buttons in different branches (guest CTA vs dropdown item), not stacked on one control. To make that clearer, I pushed a small follow-up (5f5a511) that extracts: GuestAuthButtons — Sign in / Sign up for guests |
5f5a511 to
232fc9d
Compare
Split guest Sign in/up and the signed-in profile menu into separate components so the mutually exclusive branches are obvious on review.
232fc9d to
bb086dc
Compare
Summary
/signinwith return path + upsell: “Create an account to use Budgets and Goals.”localStorageonly; Supabase writes run only when authenticated.Closes #238
Test plan
/signin?reason=budgets-goalswith the upsell message