55 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
645e3e78ef feat(empty-states): add undraw illustrations to empty state screens
Add brand-orange recolored SVG illustrations from undraw to five empty
states: sites list, dashboard chart, funnels, journeys, and behavior.
2026-03-23 15:23:26 +01:00
Usman Baig
1ba6f6609d fix: step numbering starts at 1 after Entry column 2026-03-16 22:27:11 +01:00
Usman Baig
b16f01bd7f fix: rename Step 1 to Entry in columns view, max depth to 6 2026-03-16 22:08:14 +01:00
Usman Baig
17f2bdc9e9 feat: rewrite sankey chart with D3 — thin bars, labels beside nodes, proper hover
Replace @nivo/sankey with custom D3 implementation:
- 30px thin node bars with labels positioned beside them
- Links at 0.3 opacity, 0.6 on hover with full path highlighting
- Colors based on first URL segment for visual grouping
- Dynamic height based on tallest column
- Responsive width via ResizeObserver
- Click nodes to filter, hover for tooltips
- Invisible wider hit areas for easier link hovering
- Remove @nivo/sankey dependency, add d3
2026-03-16 21:56:22 +01:00
Usman Baig
4007056e44 feat: redesign sankey to block-style nodes with inside labels
- nodeThickness 8 → 100 (wide blocks like Rybbit)
- Labels inside nodes with white text instead of outside
- Margins 90px → 16px (labels no longer need outside space)
- Dynamic chart height based on max nodes per step
- Tighter nodeSpacing (4px) and subtle link opacity
- nodeBorderRadius 4 for rounded block corners
2026-03-16 21:45:08 +01:00
Usman Baig
bec61c599e fix: reduce sankey margins from 160px to 90px — less wasted space 2026-03-16 21:30:09 +01:00
Usman Baig
40f223cf38 fix: make sankey chart responsive — no horizontal scrolling
Replace fixed numSteps*250 width calculation with ResizeObserver
that measures the container and fits the chart within it.
2026-03-16 21:25:21 +01:00
Usman Baig
f797d89131 fix: restyle sankey to match reference - thinner nodes, all labels, scrollable
- Switch to fixed-width Sankey with horizontal scroll (250px per step)
- Thinner nodes (8px), tighter spacing (8px)
- Labels on all columns, not just first/last
- Lower link opacity (0.15) for cleaner look
- Increased node cap to 25 per step
2026-03-16 14:22:06 +01:00
Usman Baig
1aace48d73 fix: cap sankey height at 500px, show labels for first/last steps only 2026-03-16 14:15:10 +01:00
Usman Baig
d3f5e6b361 fix: disable sankey labels, reduce margins, dynamic height
Labels were overlapping badly with many nodes. Rely on hover
tooltips instead. Chart height now scales with node count
(400-700px range).
2026-03-16 14:08:08 +01:00
Usman Baig
71f922976d feat: add SankeyJourney component with data transformation and interactivity 2026-03-16 14:00:12 +01:00
Usman Baig
47ea6fa6f6 feat: add micro-animations to journey chart
- Connection lines draw-in with staggered stroke-dashoffset
- Bar widths grow from zero on mount with row stagger
- Columns fade + slide in from left with 50ms delay each
- Hover lift (-1px translate + shadow) on page rows
- Exit card fades in from top
- Drop-off percentages count up with eased animation
2026-03-16 13:28:13 +01:00
Usman Baig
3b09758881 fix: cap inline bar chart max width at 75%
Prevents the top item from spanning full width, making bars
read more clearly as proportional indicators.
2026-03-16 12:44:32 +01:00
Usman Baig
4f419f8b04 fix: increase inline bar chart opacity for better brand visibility
Light mode: 5% → 15%, dark mode: 10% → 25%
2026-03-16 12:40:01 +01:00
Usman Baig
2e444849ef fix: make step 1 clicks show connector lines like other steps
Previously clicking a step 1 block would set it as an entry point filter
instead of showing connection lines. Now all steps behave consistently —
clicking any step toggles selection and draws connector lines to the next
column. Entry point filtering remains available via the dropdown.
2026-03-16 09:42:59 +01:00
Usman Baig
4f4f2f4f9a refactor: redesign top paths table to match Pulse patterns
- Replace card-per-row with compact list rows + background bars
- Drop rank badges (order already communicates rank)
- Inline path sequence + stats into single row
- Truncate sequences longer than 7 steps (first 3 + … + last 2)
- Duration shows on hover with slide-in animation
- Use brand-orange bars proportional to top path count
2026-03-15 20:31:57 +01:00
Usman Baig
0ea9b31b63 style: make journey exit row a full red block matching other rows 2026-03-15 19:53:10 +01:00
Usman Baig
7103a39273 fix: increase column padding for bar chart breathing room 2026-03-15 13:48:19 +01:00
Usman Baig
3c8904ffe4 fix: remove overflow-hidden clipping bar chart left rounding 2026-03-15 13:45:29 +01:00
Usman Baig
aba67592bb fix: bar chart left rounding by using width calc instead of scaleX 2026-03-15 13:42:41 +01:00
Usman Baig
e7907d68bf fix: default depth 10, bar rounding, exit row height, connection line reach 2026-03-15 13:39:41 +01:00
Usman Baig
342bf46946 fix: bar chart overflow by using scaleX instead of width percentage 2026-03-15 13:33:10 +01:00
Usman Baig
de16991bb3 fix: inset bar chart so left rounding is visible 2026-03-15 13:30:20 +01:00
Usman Baig
3954ee0a97 refactor: restyle journey columns to match Pulse native patterns 2026-03-15 13:27:20 +01:00
Usman Baig
b000d0e1f7 fix: replace horizontal dashed lines with solid vertical column dividers 2026-03-15 13:20:57 +01:00
Usman Baig
58272f3fb5 fix: remove scroll fade gradient that was overlapping column content 2026-03-15 13:15:42 +01:00
Usman Baig
722b5de88d feat: polish journey columns with bar charts, count pills, colored selection, dotted connectors 2026-03-15 13:12:17 +01:00
Usman Baig
ada2c65d8f fix: show exit as red card in next column instead of SVG text hack 2026-03-15 13:03:06 +01:00
Usman Baig
b10abd38fc feat: show exit count when selecting a page, fix scroll fade overlay 2026-03-15 12:56:59 +01:00
Usman Baig
9f9f4286b7 fix: selections only show connection lines, no longer filter column data 2026-03-15 12:46:48 +01:00
Usman Baig
a7e9f7c998 fix: cascade column selection filter downstream, trim empty columns, add scroll fade 2026-03-15 12:42:49 +01:00
Usman Baig
4103014cdb fix: restyle journey columns to match Pirsch card-based design 2026-03-15 12:28:43 +01:00
Usman Baig
e8f00e06ec feat: replace sankey chart with column-based journey visualization 2026-03-15 12:17:48 +01:00
Usman Baig
7e30d04df3 feat: redesign top paths as breadcrumb cards with icons 2026-03-15 11:47:52 +01:00
Usman Baig
0112004457 fix: depth default 3 max 5, min_sessions 2, 5 nodes per column, stricter labels 2026-03-12 23:58:56 +01:00
Usman Baig
063a21adeb feat: cap nodes per column, dynamic SVG height, smart labels, thinner exit node 2026-03-12 23:46:24 +01:00
Usman Baig
a3fa48732a fix: correct ribbon y-offset — d3-sankey y0/y1 are center, not top 2026-03-12 23:20:33 +01:00
Usman Baig
a637d32446 revert: remove frontend same-page filter, backend fix handles this 2026-03-12 23:12:12 +01:00
Usman Baig
df394b85ef fix: filter out same-page transitions (reloads) from Sankey 2026-03-12 23:08:30 +01:00
Usman Baig
4e7c495160 fix: use SVG-level onMouseMove with data attrs for reliable hover 2026-03-12 23:04:08 +01:00
Usman Baig
9c8943d1e3 fix: rewrite hover state to single object, fix link dimming on node hover 2026-03-12 22:56:13 +01:00
Usman Baig
e7debdeb41 fix: consolidate exit nodes into single (exit) node 2026-03-12 22:52:24 +01:00
Usman Baig
3df93bb227 fix: link color from source node, fix hover dimming, labels trigger hover 2026-03-12 22:48:31 +01:00
Usman Baig
3bde3fd4e1 fix: only highlight links on node hover, not other nodes 2026-03-12 22:40:40 +01:00
Usman Baig
5cdf353233 feat: add node hover highlighting with connection dimming 2026-03-12 22:37:40 +01:00
Usman Baig
683bbce817 fix: thick node bars, multi-hue palette, higher link opacity, more padding 2026-03-12 22:31:05 +01:00
Usman Baig
828e930a69 fix: Sankey visual overhaul — lower link opacity, column color gradient, breathing room
- Links: 18% opacity default (was 60%), 45% on hover, grey for exit links
- Nodes: column-based orange gradient (bright entry → dark deep), stroke outline
- Labels: larger font, better padding, higher contrast backgrounds
- Layout: more vertical padding, wider node gap (24px)
2026-03-12 22:23:52 +01:00
Usman Baig
54daf14c6a feat: replace MUI X Charts Pro with d3-sankey custom Sankey
Remove paid MUI dependency. Use d3-sankey (MIT, ~5KB) for layout
algorithm + custom SVG rendering. Same visual quality: smooth bezier
ribbon links, proper node spacing via sankeyJustify, label backgrounds,
hover dimming, exit nodes.
2026-03-12 22:17:16 +01:00
Usman Baig
281a9f237a feat: replace custom Sankey SVG with MUI X Charts Pro Sankey 2026-03-12 22:07:20 +01:00