From 6c84696d051513233a658c6b116a7605e70925af Mon Sep 17 00:00:00 2001
From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com>
Date: Thu, 21 May 2026 21:37:12 +0100
Subject: [PATCH 1/2] hub-client: apply theme on login screen and after logout
ThemeProvider was mounted inside App's post-login branches only, so the
login screen rendered with no class on (falling back to the light
:root defaults) and the dark class persisted on after logout
because the provider's useEffect has no cleanup. Hoist ThemeProvider
into main.tsx so it wraps every branch of App.
---
hub-client/src/App.tsx | 11 +++--------
hub-client/src/main.tsx | 5 ++++-
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/hub-client/src/App.tsx b/hub-client/src/App.tsx
index 9312bba55..a396634ea 100644
--- a/hub-client/src/App.tsx
+++ b/hub-client/src/App.tsx
@@ -16,7 +16,6 @@ function DevHarnessLazy({ page }: { page: string }) {
import Editor from './components/Editor';
import Toast from './components/Toast';
import { ViewModeProvider } from './components/ViewModeContext';
-import { ThemeProvider } from './components/ThemeContext';
import { LoginScreen } from './components/auth/LoginScreen';
import {
connect,
@@ -568,11 +567,7 @@ function App() {
// Dev harness: render components in isolation for visual testing.
// Only available in development builds; the DevRoute type is never parsed in production.
if (route.type === 'dev') {
- return (
-
-
-
- );
+ return ;
}
// Show project set setup/migration screen if needed
@@ -611,7 +606,7 @@ function App() {
}
return (
-
+ <>
{!project ? (
setShowSaveToast(false)}
/>
-
+ >
);
}
diff --git a/hub-client/src/main.tsx b/hub-client/src/main.tsx
index b0ecef568..88dfd7c6d 100644
--- a/hub-client/src/main.tsx
+++ b/hub-client/src/main.tsx
@@ -7,6 +7,7 @@ import App from './App.tsx'
import { savePreAuthHash, restorePreAuthHash } from './utils/routing'
import { AuthProviderRoot, noopAuthProvider } from './auth/AuthProvider'
import { googleAuthProvider } from './auth/GoogleAuthProvider'
+import { ThemeProvider } from './components/ThemeContext'
// Pre-auth hash preservation for the Google OAuth redirect flow.
// On first visit: save the hash (e.g., #/share/...) before React clears it.
@@ -31,7 +32,9 @@ const authProvider = GOOGLE_CLIENT_ID ? googleAuthProvider : noopAuthProvider;
const root = (
-
+
+
+
);
From 51dd9b1219aa1269d613b8196ad2e77939e0498d Mon Sep 17 00:00:00 2001
From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com>
Date: Thu, 21 May 2026 21:37:24 +0100
Subject: [PATCH 2/2] hub-client: changelog for 6c84696d
---
hub-client/changelog.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hub-client/changelog.md b/hub-client/changelog.md
index 551cad503..97e19f2dc 100644
--- a/hub-client/changelog.md
+++ b/hub-client/changelog.md
@@ -15,6 +15,10 @@ be in reverse chronological order (latest first).
-->
+### 2026-05-21
+
+- [`6c84696d`](https://github.com/quarto-dev/q2/commits/6c84696d): Login screen and post-logout view now respect the saved `colorScheme` preference (and system `prefers-color-scheme`) instead of always rendering light on first visit and inheriting the previous session's class after logout.
+
### 2026-05-15
- [`e9399093`](https://github.com/quarto-dev/q2/commits/e9399093): Authorship pill in the replay bar now animates with a rotating rainbow border while attribution data is being generated, so large documents give visible feedback that work is happening before the colours appear in the preview.