Skip to content

Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.

app: restore system dark mode (#18049)

Eva Ha67fe8c5379d
diff --git a/app/cmd/app/app_darwin.m b/app/cmd/app/app_darwin.m
index ca32842ae..d8700054a 100644
--- a/app/cmd/app/app_darwin.m
+++ b/app/cmd/app/app_darwin.m
@@ -1542,7 +1542,6 @@ decidePolicyForNavigationAction:(WKNavigationAction *)action
AppDelegate *appDelegate;
void run(bool so, bool sh) {
[NSApplication sharedApplication];
- [NSApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]];
[NSApp setActivationPolicy:NSApplicationActivationPolicyAccessory];
appDelegate = [[AppDelegate alloc] init];
[NSApp setDelegate:appDelegate];
diff --git a/app/cmd/app/webview.go b/app/cmd/app/webview.go
index bf02b15ed..9518cacb3 100644
--- a/app/cmd/app/webview.go
+++ b/app/cmd/app/webview.go
@@ -99,7 +99,7 @@ func (w *Webview) Run(path string) unsafe.Pointer {
// Windows-specific scrollbar styling
if runtime.GOOS == "windows" {
init += `
- // Keep Edge WebView2 scrollbars aligned with the light-only app theme.
+ // Keep Edge WebView2 scrollbars aligned with the system theme.
function updateScrollbarStyles() {
const existingStyle = document.getElementById('scrollbar-style');
if (existingStyle) existingStyle.remove();
@@ -112,6 +112,12 @@ func (w *Webview) Run(path string) unsafe.Pointer {
::-webkit-scrollbar-thumb { background: #c0c0c0 !important; border-radius: 6px !important; }
::-webkit-scrollbar-thumb:hover { background: #a0a0a0 !important; }
::-webkit-scrollbar-corner { background: #f0f0f0 !important; }
+ @media (prefers-color-scheme: dark) {
+ ::-webkit-scrollbar-track { background: #1a1a1a !important; }
+ ::-webkit-scrollbar-thumb { background: #404040 !important; }
+ ::-webkit-scrollbar-thumb:hover { background: #505050 !important; }
+ ::-webkit-scrollbar-corner { background: #1a1a1a !important; }
+ }
::-webkit-scrollbar-button {
background: transparent !important;
border: none !important;
diff --git a/app/ui/app/index.html b/app/ui/app/index.html
index 6ce0a8477..8471a185d 100644
--- a/app/ui/app/index.html
+++ b/app/ui/app/index.html
@@ -1,14 +1,14 @@
<!doctype html>
-<html lang="en" style="overflow: hidden; color-scheme: light">
+<html lang="en" style="overflow: hidden">
<head>
<meta charset="UTF-8" />
- <meta name="color-scheme" content="light" />
+ <meta name="color-scheme" content="light dark" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="/src/index.css" />
<title>Ollama</title>
</head>
- <body class="bg-white select-text">
+ <body class="bg-white dark:bg-neutral-900 select-text">
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
diff --git a/app/ui/app/public/launch-icons/deepseek-harness.svg b/app/ui/app/public/launch-icons/deepseek-harness.svg
index 4f770e51f..653b77e15 100644
--- a/app/ui/app/public/launch-icons/deepseek-harness.svg
+++ b/app/ui/app/public/launch-icons/deepseek-harness.svg
@@ -1,4 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50" fill="none">
- <style>@media (prefers-color-scheme: dark) { path { fill: #fff; } }</style>
- <path d="M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C36.4668 10.0156 35.9702 9.31982 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C32.4092 19.4878 30.0381 16.2319 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C22.8691 7.90381 20.4507 9.06396 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C5.30859 10.2397 1.15674 16.4717 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C33.0396 40.1279 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C46.6924 18.9116 49.064 15.9038 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C7.97949 34.0879 4.48926 28.9282 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C11.8945 18.8799 17.165 22.0879 19.2529 25.7759C23.5381 30.104 25.335 35.1523 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.3042 23.9678 27.5801 24.248 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C31.6372 28.2881 30.6289 28.3042 29.8096 27.688C28.6987 26.8555 28.6279 25.7759 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C25.8467 22.5762 25.9805 22.1758 26.5088 21.688C28.0996 20.7598 29.6362 21.9917 30.834 23.3281C31.6216 24.2559 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z" fill="#000"/>
+ <path d="M48.8354 10.0479C48.3232 9.79199 48.1025 10.2798 47.8032 10.5278C47.7007 10.6079 47.6143 10.7119 47.5273 10.8076C46.7793 11.624 45.9048 12.1597 44.7622 12.0957C43.0923 12 41.666 12.5356 40.4058 13.8398C40.1377 12.2319 39.2476 11.272 37.8926 10.6558C37.1836 10.3359 36.4668 10.0156 35.9702 9.31982C35.6235 8.82373 35.5293 8.27197 35.356 7.72754C35.2456 7.3999 35.1353 7.06396 34.7651 7.00781C34.3633 6.94385 34.2056 7.2876 34.0479 7.57568C33.418 8.75195 33.1733 10.0479 33.1973 11.3599C33.2524 14.312 34.4736 16.6641 36.8999 18.3359C37.1758 18.5278 37.2466 18.7197 37.1597 19C36.9946 19.5757 36.7974 20.1357 36.624 20.7119C36.5137 21.0801 36.3486 21.1597 35.9624 21C34.6309 20.4321 33.481 19.5918 32.4644 18.5757C30.7393 16.8721 29.1792 14.9917 27.2334 13.52C26.7764 13.1758 26.3193 12.856 25.8467 12.5518C23.8618 10.584 26.1069 8.96777 26.627 8.77588C27.1704 8.57568 26.8159 7.8877 25.0591 7.896C23.3022 7.90381 21.6953 8.50391 19.647 9.30371C19.3477 9.42383 19.0322 9.51172 18.7095 9.58398C16.8501 9.22363 14.9199 9.14355 12.9033 9.37598C9.10596 9.80762 6.07275 11.6396 3.84326 14.7681C1.16455 18.5278 0.53418 22.7998 1.30664 27.2559C2.11768 31.9521 4.46582 35.8398 8.07373 38.8799C11.8159 42.0322 16.1255 43.5762 21.041 43.2803C24.0269 43.104 27.3516 42.6963 31.1016 39.4561C32.0469 39.936 33.0396 40.1279 34.686 40.272C35.9546 40.3921 37.1758 40.208 38.1211 40.0078C39.6021 39.688 39.4995 38.2881 38.9639 38.0322C34.623 35.9678 35.5762 36.8081 34.71 36.1279C36.9155 33.4639 40.2402 30.6958 41.54 21.728C41.6426 21.0161 41.5557 20.5679 41.54 19.9917C41.5322 19.6396 41.6108 19.5039 42.0049 19.4639C43.0923 19.3359 44.1479 19.0317 45.1167 18.4878C47.9292 16.9199 49.064 14.3438 49.3315 11.2559C49.3711 10.7837 49.3237 10.2959 48.8354 10.0479ZM24.3262 37.8398C20.1196 34.4639 18.0791 33.3521 17.2358 33.3999C16.4482 33.4482 16.5898 34.3682 16.7632 34.9678C16.9443 35.5601 17.1812 35.9683 17.5117 36.4878C17.7402 36.832 17.8979 37.3442 17.2832 37.728C15.9282 38.584 13.5728 37.4399 13.4624 37.3838C10.7207 35.7358 8.42822 33.5601 6.81348 30.584C5.25342 27.7197 4.34766 24.6479 4.19775 21.3677C4.1582 20.5757 4.38672 20.2959 5.15869 20.1519C6.17529 19.96 7.22314 19.9199 8.23926 20.0718C12.5327 20.7119 16.1885 22.6719 19.2529 25.7759C21.002 27.5439 22.3252 29.6558 23.6885 31.7202C25.1377 33.9121 26.6978 36 28.6831 37.7119C29.3843 38.312 29.9434 38.7681 30.479 39.104C28.8643 39.2881 26.1699 39.3281 24.3262 37.8398ZM26.3433 24.6001C26.3433 24.248 26.6191 23.9678 26.9658 23.9678C27.0444 23.9678 27.1152 23.9839 27.1782 24.0078C27.2651 24.04 27.3438 24.0879 27.4067 24.1602C27.5171 24.272 27.5801 24.4321 27.5801 24.6001C27.5801 24.9521 27.3042 25.2319 26.9575 25.2319C26.6108 25.2319 26.3433 24.9521 26.3433 24.6001ZM32.6064 27.8799C32.2046 28.0479 31.8027 28.1919 31.4165 28.208C30.8179 28.2397 30.1641 27.9922 29.8096 27.688C29.2583 27.2158 28.8643 26.9521 28.6987 26.1279C28.6279 25.7759 28.6675 25.2319 28.7305 24.9199C28.8721 24.248 28.7144 23.8159 28.2495 23.4238C27.8716 23.104 27.3911 23.0161 26.8633 23.0161C26.666 23.0161 26.4849 22.9277 26.3511 22.856C26.1304 22.7441 25.9492 22.4639 26.1226 22.1201C26.1777 22.0078 26.4458 21.7358 26.5088 21.688C27.2256 21.272 28.0527 21.4077 28.8169 21.7197C29.5259 22.0161 30.0615 22.5601 30.834 23.3281C31.6216 24.2559 31.7632 24.5117 32.2124 25.208C32.5669 25.752 32.8901 26.312 33.1104 26.9521C33.2446 27.3521 33.0713 27.6802 32.6064 27.8799Z" fill="#4D6BFE" fill-rule="nonzero"/>
</svg>
diff --git a/app/ui/app/src/components/Logo.tsx b/app/ui/app/src/components/Logo.tsx
index bb8336746..ae1150737 100644
--- a/app/ui/app/src/components/Logo.tsx
+++ b/app/ui/app/src/components/Logo.tsx
@@ -18,7 +18,7 @@ export default function Logo({
viewBox="0 0 3400 3400"
fill="none"
xmlns="http://www.w3.org/2000/svg"
- className="select-none"
+ className={showBackground ? "select-none" : "select-none dark:invert"}
>
{showBackground && (
<circle cx="1700" cy="1700" r="1700" fill="white" />
diff --git a/app/ui/app/src/components/Onboarding.test.tsx b/app/ui/app/src/components/Onboarding.test.tsx
index 864e67401..ff043f12a 100644
--- a/app/ui/app/src/components/Onboarding.test.tsx
+++ b/app/ui/app/src/components/Onboarding.test.tsx
@@ -33,6 +33,8 @@ describe("Onboarding", () => {
expect(html.indexOf('alt="Ollama waving"')).toBeLessThan(
html.indexOf("Welcome to Ollama!"),
);
+ expect(html).toMatch(/<main class="light-only [^"]*bg-white/);
+ expect(html).not.toMatch(/alt="Ollama waving" class="[^"]*dark:/);
expect(html).toContain(
"Run open models with your coding agents so you can spend less while keeping your data private.",
);
@@ -513,6 +515,22 @@ describe("Onboarding", () => {
action: "copy",
command: "ollama launch droid",
},
+ {
+ id: "dsh",
+ name: "DeepSeek Harness",
+ description: "DeepSeek's open-source agent harness",
+ installed: false,
+ action: "copy",
+ command: "ollama launch dsh",
+ },
+ {
+ id: "cline",
+ name: "Cline",
+ description: "Autonomous coding agent",
+ installed: false,
+ action: "copy",
+ command: "ollama launch cline",
+ },
{
id: "terminal",
name: "Terminal",
@@ -569,6 +587,13 @@ describe("Onboarding", () => {
expect(html).not.toContain("inert");
expect(html).toContain("/launch-icons/claude.svg");
expect(html).toContain("/launch-icons/claude-code.svg");
+ expect(html).toMatch(
+ /src="\/launch-icons\/cline\.svg"[^>]*class="[^"]*dark:invert/,
+ );
+ expect(html).toContain("/launch-icons/deepseek-harness.svg");
+ expect(html).not.toMatch(
+ /src="\/launch-icons\/deepseek-harness\.svg"[^>]*class="[^"]*dark:invert/,
+ );
expect(html).not.toContain("<table");
expect(html).not.toContain("<footer");
expect(html).not.toContain("Command copied. Run it in your terminal.");
@@ -793,6 +818,7 @@ describe("Onboarding", () => {
);
expect(html).toContain("Create an account");
+ expect(html).toMatch(/<main class="light-only [^"]*bg-white/);
expect(html).toContain(
"Create your account for access to faster, larger open models.",
);
@@ -829,6 +855,7 @@ describe("Onboarding", () => {
);
expect(html).toContain("Run Ollama");
+ expect(html).toMatch(/<main class="light-only [^"]*bg-white/);
expect(html).toContain(FIRST_MODEL_COMMAND);
expect(html).not.toContain("Finish");
expect(html).not.toContain("Sign in");
diff --git a/app/ui/app/src/components/Onboarding.tsx b/app/ui/app/src/components/Onboarding.tsx
index 4c93fe1e0..0941865be 100644
--- a/app/ui/app/src/components/Onboarding.tsx
+++ b/app/ui/app/src/components/Onboarding.tsx
@@ -173,7 +173,7 @@ export function IntroScreen({
onRetryCompletion?: () => void;
}) {
return (
- <main className="flex h-screen w-full flex-col overflow-hidden bg-white text-neutral-950">
+ <main className="light-only flex h-screen w-full flex-col overflow-hidden bg-white text-neutral-950">
<TitleBar />
<section className="flex min-h-0 flex-1 items-center justify-center overflow-y-auto px-6 pb-10">
@@ -263,7 +263,7 @@ export function WelcomeScreen({
onRetryCompletion,
}: WelcomeScreenProps) {
return (
- <main className="flex min-h-screen w-full flex-col bg-white text-neutral-950">
+ <main className="light-only flex min-h-screen w-full flex-col bg-white text-neutral-950">
<TitleBar onSignIn={isAuthenticated ? undefined : onSignIn} />
<OnboardingCard>
<OnboardingIcon />
@@ -315,7 +315,7 @@ export function RunOllamaScreen({
onRetryCompletion,
}: RunOllamaScreenProps) {
return (
- <main className="flex min-h-screen w-full flex-col bg-white text-neutral-950">
+ <main className="light-only flex min-h-screen w-full flex-col bg-white text-neutral-950">
<TitleBar />
<OnboardingCard>
<OnboardingIcon compact />
@@ -331,7 +331,7 @@ export function RunOllamaScreen({
content={FIRST_MODEL_COMMAND}
size="md"
title="Copy command to clipboard"
- className="shrink-0 text-neutral-400 hover:!bg-transparent hover:!text-neutral-400 dark:hover:!bg-transparent"
+ className="shrink-0 text-neutral-400 hover:!bg-transparent hover:!text-neutral-400"
/>
</div>
@@ -360,13 +360,22 @@ function LaunchCommandIcon({ item }: { item: IntegrationStatus }) {
return (
<div className="flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-transparent">
{icon ? (
- <img
- src={icon.src}
- alt=""
- className={`${icon.className ?? "h-7 w-7"} rounded-sm object-contain`}
- />
+ <>
+ <img
+ src={icon.src}
+ alt=""
+ className={`${icon.className ?? "h-7 w-7"} rounded-sm object-contain ${icon.darkSrc ? "dark:hidden" : ""}`}
+ />
+ {icon.darkSrc && (
+ <img
+ src={icon.darkSrc}
+ alt=""
+ className={`${icon.className ?? "h-7 w-7"} hidden rounded-sm object-contain dark:block`}
+ />
+ )}
+ </>
) : (
- <CommandLineIcon className="h-6 w-6 stroke-[1.5] text-neutral-700" />
+ <CommandLineIcon className="h-6 w-6 stroke-[1.5] text-neutral-700 dark:text-neutral-300" />
)}
</div>
);
@@ -374,13 +383,13 @@ function LaunchCommandIcon({ item }: { item: IntegrationStatus }) {
export function ClaudeConnectedIntro({ onDone }: { onDone: () => void }) {
return (
- <div className="claude-connected-backdrop fixed inset-0 z-50 flex items-center justify-center bg-black/20 p-6">
+ <div className="claude-connected-backdrop fixed inset-0 z-50 flex items-center justify-center bg-black/20 p-6 dark:bg-black/50">
<section
role="dialog"
aria-modal="true"
aria-labelledby="claude-connected-title"
aria-describedby="claude-connected-description"
- className="claude-connected-dialog relative w-full max-w-md overflow-hidden rounded-2xl bg-white font-sans shadow-2xl ring-1 ring-black/10"
+ className="claude-connected-dialog relative w-full max-w-md overflow-hidden rounded-2xl bg-white font-sans shadow-2xl ring-1 ring-black/10 dark:bg-neutral-800 dark:ring-white/10"
>
<img
src="/claude-connected.png"
@@ -393,13 +402,13 @@ export function ClaudeConnectedIntro({ onDone }: { onDone: () => void }) {
<div className="p-6">
<h2
id="claude-connected-title"
- className="font-rounded text-lg font-medium leading-6 text-neutral-950"
+ className="font-rounded text-lg font-medium leading-6 text-neutral-950 dark:text-neutral-100"
>
Easily access Ollama models in your Claude
</h2>
<p
id="claude-connected-description"
- className="mt-2 text-[13px] leading-5 text-neutral-500"
+ className="mt-2 text-[13px] leading-5 text-neutral-500 dark:text-neutral-400"
>
Ollama models now show up in Claude so you can pick the right model
for the task.
@@ -408,7 +417,7 @@ export function ClaudeConnectedIntro({ onDone }: { onDone: () => void }) {
<button
type="button"
autoFocus
- className="rounded-full bg-neutral-100 px-6 py-2 text-sm font-normal text-neutral-950 transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-500"
+ className="rounded-full bg-neutral-100 px-6 py-2 text-sm font-normal text-neutral-950 transition-colors hover:bg-neutral-200 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-500 dark:bg-white dark:hover:bg-neutral-100"
onClick={onDone}
>
Continue
@@ -931,19 +940,21 @@ export function ConnectAppsScreen({
<div className="flex min-w-0 items-center gap-3">
<LaunchCommandIcon item={item} />
<div className="min-w-0">
- <p className="text-sm font-medium text-neutral-950">{item.name}</p>
- <p className="truncate text-xs leading-5 text-neutral-500">
+ <p className="text-sm font-medium text-neutral-950 dark:text-neutral-100">
+ {item.name}
+ </p>
+ <p className="truncate text-xs leading-5 text-neutral-500 dark:text-neutral-400">
{item.description}
</p>
</div>
</div>
- <div className="ml-auto flex min-w-0 shrink-0 items-center overflow-hidden rounded-lg bg-neutral-100 pl-3">
- <code className="block flex-1 whitespace-nowrap py-2 pr-2 font-mono text-[13px] text-neutral-500">
+ <div className="ml-auto flex min-w-0 shrink-0 items-center overflow-hidden rounded-lg bg-neutral-100 pl-3 dark:bg-neutral-800">
+ <code className="block flex-1 whitespace-nowrap py-2 pr-2 font-mono text-[13px] text-neutral-500 dark:text-neutral-400">
{item.command}
</code>
<button
type="button"
- className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-neutral-500 transition-colors hover:text-neutral-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-500"
+ className="inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-neutral-500 transition-colors hover:text-neutral-950 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-500 dark:text-neutral-400 dark:hover:text-neutral-100"
onClick={() => copyLaunchCommand(item)}
aria-label={
copied
@@ -963,16 +974,16 @@ export function ConnectAppsScreen({
);
};
const claudeRow = claudeIntegration ? (
- <div className="flex min-h-18 items-center justify-between gap-4 bg-white px-4 py-3">
+ <div className="flex min-h-18 items-center justify-between gap-4 bg-white px-4 py-3 dark:bg-neutral-900">
<div className="flex min-w-0 items-center gap-3">
<LaunchCommandIcon item={claudeIntegration} />
<div className="min-w-0">
- <p className="text-sm font-medium text-neutral-950">
+ <p className="text-sm font-medium text-neutral-950 dark:text-neutral-100">
{claudeIntegration.name}
</p>
<p
role={claudeGuidance ? "alert" : undefined}
- className="truncate text-xs leading-5 text-neutral-500"
+ className="truncate text-xs leading-5 text-neutral-500 dark:text-neutral-400"
>
{claudeGuidance ??
(claudeConnected
@@ -996,7 +1007,7 @@ export function ConnectAppsScreen({
<span
role="status"
aria-live="polite"
- className="inline-flex items-center gap-1.5 whitespace-nowrap text-xs text-neutral-500"
+ className="inline-flex items-center gap-1.5 whitespace-nowrap text-xs text-neutral-500 dark:text-neutral-400"
>
{isConnectingClaude && (
<ArrowPathIcon className="h-3.5 w-3.5 animate-spin" />
@@ -1019,11 +1030,11 @@ export function ConnectAppsScreen({
title={claudeConfigured ? "Disconnect" : "Connect"}
disabled={isConnectingClaude}
onClick={connectClaude}
- className={`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-500 disabled:cursor-wait disabled:opacity-50 ${claudeToggleConfigured ? "bg-neutral-950" : "bg-neutral-300"}`}
+ className={`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-neutral-500 disabled:cursor-wait disabled:opacity-50 ${claudeToggleConfigured ? "bg-neutral-950 dark:bg-white" : "bg-neutral-300 dark:bg-neutral-700"}`}
>
<span
aria-hidden="true"
- className={`inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform ${isConnectingClaude ? "animate-pulse" : ""} ${claudeToggleConfigured ? "translate-x-4.5" : "translate-x-0.5"}`}
+ className={`inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform ${isConnectingClaude ? "animate-pulse" : ""} ${claudeToggleConfigured ? "translate-x-4.5 dark:bg-neutral-900" : "translate-x-0.5"}`}
/>
</button>
</div>
@@ -1031,7 +1042,7 @@ export function ConnectAppsScreen({
) : null;
return (
- <main className="flex min-h-0 w-full flex-1 flex-col overflow-hidden bg-white text-neutral-950">
+ <main className="flex min-h-0 w-full flex-1 flex-col overflow-hidden bg-white text-neutral-950 dark:bg-neutral-900 dark:text-neutral-100">
<div className="flex min-h-0 flex-1 flex-col overflow-y-auto overscroll-contain p-6">
<section className="min-h-0 flex-1">
<div className="mx-auto w-full max-w-4xl text-left">
@@ -1041,11 +1052,13 @@ export function ConnectAppsScreen({
<section aria-labelledby="desktop-heading">
<h2
id="desktop-heading"
- className="px-4 text-xs font-medium uppercase tracking-wider text-neutral-400"
+ className="px-4 text-xs font-medium uppercase tracking-wider text-neutral-400 dark:text-neutral-500"
>
Desktop
</h2>
- <div className="mt-2 bg-white">{claudeRow}</div>
+ <div className="mt-2 bg-white dark:bg-neutral-900">
+ {claudeRow}
+ </div>
</section>
)}
@@ -1053,11 +1066,11 @@ export function ConnectAppsScreen({
<section aria-labelledby="terminal-heading">
<h2
id="terminal-heading"
- className="px-4 text-xs font-medium uppercase tracking-wider text-neutral-400"
+ className="px-4 text-xs font-medium uppercase tracking-wider text-neutral-400 dark:text-neutral-500"
>
Terminal
</h2>
- <div className="mt-2 bg-white">
+ <div className="mt-2 bg-white dark:bg-neutral-900">
<div className="space-y-2">
{launchIntegrations.map(launchIntegrationRow)}
</div>
@@ -1066,7 +1079,7 @@ export function ConnectAppsScreen({
)}
{!claudeIntegration && launchIntegrations.length === 0 && (
- <p className="py-12 text-center text-sm text-neutral-400">
+ <p className="py-12 text-center text-sm text-neutral-400 dark:text-neutral-500">
No apps found.
</p>
)}
@@ -1076,7 +1089,7 @@ export function ConnectAppsScreen({
Couldn&apos;t load integrations.
</p>
) : (
- <p className="mt-8 text-sm text-neutral-400">
+ <p className="mt-8 text-sm text-neutral-400 dark:text-neutral-500">
Checking integrations…
</p>
)}
diff --git a/app/ui/app/src/index.css b/app/ui/app/src/index.css
index bae499e10..adaadb49d 100644
--- a/app/ui/app/src/index.css
+++ b/app/ui/app/src/index.css
@@ -2,8 +2,13 @@
@plugin "@tailwindcss/typography";
@import "katex/dist/katex.min.css";
-/* Retain component class names while making the dark variant unreachable. */
-@custom-variant dark (@media not all);
+@custom-variant dark {
+ @media (prefers-color-scheme: dark) {
+ &:not(.light-only, .light-only *) {
+ @slot;
+ }
+ }
+}
@theme {
--font-sans: ui-sans-serif, system-ui, "Segoe UI", sans-serif;
@@ -13,13 +18,11 @@
@layer base {
:root {
- color-scheme: light;
+ color-scheme: light dark;
}
- html,
- body,
- #root {
- background-color: #fff;
+ .light-only {
+ color-scheme: light;
}
a[href],
diff --git a/app/ui/app/src/lib/launchCommands.ts b/app/ui/app/src/lib/launchCommands.ts
index f075ee158..47b7570c7 100644
--- a/app/ui/app/src/lib/launchCommands.ts
+++ b/app/ui/app/src/lib/launchCommands.ts
@@ -1,5 +1,6 @@
export interface IntegrationIcon {
src: string;
+ darkSrc?: string;
className?: string;
}
@@ -13,12 +14,21 @@ export const INTEGRATION_ICONS: Record<string, IntegrationIcon> = {
src: "/launch-icons/opencode.svg",
className: "h-7 w-7 rounded",
},
- codex: { src: "/launch-icons/codex.svg" },
- copilot: { src: "/launch-icons/copilot.svg" },
+ codex: {
+ src: "/launch-icons/codex.svg",
+ darkSrc: "/launch-icons/codex-dark.svg",
+ },
+ copilot: {
+ src: "/launch-icons/copilot.svg",
+ darkSrc: "/launch-icons/copilot-dark.svg",
+ },
droid: { src: "/launch-icons/droid.svg" },
dsh: { src: "/launch-icons/deepseek-harness.svg" },
pi: { src: "/launch-icons/pi.svg" },
- cline: { src: "/launch-icons/cline.svg" },
+ cline: {
+ src: "/launch-icons/cline.svg",
+ className: "h-7 w-7 dark:invert",
+ },
omp: { src: "/launch-icons/oh-my-pi.svg" },
pool: { src: "/launch-icons/poolside.svg" },
qwen: { src: "/launch-icons/qwen-code.svg" },
diff --git a/app/webview/webview.h b/app/webview/webview.h
index 0f04eead6..0a14f380e 100644
--- a/app/webview/webview.h
+++ b/app/webview/webview.h
@@ -2535,9 +2535,19 @@ inline SIZE make_window_frame_size(HWND window, int width, int height,
return {frame_width, frame_height};
}
+inline bool is_dark_theme_enabled() {
+ constexpr auto *sub_key =
+ L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize";
+ reg_key key(HKEY_CURRENT_USER, sub_key, 0, KEY_READ);
+ if (!key.is_open()) {
+ // Default is light theme
+ return false;
+ }
+ return key.query_uint(L"AppsUseLightTheme", 1) == 0;
+}
+
inline void apply_window_theme(HWND window) {
- // Ollama uses a light-only application appearance.
- constexpr bool dark_theme_enabled = false;
+ auto dark_theme_enabled = is_dark_theme_enabled();
// Use "immersive dark mode" on systems that support it.
// Changes the color of the window's title bar (light or dark).