▍ humdrum codex / soft

Default theme → humdrum; pin puppeteer Chrome out of ~/.cache (mole-proof)

cff9c267a2346b208fde7dba957897bed56f776f
humdrum-tiv <45084903+humdrum-tiv@users.noreply.github.com> · 2026-06-08 19:39

parent d30b97c4

Default theme → humdrum; pin puppeteer Chrome out of ~/.cache (mole-proof)

- Dashboard defaults to the humdrum theme (SSR cookie default + client hook)
- .puppeteerrc.cjs pins Chrome cache to ~/.local/share/personal-dashboard so
  cache cleaners (mole) can't evict it and break edition/PDF generation;
  mirrored by PUPPETEER_CACHE_DIR in .env.local for the running server

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

3 files changed

.puppeteerrc.cjs +11 −0
@@ -0,0 +1,11 @@
+// Pin puppeteer's Chrome download + lookup OUT of ~/.cache, which cache cleaners
+// (e.g. `mole clean`) wipe — evicting Chrome and silently breaking PDF/edition
+// generation. This data dir is not a cache, so cleaners leave it alone. Applies
+// to both `npx puppeteer browsers install` and runtime executablePath lookup.
+// Mirrored by PUPPETEER_CACHE_DIR in .env.local for the running Next server.
+const { homedir } = require("node:os");
+const { join } = require("node:path");
+
+module.exports = {
+  cacheDirectory: join(homedir(), ".local", "share", "personal-dashboard", "puppeteer"),
+};
app/layout.tsx +1 −1
@@ -34,7 +34,7 @@ }: {
   children: React.ReactNode;
 }) {
   const cookieStore = await cookies();
-  const initialTheme = cookieStore.get("app-theme")?.value ?? "flexoki";
+  const initialTheme = cookieStore.get("app-theme")?.value ?? "humdrum";
 
   return (
     <html lang="en" data-theme={initialTheme} suppressHydrationWarning>
hooks/useTheme.ts +1 −1
@@ -11,7 +11,7 @@   mode?: Mode;
 }
 
 export function useTheme() {
-  const [theme, setThemeState] = useState<Theme>("flexoki");
+  const [theme, setThemeState] = useState<Theme>("humdrum");
   const [mode, setModeState] = useState<Mode>("auto");
 
   // hydrate from localStorage