Commit Graph

1244 Commits

Author SHA1 Message Date
Usman Baig
d050d32d24 fix(settings): remove flicker and scrollbar flash on context switch 2026-03-23 21:04:31 +01:00
Usman Baig
3c17895d64 feat(settings): unified settings modal with context switcher (Phase 1)
New unified settings modal accessible via `,` keyboard shortcut.
Three-context switcher: Site (with site dropdown), Workspace, Account.
Horizontal tabs per context with animated transitions.

Phase 1 tabs implemented:
- Site → General (name, timezone, domain, tracking script with copy)
- Site → Goals (CRUD with inline create/edit)
- Workspace → General (org name, slug, danger zone)
- Workspace → Billing (plan card, usage, cancel/resume, portal)
- Account → Profile (wraps existing ProfileSettings)

Phase 2 tabs show "Coming soon" placeholder:
- Site: Visibility, Privacy, Bot & Spam, Reports, Integrations
- Workspace: Members, Notifications, Audit Log
- Account: Security, Devices

Old settings pages and profile modal remain functional.
2026-03-23 20:57:20 +01:00
Usman
345f4ff4e1 Merge pull request #68 from ciphera-net/staging
PageSpeed monitoring, Polar billing, sidebar polish, frontend consistency audit
2026-03-23 20:07:54 +01:00
Usman Baig
ca2f1ce19d fix(dashboard): content panel as rounded card, sidebar border removed
- Content panel: bg-neutral-950, rounded-2xl, border, margin on top/right/bottom
- Sidebar: removed border-r — content panel's left border acts as separator
- Outer shell: bg-neutral-900 matches sidebar, creating "floating panel" effect
2026-03-23 19:59:56 +01:00
Usman Baig
6521b694f4 fix: replace motion/react imports with framer-motion + rounded content panel
- 4 files imported from 'motion/react' which was the removed 'motion' package.
  Replaced with 'framer-motion' (the package actually installed).
- Dashboard content area now has rounded corners, subtle border, and inset
  margin creating a "panel inside shell" visual separation from the sidebar.
