UX refactor: demo-ready dashboard with TaxFlow patterns (collapsible sidebar, personas, unified design) - #13
Merged
Conversation
- Demo persona infrastructure (5 personas with complete data sets) - PersonaSwitcher dropdown + DemoHeader (single central demo indicator) - Collapsible sidebar (collapsed default, 3 nav groups: Dashboard/Growth/Operations) - Merged Settings page with Preferences/Billing/Usage tabs - TaxFlow card patterns (ring-1 ring-foreground/10 rounded-xl) applied everywhere - Standardized stat cards (icon chip + tabular-nums + uppercase label) - Sonner toast notifications (sonner installed, Toaster wired in layout) - Non-functional buttons now trigger 'coming soon' toasts - DemoBadges removed from all pages (6→1 central DemoHeader ribbon) - New /dashboard/growth page (rankings + competitors) - Font-semibold page headers (text-xl) + muted descriptions - Billing/Usage/Locations/Rebook all use unified card design - Table headers: text-xs font-semibold uppercase tracking-wider
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract infrastructure patterns from worldmonitor into LocalMate: a framework-agnostic Circuit Breaker (TypeScript + Python/Redis), a Refresh Scheduler (merged poll loop + scheduler), wiring into all 4 arq jobs + dashboard API + dashboard pages, and progressive hydration via React.lazy.
Changes
dashboard/lib/core/circuit-breaker.ts(563 lines). Cooldown after N consecutive failures, stale-while-revalidate with background refresh, LRU eviction (256 entries default), optional IndexedDB persistence. Framework-agnostic with SSR safety (typeof window !== "undefined"gating). Global registry viacreateCircuitBreaker().backend/utils/circuit_breaker.py(252 lines). Redis-backed for stateless arq workers. Failure counts, cooldown timestamps, and cached responses all carry TTLs for auto-cleanup.execute()returns cached value during cooldown, fires background SWR refresh.dashboard/lib/core/refresh-scheduler.ts(~290 lines). Merges worldmonitor's Smart Poll Loop + Refresh Scheduler. Dedup (inFlight set), pause-when-hidden (visibility API), exponential backoff capped at 2x. SSR-safe: VisibilityHub lazily initializes on firstschedule()call.review_poll.py,competitor_watch.py,menu_sync.py,appointment_followup.py) wrap external API calls inCircuitBreaker.execute().@retry_on_failurestays as inner layer (transient blips). Each job accepts optionalctx/redis—Nonefallback skips breaker protection, safe for tests/scheduler-without-Redis.DashboardShellcreatesRefreshSchedulerand exposes via React context. Review queue polls every 60s, SEO rankings every 300s, billing usage every 120s.api.get()wraps each request in a per-path circuit breaker (30s cache TTL).nulldefaultValue triggers existing stub fallbacks in page components.CompetitorTab.tsx, lazy-loaded viaReact.lazy+<Suspense>.Testing
TypeScript — dashboard unit tests
circuit-breaker.test.ts(16 tests),refresh-scheduler.test.ts(13 tests)demo-personas.test.ts(16 tests),usage.test.ts(14 tests)Python — backend unit tests
test_circuit_breaker.py(9 tests)Build
Session Details
(aside)to your comment to have me ignore it.