Commit Graph

45 Commits

Author SHA1 Message Date
Usman Baig
bb4861dbdc fix(settings): remove duplicate comma listener from Sidebar — modal handles it globally 2026-03-24 17:24:45 +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 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
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
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
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
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 Baig
7bf7e5cc3d feat: glass treatment + dark-only cleanup for dashboard components and navigation 2026-03-21 19:26:25 +01:00
Usman Baig
177c33830c fix: add tooltips to notifications and profile when sidebar collapsed 2026-03-19 01:02:16 +01:00
Usman Baig
3e67af5646 fix: sidebar dropdown clipping, settings placement, and theme removal
- Add relative z-10 to sidebar aside to fix dropdowns (AppSwitcher,
  Notifications, UserMenu) rendering behind content area due to
  backdrop-blur-xl creating a stacking context
- Move Site Settings from bottom utility section into Infrastructure
  nav group where it logically belongs
- Remove ThemeToggle from sidebar (available in user settings)
- Rename Settings to Site Settings for clarity
2026-03-19 00:23:08 +01:00
Usman Baig
2fa498fb8f feat: sidebar utility items match NavLink styling
Use variant='sidebar' for ThemeToggle, NotificationCenter, and
compact UserMenu so they render with the same icon+label layout
as nav items. Fixed dropdown positioning uses fixed to escape
sidebar overflow:hidden.
2026-03-18 22:48:52 +01:00
Usman Baig
0b545eaa76 fix: align sidebar utility items with nav item layout
Use left-aligned rows with fading labels for theme, notifications,
and profile — matching the nav items pattern. Fix app switcher
alignment at top to match logo row.
2026-03-18 22:32:56 +01:00
Usman Baig
342e3705e8 fix: stack sidebar utility icons vertically
Horizontal row didn't fit in 64px collapsed sidebar. Stack theme,
notifications, and profile icons vertically like nav items.
2026-03-18 22:27:53 +01:00
Usman Baig
f1fc8facb4 feat: move utility items from header to sidebar
Move theme toggle, notifications, app switcher, and user profile from
the top header bar into the sidebar. App switcher at the top (scope
switch), utilities at the bottom. Header now only shows on mobile for
the hamburger menu.
2026-03-18 22:01:51 +01:00
Usman Baig
e8b3227dcf fix: use design system skeleton colors for favicon loading
Match the platform skeleton pattern (bg-neutral-100 dark:bg-neutral-800)
instead of the mismatched bg-neutral-200/700.
2026-03-18 21:23:41 +01:00
Usman Baig
323ed9c137 fix: add skeleton loading for favicon in site picker
Show a pulsing placeholder while the favicon loads from Google's
service instead of an empty container.
2026-03-18 21:20:08 +01:00
Usman Baig
c24a053c07 fix: remove favicon alt text to prevent Firefox flash in site picker
Firefox renders alt text while images load from Google's favicon service,
causing "Ci" to flash briefly in the 28px container before the icon appears.
2026-03-18 21:12:51 +01:00
Usman Baig
7ed04fb85c fix: load Sidebar with ssr:false — zero server-rendered content
The sidebar now uses next/dynamic with ssr:false, meaning it renders
NOTHING in the server HTML. No DOM content = no possible flash of
"Ci" or any text during SSR-to-hydration gap. The sidebar only mounts
on the client where localStorage is immediately available, so
collapsed state is correct from the very first render.
2026-03-18 19:42:14 +01:00
Usman Baig
a63dfa231e fix: render empty sidebar shell until client is ready
Previous opacity-0 approach still rendered DOM content which could
flash during SSR hydration. Now render an empty div (just border +
background, no content) at collapsed width until useEffect fires.
Then swap in the real aside with content. Zero DOM content = zero
possible flash of text or icons.
2026-03-18 18:42:36 +01:00
Usman Baig
137ab4c2ba fix: eliminate sidebar flash on page load for good
The sidebar is now invisible (opacity-0) on the initial render.
In a single useEffect: read collapsed state from localStorage,
then requestAnimationFrame to reveal (opacity-1). React batches
the state update with the reveal, so the sidebar appears at its
correct width with correct label visibility in one frame. No
intermediate states, no hydration mismatch, no transitions on load.
2026-03-18 18:39:17 +01:00
Usman Baig
29127d7ed5 fix: eliminate all loading flashes in sidebar site picker
Root cause 1: hydration mismatch — SSR rendered collapsed=true but
client useState initializer read localStorage synchronously, causing
an immediate state change and visual flash. Fix: always initialize
collapsed=true, read localStorage in useEffect so the transition
is smooth (collapsed→expanded animates cleanly).

