diff --git a/apps/loopover-miner-ui/src/components/theme-toggle.tsx b/apps/loopover-miner-ui/src/components/theme-toggle.tsx
index 041c1b4828..27002d189a 100644
--- a/apps/loopover-miner-ui/src/components/theme-toggle.tsx
+++ b/apps/loopover-miner-ui/src/components/theme-toggle.tsx
@@ -1,17 +1,34 @@
import { useState } from "react";
import { Button } from "@loopover/ui-kit/components/button";
-// Light/dark theme toggle for miner-ui (#6508). The shared @loopover/ui-kit theme.css already ships BOTH
+// Light/dark theme toggle for miner-ui (#6508 / #6828). The shared @loopover/ui-kit theme.css already ships BOTH
// palettes (light tokens under :root, dark overrides under .dark), switched purely by whether a `.dark` class
// is present on — so this control only flips that class, mirrors it into colorScheme (so native form
// controls follow the theme), and persists the choice. index.html's inline no-flash script reads the same
-// persisted value to restore the theme before first paint.
+// persisted value to restore the theme before first paint. Compact ghost icon so the header row stays usable
+// beside the four nav links on narrow widths.
const STORAGE_KEY = "loopover.miner_theme";
-export function ThemeToggle() {
- const [isDark, setIsDark] = useState(() =>
- typeof document === "undefined" ? true : document.documentElement.classList.contains("dark"),
+function SunIcon() {
+ return (
+
);
+}
+
+function MoonIcon() {
+ return (
+
+ );
+}
+
+export function ThemeToggle() {
+ // Client-only Vite SPA — document is always present when this runs.
+ const [isDark, setIsDark] = useState(() => document.documentElement.classList.contains("dark"));
function toggle() {
const nextIsDark = !isDark;
@@ -27,8 +44,13 @@ export function ThemeToggle() {
}
return (
-