From f469d0d755c67941aa93e7037d8256f8a3e203e4 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Wed, 4 Mar 2026 21:09:20 +0100 Subject: [PATCH 01/28] chore: bump @ciphera-net/ui to ^0.0.80 --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2a7e9b6..67de8f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "pulse-frontend", - "version": "0.12.0-alpha", + "version": "0.13.0-alpha", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pulse-frontend", - "version": "0.12.0-alpha", + "version": "0.13.0-alpha", "dependencies": { - "@ciphera-net/ui": "^0.0.79", + "@ciphera-net/ui": "^0.0.80", "@ducanh2912/next-pwa": "^10.2.9", "@radix-ui/react-icons": "^1.3.0", "@simplewebauthn/browser": "^13.2.2", @@ -1665,9 +1665,9 @@ } }, "node_modules/@ciphera-net/ui": { - "version": "0.0.79", - "resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.79/11371f19607016d14b0343a698d5f2ef22360c0c", - "integrity": "sha512-Th7jVpsf2Qjf5o8ZP1315xJ4q09fb3zo5rPwAiK7jQZGl9AIZU8qw33wJchDKJU7dwo9YetKFvP60lnqseadnA==", + "version": "0.0.80", + "resolved": "https://npm.pkg.github.com/download/@ciphera-net/ui/0.0.80/0fc38c4004f3d899afffa8c15addc490b72efe15", + "integrity": "sha512-/Jc0aTEE94YA+V/FbpCK133IYbwp/rPpr1a/pdhIG54OzMzVnaRndaVpNLpmLB2Y7POmRTecJr831L1DUrI4WQ==", "dependencies": { "@radix-ui/react-icons": "^1.3.0", "clsx": "^2.1.0", diff --git a/package.json b/package.json index a0770a2..0c03c2d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "test:watch": "vitest" }, "dependencies": { - "@ciphera-net/ui": "^0.0.79", + "@ciphera-net/ui": "^0.0.80", "@ducanh2912/next-pwa": "^10.2.9", "@radix-ui/react-icons": "^1.3.0", "@simplewebauthn/browser": "^13.2.2", From 48cf9a1f62bc0c474c2fa30f85303b4fe6ba4f27 Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Thu, 5 Mar 2026 22:16:36 +0100 Subject: [PATCH 02/28] feat: replace settings page with SettingsModal - Add SettingsModalProvider context and SettingsModalWrapper - Wire Header onOpenSettings callback via LayoutInner pattern - Remove old /settings page and SettingsPageClient - Bump @ciphera-net/ui to ^0.0.88 --- app/layout-content.tsx | 25 +- app/settings/SettingsPageClient.tsx | 532 ------------------- app/settings/page.tsx | 14 - components/settings/SettingsModalWrapper.tsx | 186 +++++++ lib/settings-modal-context.tsx | 31 ++ package-lock.json | 8 +- package.json | 2 +- 7 files changed, 241 insertions(+), 557 deletions(-) delete mode 100644 app/settings/SettingsPageClient.tsx delete mode 100644 app/settings/page.tsx create mode 100644 components/settings/SettingsModalWrapper.tsx create mode 100644 lib/settings-modal-context.tsx diff --git a/app/layout-content.tsx b/app/layout-content.tsx index 8ef4acd..e5f2caa 100644 --- a/app/layout-content.tsx +++ b/app/layout-content.tsx @@ -13,6 +13,8 @@ import { getUserOrganizations, switchContext, type OrganizationMember } from '@/ import { setSessionAction } from '@/app/actions/auth' import { LoadingOverlay } from '@ciphera-net/ui' import { useRouter } from 'next/navigation' +import { SettingsModalProvider, useSettingsModal } from '@/lib/settings-modal-context' +import SettingsModalWrapper from '@/components/settings/SettingsModalWrapper' const ORG_SWITCH_KEY = 'pulse_switching_org' @@ -44,10 +46,11 @@ const CIPHERA_APPS: CipheraApp[] = [ }, ] -export default function LayoutContent({ children }: { children: React.ReactNode }) { +function LayoutInner({ children }: { children: React.ReactNode }) { const auth = useAuth() const router = useRouter() const isOnline = useOnlineStatus() + const { openSettings } = useSettingsModal() const [orgs, setOrgs] = useState([]) const [isSwitchingOrg, setIsSwitchingOrg] = useState(() => { if (typeof window === 'undefined') return false @@ -87,7 +90,7 @@ export default function LayoutContent({ children }: { children: React.ReactNode const handleCreateOrganization = () => { router.push('/onboarding') } - + const showOfflineBar = Boolean(auth.user && !isOnline); const barHeightRem = 2.5; const headerHeightRem = 6; @@ -100,9 +103,9 @@ export default function LayoutContent({ children }: { children: React.ReactNode return ( <> {auth.user && } -
: null} apps={CIPHERA_APPS} currentAppId="pulse" + onOpenSettings={openSettings} customNavItems={ <> {!auth.user && ( @@ -136,11 +140,20 @@ export default function LayoutContent({ children }: { children: React.ReactNode > {children} -