Root cause 2: three-phase badge rendering (skeleton→letter→favicon)
caused visible state changes. Fix: just show the empty orange badge
until the favicon arrives. No skeleton, no letter fallback. One state
transition: empty→favicon.
2026-03-18 18:32:50 +01:00
Usman Baig
db055c758c fix: site picker auto-expands collapsed sidebar, fix Ci flash
When clicking the site picker in collapsed mode, the sidebar expands
and opens the dropdown. After selecting a site or clicking outside,
the sidebar re-collapses to its previous state.

Fix "Ci" flash on reload: default collapsed to true on SSR and when
no localStorage value exists, preventing hydration mismatch where
labels briefly render at full opacity in the narrow sidebar.
2026-03-18 18:23:40 +01:00
Usman Baig
c021d8ccf6 fix: show skeleton placeholder while sites load instead of fallback letter 2026-03-18 18:19:40 +01:00
Usman Baig
879df18502 fix: disable site picker dropdown when sidebar is collapsed 2026-03-18 18:17:00 +01:00
Usman Baig
684448159a feat: show site favicon in sidebar site picker
Use Google's favicon service to display the site's actual favicon
instead of the first-letter initial. Falls back to the letter if
the favicon fails to load. Matches the site list dashboard behavior.
2026-03-18 18:15:45 +01:00
Usman Baig
7cdbb34f9d style: bigger Pulse logo and text in sidebar (w-9, text-xl) 2026-03-18 17:09:46 +01:00
Usman Baig
9b8ae08460 fix: center all sidebar icons with uniform 28px containers
Every interactive item (logo, site picker, nav links, settings,
collapse) now wraps its icon in a 28px flex container. Combined with
consistent px-2 outer + px-2.5 inner padding, all icon containers
start at exactly 18px from the sidebar edge and center at 32px — the
midpoint of the 64px collapsed sidebar.
2026-03-18 17:07:00 +01:00
Usman Baig
01dfa6954f fix: center site picker hover state in collapsed sidebar
Reduce all sidebar section outer padding from px-3 to px-2 so hover
backgrounds are wider and items center properly in the 64px collapsed
width. All sections now consistent: px-2 outer + px-2.5 inner.
2026-03-18 17:03:08 +01:00
Usman Baig
84c23faa0f style: reduce glass transparency to 90% opacity
Sidebar and content header were too transparent — content bled through.
Bump from bg-*/70 to bg-*/90 with backdrop-blur-xl for a subtle glass
effect that's still readable.
2026-03-18 16:57:34 +01:00
Usman Baig
981eaaff39 fix: center site picker hover state in collapsed sidebar
Match site picker button padding (px-2.5) with nav items so the hover
background aligns consistently. Remove title tooltip.
2026-03-18 16:55:10 +01:00
Usman Baig
b0983e5a3f style: glassy transparency on sidebar and content header
Apply the same backdrop-blur-2xl + semi-transparent bg treatment from
the AppLauncher dropdown to the sidebar and content header. Matches
the Ciphera design language: bg-white/70 dark:bg-neutral-900/70 with
supports-[backdrop-filter] progressive enhancement. Soften all borders
to /60 opacity.
2026-03-18 16:52:40 +01:00
Usman Baig
6fcb6df295 fix: widen collapsed sidebar to 64px, prevent header flash on refresh
Collapsed width 56px→64px to stop clipping site picker badge and icons.
Return null while auth is loading on site pages to prevent brief flash
of the public floating header before the sidebar layout renders.
2026-03-18 16:51:01 +01:00
Usman Baig
5c8f334017 fix: eliminate sidebar jitter on collapse/expand
Root cause: class switching (px-2↔px-3, justify-center↔gap-2.5,
conditional DOM rendering) caused instant layout jumps during the
200ms width transition.

