Commit Graph

53 Commits

Author SHA1 Message Date
Usman Baig
a3c1af7c95 fix: frontend consistency audit — 55 files cleaned up
Consistency fixes:
- Extract getThisWeekRange/getThisMonthRange to shared lib/utils/dateRanges.ts
  (removed 4 identical copy-pasted definitions)
- Add error boundaries for behavior, cdn, search, pagespeed pages
  (4 new error.tsx files — previously fell through to generic parent error)
- Add "View setup guide" CTA to empty states on journeys and behavior pages
  (previously showed text with no actionable button)
- Fix non-lazy useState initializer in funnel detail page
- Fix Bot & Spam settings header from text-xl to text-2xl (matches all other sections)
- Add useMinimumLoading to PageSpeed skeleton (consistent with all other pages)

Cleanup:
- Remove 438 redundant dark: class prefixes (app is dark-mode only)
  text-neutral-500 dark:text-neutral-400 → text-neutral-400 (206 occurrences)
  text-neutral-900 dark:text-white → text-white (232 occurrences)
- Remove dead @stripe/react-stripe-js and @stripe/stripe-js packages
  (billing migrated to Polar, no code imports Stripe)
- Remove duplicate motion package (framer-motion is the one actually used)
2026-03-23 19:50:16 +01:00
Usman Baig
55a08301f4 fix(build): extract FAVICON_SERVICE_URL to prevent server-side createContext error
The share/[id] layout is a server component that imported FAVICON_SERVICE_URL
from icons.tsx, pulling in the entire React icon registry and triggering
createContext on the server. Moved the constant to its own favicon.ts module.
2026-03-23 13:29:53 +01:00
Usman Baig
430e6f5d48 feat: use session cookie auth for public dashboard password flow
handlePasswordSubmit now calls POST /public/sites/:id/auth which
sets an HttpOnly cookie. All subsequent API calls authenticate via
cookie automatically — no password in URLs, no captcha state needed
for data fetching. Simplifies share page state management.
2026-03-22 14:45:25 +01:00
Usman Baig
82a201a043 fix: stop password keystrokes from triggering API calls on public dashboard
Used refs for password/captcha values so loadDashboard doesn't
recreate on every keystroke. Password is only sent to API on
explicit form submit. Also fixes stale captcha state in closures.
2026-03-22 13:52:10 +01:00
Usman Baig
b305b5345b refactor: remove performance insights (Web Vitals) feature entirely
Remove Performance tab, PerformanceStats component, settings toggle,
Web Vitals observers from tracking script, and all related API types
and SWR hooks. Duration tracking is preserved.
2026-03-14 22:47:33 +01:00
Usman Baig
8c4bb8f861 style: add fade-in transition from skeleton to content
Smooth out the jarring visual pop when loading skeletons are replaced
by real content. Only animates after an actual skeleton was shown —
cached data still renders instantly with no delay.
2026-03-13 12:45:48 +01:00
Usman Baig
37eb49eb37 feat: action-scoped captcha tokens for share access and org settings
Captcha on shared dashboard and organization settings now passes
action-specific identifiers. Bumps @ciphera-net/ui to 0.2.1.
2026-03-11 11:30:21 +01:00
Usman Baig
39eac4100e feat: update favicon retrieval to use a centralized service URL for consistency across the application 2026-02-22 21:02:11 +01:00
Usman Baig
06f54176f1 refactor: enhance type safety by replacing any types with stricter types across the codebase, improving error handling and reducing potential bugs 2026-02-22 20:29:16 +01:00
Usman Baig
94fb7c60e0 feat: optimize favicon loading across the application using Next.js image component for better performance and caching 2026-02-22 19:21:28 +01:00
Usman Baig
156d9986df fix: improve error messaging for various components to provide clearer feedback on failures 2026-02-22 19:17:20 +01:00
Usman Baig
d571b6156f refactor: integrate useMinimumLoading hook for enhanced loading state management across multiple pages 2026-02-22 18:38:35 +01:00
Usman Baig
c100277955 refactor: replace loading overlays with skeleton components for improved user experience across various pages 2026-02-22 18:01:45 +01:00
Usman Baig
d08c8f00a0 style: add transition effects to shadow properties across multiple components for improved visual feedback 2026-02-21 23:42:12 +01:00
Usman Baig
8f8761ed3d style: standardize padding across multiple components for improved layout consistency 2026-02-21 23:29:50 +01:00
Usman Baig
ae91147b6c chore: update @ciphera-net/ui dependency to version 0.0.57 in package.json and package-lock.json; refactor imports across multiple components for consistency 2026-02-17 20:49:55 +01:00
Usman Baig
213e337940 refactor: optimize data loading and auto-refresh logic in dashboard components, and enhance performance with useCallback for better efficiency 2026-02-12 08:50:10 +01:00
Usman Baig
fc56cbd661 refactor: update tick interval for real-time display in dashboard components and enhance live indicator in Chart component 2026-02-12 08:30:58 +01:00
Usman Baig
9b95ead6ba feat: implement last updated timestamp display in dashboard components for improved data freshness indication 2026-02-12 08:24:55 +01:00
Usman Baig
4aefca7118 feat: add "Updated X ago" display for realtime indicators and implement auto-refresh tick functionality 2026-02-11 20:49:09 +01:00
Usman Baig
9a5a2c5f3c TIER 2 - Design Consistency 2026-02-06 12:35:56 +01:00
Usman Baig
a1447e98d9 Phase 2: Border Radius & Card Standardization 2026-02-05 17:21:51 +01:00
Usman Baig
9ec441c932 Phase 1: Fix remaining button inconsistencies across all pages 2026-02-05 16:33:36 +01:00
Usman Baig
eaf02c853f fix: improve error handling across various components; utilize getAuthErrorMessage for consistent user-facing error messages 2026-02-03 19:31:26 +01:00
Usman Baig
6758d8c8c3 refactor: remove redundant interval selection logic and pass props directly to dashboard component 2026-01-30 14:31:07 +01:00
Usman Baig
e19d72ebb8 feat: enhance PDF export with top pages/referrers and move export button to page header 2026-01-30 14:16:26 +01:00
Usman Baig
eb81f111c0 feat: add siteId and dateRange props to dashboard components for enhanced data handling 2026-01-30 13:37:48 +01:00
Usman Baig
1114b0d27a refactor: use custom toast from @ciphera-net/ui 2026-01-27 21:52:11 +01:00
Usman Baig
d9c3294eeb feat: add previous period statistics and enhance data loading in PublicDashboardPage 2026-01-27 21:23:11 +01:00
Usman Baig
5bc9c12fba feat: add captcha functionality to PublicDashboardPage and OrganizationSettings components 2026-01-24 23:29:59 +01:00
Usman Baig
0e280e4118 chore: replace LightningIcon with ZapIcon across multiple components 2026-01-24 12:53:10 +01:00
Usman Baig
5857a2ea15 chore: upgrade @ciphera-net/ui to v0.0.18 and refactor icon imports across components 2026-01-24 12:50:43 +01:00
Usman Baig
33779ebf77 chore: upgrade @ciphera-net/ui to v0.0.14 and refactor component imports 2026-01-24 11:42:19 +01:00
Usman Baig
aaf224a278 refactor: migrate UI components to @ciphera-net/ui v0.0.11 2026-01-23 18:35:17 +01:00
Usman Baig
1be2c95046 fix(branding): update logo references from 'ciphera_icon_no_margins.png' to 'pulse_icon_no_margins.png' across the application for consistent branding 2026-01-23 11:38:05 +01:00
Usman Baig
3629f11661 feat: add multi-day interval selection for dashboard data display in PublicDashboardPage and SiteDashboardPage 2026-01-19 18:37:59 +01:00
Usman Baig
035d78175f refactor: update branding from Ciphera Pulse to Pulse across the application for consistency and clarity 2026-01-19 16:58:09 +01:00
Usman Baig
9dbe74fd9f refactor: update references from Ciphera Analytics to Ciphera Pulse across the application for consistent branding and messaging 2026-01-19 16:49:42 +01:00
Usman Baig
088e22512a feat: add performance insights feature with toggle in settings and conditional rendering in dashboard pages 2026-01-19 14:40:42 +01:00
Usman Baig
c8695ff964 fix: Enhance dashboard components with site settings for data collection options 2026-01-19 12:10:44 +01:00
Usman Baig
c69b263cdc feat: Add 1 min and 1 hour interval selection for Today view in analytics dashboard 2026-01-19 11:00:55 +01:00
Usman Baig
743d35b802 fix: show error toast on invalid public dashboard password 2026-01-18 23:13:58 +01:00
Usman Baig
d03a688695 fix: propagate API error data to handle protected dashboards correctly 2026-01-18 23:10:39 +01:00
Usman Baig
416939a61b fix: remove duplicate footer from public dashboard 2026-01-18 23:02:12 +01:00
Usman Baig
6f28fc0080 fix: match public dashboard background with app theme 2026-01-18 22:58:56 +01:00
Usman Baig
76a8bade8a fix: align public dashboard UI with branding guidelines 2026-01-18 22:53:08 +01:00
Usman Baig
1c2c5a71ae refactor(dashboard): rename date picker prop for clarity 2026-01-18 18:56:20 +01:00
Usman Baig
8abeca25d3 refactor(dashboard): simplify date range selection logic in date picker 2026-01-18 18:55:11 +01:00
Usman Baig
df3c86f93a refactor(dashboard): update TopPages component props and include domain 2026-01-18 18:54:00 +01:00
Usman Baig
760ec7cf39 refactor(dashboard): format visitor and pageview stats for better readability 2026-01-18 18:52:30 +01:00