2026-03-23 19:54:44 +01:00
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
eca21bf627 feat(billing): update frontend for polar migration
Update billing types, remove invoice preview, replace Stripe invoice
display with Polar orders, update tax ID from array to single object,
remove upcoming invoice amount display.
2026-03-23 16:36:54 +01:00
Usman Baig
cd347ea072 feat: add illustrations to 404, error page, and welcome flow
- 404 page: replace large "404" text with page-not-found illustration
- ErrorDisplay: replace warning icon with server-down illustration
- Welcome step 1 (no orgs): welcome illustration
- Welcome step 4 (add site): website-setup illustration
- Welcome step 5 (done): confirmed illustration
All SVGs dark-themed with brand orange accent.
2026-03-23 15:40:01 +01:00
Usman Baig
21cee4f4ae fix(illustrations): remap SVG colors to dark theme palette
Replace light fills (white, light grays) with dark neutral equivalents
so illustrations blend with Pulse's dark UI.
2026-03-23 15:34:40 +01:00
Usman Baig
c07c020015 feat(home): add illustration to home page empty state
Replace globe icon with setup-analytics illustration on the home page
when no sites are created.
2026-03-23 15:28:52 +01:00
Usman Baig
9510e2da8c feat(sidebar): fix backdrop fade transition, add shimmer to SSR placeholder
Use opacity instead of bg-color swap for proper transition-opacity
animation on mobile backdrop. Add shimmer gradient to the sidebar
loading placeholder in DashboardShell.
2026-03-23 15:28:03 +01:00
Usman Baig
414e112d3d feat(sidebar): mobile exit animation, site picker entrance, hover nudge, CSS tooltips 2026-03-23 15:23:31 +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
d6cef95c4b fix(sidebar): dynamic collapse label, favicon fallback, escape key, remove setTimeout hack 2026-03-23 15:19:52 +01:00
Usman Baig
198bd3b00f feat(sidebar): extract SidebarContent to proper React component
Convert the sidebarContent(isMobile) closure function to a proper
SidebarContent component with explicit props, enabling correct React
reconciliation for both desktop and mobile sidebar instances.
2026-03-23 15:15:28 +01:00
Usman Baig
cbb7445d74 feat(pagespeed): click score gauges to scroll to diagnostics category 2026-03-23 14:55:05 +01:00
Usman Baig
8c3b77e8e5 Revert "fix(pagespeed): make frequency interactive and show next check time"
This reverts commit 01c50ab971.
2026-03-23 14:46:10 +01:00
Usman Baig
01c50ab971 fix(pagespeed): make frequency interactive and show next check time
- Replace dead frequency badge with inline dropdown selector
- Add "Next in Xh" indicator from next_check_at
- Demote "Disable" button to subtle text link (was competing with Run Check)
- Add cursor-pointer to prev/next history arrows
- Narrow filmstrip fade to avoid covering content
2026-03-23 14:43:41 +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
75bf8acd1e refactor(referrers): unify icon, display name, and favicon into single registry
Replace three separate data structures (getReferrerIcon if-chain,
REFERRER_DISPLAY_OVERRIDES, REFERRER_PREFER_ICON) with a single
REFERRER_REGISTRY. All matching is now exact key/hostname lookup
via resolveReferrer() — no more substring includes() that caused
collisions like t.co matching reddit.com.
2026-03-23 13:21:15 +01:00
Usman Baig
4064f7eabf fix(referrers): prevent t.co substring match on reddit.com
"reddit.com".includes("t.co") was true, causing Reddit to show the
X icon. Use exact match or slash-delimited check instead.
2026-03-23 13:12:57 +01:00
Usman Baig
508bb006a8 fix(referrers): replace low-res Google favicon globe with proper icons
Detect Google's 16x16 default globe fallback via naturalWidth on load
and fall back to Phosphor icons. Add Chrome icon for googlechrome.github.io,
CursorClick for Direct, and abbreviation support (ig, fb, yt).
2026-03-23 12:23:10 +01:00
Usman Baig
31471792f8 feat(pagespeed): move frequency selector to site settings
Revert inline frequency toggle from pagespeed page. Add PageSpeed
Monitoring section to site settings under the Data tab with a Select
dropdown for Daily/Weekly/Monthly. Shows "Not enabled" when PSI is off.
2026-03-23 11:58:09 +01:00
Usman Baig
a0ef570137 feat(pagespeed): inline frequency selector in hero footer
Replace static frequency badge with a pill toggle (Daily/Weekly/Monthly)
matching the Mobile/Desktop tab style. Updates config via API on click.
Read-only badge shown for non-admin users.
2026-03-23 11:51:40 +01:00
Usman Baig
8d9a3f3592 feat(pagespeed): add check history navigation with prev/next arrows
Navigate between historical checks using ◀ ▶ arrows in the hero
footer bar. Shows formatted date when viewing historical data,
"Last checked X ago" when on latest. Fetches full audit data via
getPageSpeedCheck when navigating to a historical check.
2026-03-23 11:34:05 +01:00
Usman Baig
d02d8429e2 fix(pagespeed): contain visx chart within card bounds 2026-03-23 11:26:18 +01:00
Usman Baig
98fcce4647 feat(pagespeed): switch trend chart from Recharts to visx for dashboard consistency 2026-03-23 10:54:09 +01:00
Usman Baig
bba25c722a feat(pagespeed): manual check section, consistent dot indicators
- Add "Additional items to manually check" collapsed section
- Replace triangle/square severity icons with consistent filled circles
- Empty circle (border only) for informative/unscored audits
2026-03-22 23:45:36 +01:00
Usman Baig
354331646b fix(pagespeed): order accessibility sub-groups: names/labels → contrast → best practices 2026-03-22 23:38:58 +01:00
Usman Baig
d232a8a6d1 feat(pagespeed): sort audits by severity + insights before diagnostics
Sort order within each sub-group: red → orange → empty → green.
Sub-groups sorted so insights come before diagnostics.
2026-03-22 23:25:11 +01:00
Usman Baig
9d1d2dbb80 fix(pagespeed): issue count excludes informative/unscored audits
Only audits with a real score (non-null) count toward the issue total.
Informative audits (score: null) are shown but not counted.
2026-03-22 22:11:49 +01:00
Usman Baig
98429f82f5 feat(pagespeed): render audit sub-group headers in diagnostics
Group audits within each category by sub-group (e.g., "Names and
Labels", "Contrast") with small uppercase headers, matching the
pagespeed.web.dev layout.
2026-03-22 22:03:13 +01:00
Usman Baig
a0173636d4 fix(pagespeed): show empty circle for unscored/informative audits
Null scores now show ○ (informative) instead of ▲ (poor), matching
pagespeed.web.dev's "Unscored" indicator for informative audits.
2026-03-22 21:08:50 +01:00
Usman Baig
dfcf6bebde fix(pagespeed): show all 4 category cards including those with 0 issues 2026-03-22 20:59:52 +01:00
Usman Baig
5003175305 redesign(pagespeed): equal gauges in hero + category gauges in diagnostics
- Hero: 4 equal 90px ScoreGauges in a row with screenshot on right
- Diagnostics: each category card gets a 56px gauge header with score
  and issue count, matching pagespeed.web.dev's category sections
- Legend and metadata moved to footer bar in hero card
2026-03-22 20:55:55 +01:00
Usman Baig
ab6008daf9 fix(pagespeed): parse markdown links + handle more audit item fields
- AuditDescription: converts [text](url) to clickable links
- AuditItem: handles href, text/linkText, source.url from PSI API
2026-03-22 20:52:50 +01:00
Usman Baig
8b95620ec1 polish(pagespeed): mini gauges, animated tab switcher, filmstrip title
- Replace compact dot+number scores with 64px ScoreGauge circles
- ScoreGauge scales font/stroke/spacing for small sizes
- Add "Page Load Timeline" header to filmstrip section
- Replace pill toggle with animated underline tabs (matches dashboard)
2026-03-22 20:43:11 +01:00
Usman Baig
783530940e polish(pagespeed): design consistency pass
- Filmstrip: dark mode bg fix, consistent card padding, scroll fade
- Metrics: font-semibold to match uptime page
- Hero: tighter compact scores, smaller legend, centered alignment
- Chart: hide x-axis when single day, height matches uptime (h-40)
- Diagnostics: hide categories with zero failures, muted display values
- Skeleton: matches new hero layout
2026-03-22 20:19:07 +01:00
Usman Baig
dd0700cbea fix(pagespeed): poll silently without triggering SWR re-renders
Use direct API fetch for polling instead of mutateLatest() which was
causing the page to flicker and clear data every 5 seconds. SWR cache
is only updated once when new results arrive.
2026-03-22 19:56:00 +01:00
Usman Baig
8649f37bb9 feat(pagespeed): split diagnostics by category (Performance, Accessibility, Best Practices, SEO)
Each Lighthouse category gets its own card with failing audits sorted
by impact and collapsed passed audits. Matches pagespeed.web.dev layout.
2026-03-22 19:52:49 +01:00
Usman Baig
fcbf21b715 feat(pagespeed): render page load filmstrip between hero and metrics
Horizontal scrollable filmstrip showing page rendering progression
with timing labels. Appears between the score hero and metrics card.
2026-03-22 19:43:44 +01:00
Usman Baig
50960d0556 feat(pagespeed): render element screenshots in expandable audit items
Shows node screenshots, labels, HTML snippets, and URLs in audit
detail rows — matching pagespeed.web.dev's failing elements display.
2026-03-22 19:18:03 +01:00
Usman Baig
6b00b8b04a redesign(pagespeed): full page redesign inspired by pagespeed.web.dev
- Hero card: large performance gauge + compact inline scores + screenshot
- Single metrics card with 2x3 grid and colored status dots
- Flat diagnostics list sorted by impact with severity indicators
- ScoreGauge accepts size prop for flexible gauge sizing
- Unicode severity markers (triangle/square/circle) per audit
2026-03-22 19:10:47 +01:00
Usman Baig
b0e6db36a1 feat(pagespeed): add screenshot display and expandable diagnostics
- Page screenshot thumbnail next to score gauges
- Expandable audit rows with description and detail items table
- Shows URLs, HTML snippets, wasted bytes/ms for each failing element
- AuditRow component replaces flat diagnostic rows
2026-03-22 18:54:45 +01:00
Usman Baig
2fd9bf82f1 fix(pagespeed): poll for results after async check trigger
Backend now returns 202 immediately. Frontend polls every 5s for up
to 2 minutes until new results appear, then shows success toast.
2026-03-22 18:35:17 +01:00
Usman Baig
d1af25266b fix(pagespeed): increase fetch timeout for manual PSI checks to 120s
PSI checks run mobile + desktop sequentially (up to 60s total).
The default 30s client timeout was causing false network errors.
2026-03-22 18:28:06 +01:00
Usman Baig
52906344cf feat(pagespeed): add PageSpeed page with gauges, CWV cards, chart, and diagnostics
- ScoreGauge SVG component with color-coded circular arcs
- Full page: disabled state, score overview, CWV metrics, trend chart
- Diagnostics accordion with opportunities/diagnostics/passed groups
- Mobile/desktop strategy toggle, manual check trigger
- Loading skeleton, frequency selector
2026-03-22 18:13:08 +01:00
Usman Baig
780dd464a1 feat(pagespeed): add API client, SWR hooks, and sidebar navigation
- PageSpeed API client with types for config, checks, and audits
- SWR hooks: usePageSpeedConfig, usePageSpeedLatest, usePageSpeedHistory
- GaugeIcon added to sidebar under Infrastructure group
2026-03-22 18:05:17 +01:00
Usman
b026476311 Merge pull request #67 from ciphera-net/staging
Landing page redesign, dashboard improvements & new settings sections
2026-03-22 17:17:38 +01:00
Usman Baig
6a1698b794 feat: add Notifications section to settings with Reports and Alerts
- Adds purpose field to report schedule API client
- Adds useAlertSchedules SWR hook
- Reorganizes settings: Reports tab becomes Notifications tab
- Groups existing Reports and new Alerts subsections
- Alert channels reuse report delivery infrastructure (email, Slack, Discord, webhooks)
2026-03-22 16:57:04 +01:00