From 5806a8062e093f72a529461e949343f01a5ab16e Mon Sep 17 00:00:00 2001 From: RandomCatboy Date: Thu, 6 Aug 2026 19:57:39 +0200 Subject: [PATCH 1/5] Unified theme persistence across Settings, desktop navigation, and mobile navigation. Added optimistic theme/accent updates with rollback and race protection. Standardized the demo-mode banner across desktop and mobile. Hardened logout handling against failed and duplicate requests. Fixed investigation polling races that could miss completed reports or show stale data. Added request timeouts to S3 and Azure backup operations. Fixed S3 and Azure backup-retention pagination beyond provider result limits. Added safe XML entity decoding for cloud object names and continuation tokens. Improved chat hydration dependencies and unsupported AI-task handling. Made the global critical-error screen respect light and dark system themes. Added regression tests for backup pagination and XML parsing. --- src/app/(dashboard)/layout.tsx | 9 +- src/app/global-error.tsx | 11 ++- src/components/chat/chat-dock.tsx | 3 +- .../logs/threats/use-investigation-poll.ts | 35 ++++++-- .../mobile/shell/mobile-more-sheet.tsx | 9 +- src/components/mobile/shell/mobile-shell.tsx | 8 +- src/components/settings/appearance-form.tsx | 29 +++---- src/components/shell/topbar.tsx | 7 +- src/components/shell/use-logout.ts | 23 +++-- src/lib/ai/prompts.ts | 2 + src/lib/backup/destinations/azure.test.ts | 40 ++++++++- src/lib/backup/destinations/azure.ts | 85 ++++++++++++++----- src/lib/backup/destinations/s3.test.ts | 50 ++++++++++- src/lib/backup/destinations/s3.ts | 77 ++++++++++++----- 14 files changed, 291 insertions(+), 97 deletions(-) diff --git a/src/app/(dashboard)/layout.tsx b/src/app/(dashboard)/layout.tsx index 396a30a..92039fb 100644 --- a/src/app/(dashboard)/layout.tsx +++ b/src/app/(dashboard)/layout.tsx @@ -1,5 +1,4 @@ import { redirect } from "next/navigation"; -import { LockKeyhole } from "lucide-react"; import { requirePageUser } from "@/lib/auth/guards"; import { isLockedDemoMode } from "@/lib/demo/mode"; import { isMobileView } from "@/lib/device"; @@ -10,6 +9,7 @@ import { PrivacyProvider } from "@/components/privacy/privacy-provider"; import { SidebarNav } from "@/components/shell/sidebar"; import { Topbar } from "@/components/shell/topbar"; import { MobileShell } from "@/components/mobile/shell/mobile-shell"; +import { DemoModeBanner } from "@/components/shell/demo-mode-banner"; export const dynamic = "force-dynamic"; @@ -70,12 +70,7 @@ export default async function DashboardLayout({ children }: { children: React.Re
- {demoLocked && ( -
- Public demo — exploration and - mock AI are enabled; persistent changes are locked. -
- )} + {demoLocked && }
{children}
{aiConfig.enabled && } diff --git a/src/app/global-error.tsx b/src/app/global-error.tsx index 0af7950..a55249d 100644 --- a/src/app/global-error.tsx +++ b/src/app/global-error.tsx @@ -20,10 +20,13 @@ export default function GlobalError({ error, reset }: { error: Error & { digest? fontFamily: "system-ui, sans-serif", textAlign: "center", padding: "1.5rem", + colorScheme: "light dark", + background: "Canvas", + color: "CanvasText", }} >

Something went wrong

-

+

A critical error occurred. Try reloading the page; if it persists, check the server logs.