Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(shot): apply dark mode from the query to the document root

Steven Enamakeld31fa4cd92c9
diff --git a/app/src/shot.tsx b/app/src/shot.tsx
index 02d887f50f..8f96792d57 100644
--- a/app/src/shot.tsx
+++ b/app/src/shot.tsx
@@ -24,11 +24,14 @@ const list = (
/>
);
+// `tokens.css` scopes the dark palette to `:root.dark`, so the class has to go
+// on documentElement — a nested `.dark` wrapper redefines nothing.
+if (new URLSearchParams(location.search).has('dark')) {
+ document.documentElement.classList.add('dark');
+}
+
createRoot(document.getElementById('root')!).render(
- <div className="flex h-screen gap-4 p-3">
+ <div className="h-screen bg-surface-chrome p-3">
<div className="h-72 w-64 rounded-2xl border border-line">{list}</div>
- <div className="dark h-72 w-64 rounded-2xl border border-line bg-surface-chrome" data-testid="dark-pane">
- {list}
- </div>
</div>
);