Fix: internal layout is now 100% static — same padding, same gap,
same DOM structure in both states. Only opacity transitions on text
labels (via Label component). The sidebar overflow:hidden + width
transition handles the visual collapse. Collapse icon rotates 180deg
instead of swapping between two icons.
2026-03-18 16:45:39 +01:00
Usman Baig
5807a50092 fix: center icons in collapsed sidebar, eliminate white flash on click
Icons now use justify-center + px-0 when collapsed so they sit
perfectly centered in the 56px rail. Track pending navigation href
optimistically — clicked item shows orange immediately instead of
flashing through the inactive hover state during route transition.
2026-03-18 16:40:00 +01:00
Usman Baig
2474d6558f feat: Linear-style sidebar with explicit toggle
Rewrite sidebar from scratch: 256px expanded, 56px collapsed via
click toggle + [ keyboard shortcut. Two-phase CSS transitions (labels
fade then width contracts). Contextual ContentHeader replaces
UtilityBar (no logo, just actions). Remove framer-motion sidebar
primitive, hover-to-expand, and sidebar-context.
2026-03-18 16:33:35 +01:00
Usman Baig
db5cd4cbcb feat: replace sidebar with 21st.dev hover-to-expand component
Use framer-motion animated sidebar from 21st.dev — collapses to icons,
expands on hover. Phosphor icons instead of lucide. Remove old manual
collapse/expand and sidebar-context. Top bar has Pulse logo + user
actions, sidebar below with site picker and nav groups.
2026-03-18 16:20:32 +01:00
Usman Baig
66a70f676f fix: full-width top bar with logo, sidebar below
Restructure layout: top bar spans full width (Pulse logo left, user
actions right) with continuous bottom border. Sidebar sits below with
no vertical border collision. Remove logo from sidebar. Remove all
transition-colors from nav items to prevent white flash on click.
2026-03-18 16:12:20 +01:00
Usman Baig
d00d2e5592 fix: sidebar polish — logo, scrollbar, utility bar height, icon flash
- Fix stretched logo with object-contain
- Remove border below logo
- Add overflow-hidden to prevent scrollbar flash during transition
- Match utility bar height to old header (py-3.5)
- Remove transition-colors from active nav items to prevent white flash
2026-03-18 16:04:50 +01:00
Usman Baig
1d25368292 feat: Dokploy-style sidebar layout for site pages
Sidebar takes full viewport height with Pulse logo at top. No Header
on site pages — UtilityBar in content area provides theme toggle, app
launcher, notifications, and user menu. Non-site authenticated pages
keep static Header. No footer on dashboard pages.
2026-03-18 15:58:06 +01:00
Usman Baig
7ae5facd0c fix: proper dashboard layout — header + sidebar + content fill viewport
Use h-screen overflow-hidden on the root container for authenticated
views. Sidebar and content fill the remaining height below the header.
Remove footer from dashboard pages. Content scrolls inside its own
container, sidebar stays fixed in place.
2026-03-18 15:38:58 +01:00
Usman Baig
61ce505ee5 fix: pin sidebar to viewport with sticky positioning
Sidebar was scrolling with page content. Fix by adding sticky top-0
h-screen. Widen collapsed width to 68px to prevent icon clipping.
2026-03-18 15:34:48 +01:00
Usman Baig
80ae8311dc feat: static header + collapsible sidebar navigation
Replace floating pill header with static variant for authenticated
views. Add collapsible sidebar with site picker, grouped navigation
(Analytics/Infrastructure), and mobile overlay drawer. Remove
horizontal SiteNav tab bar.
2026-03-18 15:30:27 +01:00