Commit Graph

12 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
b7e92abb40 feat: persist script feature toggles to backend
Features (scroll, 404, outbound, downloads, frustration, storage, ttl)
are saved to site.script_features JSONB column on every toggle change.
Values are read from the site object on load.
2026-03-22 15:31:45 +01:00
Usman Baig
78fed269db fix: replace developer jargon with user-friendly labels in visitor identity settings
Storage/TTL labels used implementation terms (localStorage, sessionStorage, TTL)
that only make sense to developers. Replaced with plain language and added a
description explaining the privacy trade-off.
2026-03-17 23:07:11 +01:00
Usman Baig
e9ec86b10b fix: polish ScriptSetupBlock — orange accent bar, terminal dots, tighter storage/TTL, framework icons
- Add gradient orange accent bar and macOS-style terminal dots to code block
- Copy button uses brand-orange styling instead of plain gray
- Storage and TTL selects sit side-by-side tightly instead of spread apart
- TTL options shortened (24h, 48h, 7d, 30d)
- Replace framework dropdown with compact icon+label buttons (logos visible)
- Add "All integrations" link in section header
2026-03-16 17:20:27 +01:00
Usman Baig
16020a166c feat: redesign ScriptSetupBlock with feature toggles and dynamic script builder
Replace framework grid + static code block with:
- Dark terminal-style code block that updates in real-time
- Feature toggle switches (scroll depth, 404, outbound, downloads)
- Frustration tracking toggle (visually distinct as add-on)
- Storage mode + TTL dropdowns (TTL hides when per-tab selected)
- Compact framework dropdown replacing 10-button grid
2026-03-16 17:14:13 +01:00
Usman Baig
e444985295 refactor: extract frustration tracking into separate add-on script
Move rage click and dead click detection (35% of script.js) into
script.frustration.js as an optional add-on. Core script drops from
8.1KB to 5.7KB gzipped. Add-on auto-discovers core via window.pulse
polling and supports opt-out via data-no-rage/data-no-dead attributes.

- Expose cleanPath on window.pulse for add-on consumption
- Add script.frustration.js to middleware PUBLIC_ROUTES
- Update integration guides, ScriptSetupBlock, and FrustrationTable
  empty state to reference the add-on script
2026-03-16 16:59:37 +01:00
Usman Baig
ae2e48ce4b docs: enhance documentation in ScriptSetupBlock to include optional data-storage-ttl attribute for session expiry configuration 2026-02-11 14:36:46 +01:00
Usman Baig
1454d15142 docs: clarify default and optional data-storage options in ScriptSetupBlock and script.js for improved user understanding 2026-02-11 14:13:05 +01:00
Usman Baig
03bbe84eb0 fix: remove data-storage attributes from script in ScriptSetupBlock for simplified script integration 2026-02-11 13:26:28 +01:00
Usman Baig
f1c27e458a feat: update ScriptSetupBlock and script.js to support new visitor ID storage options 2026-02-11 11:06:27 +01:00
Usman Baig
c827e82376 feat: enhance ScriptSetupBlock and script.js with optional persistent visitor ID storage 2026-02-11 10:57:01 +01:00
Usman Baig
bd2aca7a76 feat: integrate ScriptSetupBlock component for improved site setup instructions and tracking script functionality across pages 2026-02-08 15:18:33 +01:00