wacrm/src/app/(dashboard)
Arnas Donauskas 6fcf77de8c
fix(flows): bounce-to-dashboard race when navigating into /flows
use-auth's `loading` flips false as soon as the session settles —
the profile fetch is fire-and-forget so the page renders quickly
with just the user object. The flows pages, though, gate access on
`isFlowsEnabled(profile.beta_features)`. During the gap between
session-ready and profile-ready they saw `{ loading: false,
profile: null }` and read it as "not opted in", redirecting a
legitimate beta user back to /dashboard.

Expose a separate `profileLoading` boolean from the auth context
that stays true until fetchProfile settles (success, missing row,
or error). Pages that branch on `profile.*` gate on it; chrome
that only needs the user object keeps using `loading` as before.

Three call sites updated: /flows, /flows/[id], /flows/[id]/runs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 16:05:59 +03:00
..
automations Merge remote-tracking branch 'origin/main' into chore/whatsapp-trademark-symbol 2026-05-06 13:50:03 +03:00
broadcasts chore: switch accent palette to Hostinger violet, drop emerald green 2026-05-06 11:57:12 +03:00
contacts chore: switch accent palette to Hostinger violet, drop emerald green 2026-05-06 11:57:12 +03:00
dashboard Merge pull request #44 from ArnasDon/fix/dashboard-activity-feed-pagination 2026-04-17 22:39:18 +03:00
flows fix(flows): bounce-to-dashboard race when navigating into /flows 2026-05-22 16:05:59 +03:00
inbox Merge pull request #109 from ArnasDon/feat/inbox-manual-refresh-button 2026-05-22 09:37:22 +03:00
pipelines chore: switch accent palette to Hostinger violet, drop emerald green 2026-05-06 11:57:12 +03:00
settings Merge remote-tracking branch 'origin/main' into chore/whatsapp-trademark-symbol 2026-05-06 13:50:03 +03:00
dashboard-shell.tsx chore: switch accent palette to Hostinger violet, drop emerald green 2026-05-06 11:57:12 +03:00
layout.tsx feat(seo): full SEO pass (reapply with OG-image build fix) 2026-04-19 12:25:59 +03:00