From 1ce5b125a9219554e2c19f29d3f064c9986d585d Mon Sep 17 00:00:00 2001 From: Shantur Rathore Date: Tue, 28 Oct 2025 18:19:17 +0000 Subject: [PATCH] Expand dark theme coverage across client UI --- src/App.tsx | 8 ++- src/components/agent-selector.tsx | 24 ++++--- src/components/instance-tab.tsx | 6 +- src/components/instance-tabs.tsx | 4 +- src/components/instance-welcome-view.tsx | 91 +++++++++++++++--------- src/components/markdown.tsx | 14 ++-- src/components/message-stream.tsx | 4 +- src/components/model-selector.tsx | 30 ++++---- src/components/session-picker.tsx | 37 ++++++---- src/components/session-tabs.tsx | 4 +- src/index.css | 57 +++++++++++---- src/lib/theme.tsx | 25 +++++-- 12 files changed, 197 insertions(+), 107 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index fbf3996f..81951b74 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,6 +10,7 @@ import MessageStream from "./components/message-stream" import PromptInput from "./components/prompt-input" import InfoView from "./components/info-view" import { initMarkdown } from "./lib/markdown" +import { useTheme } from "./lib/theme" import { createCommandRegistry } from "./lib/commands" import type { Command } from "./lib/commands" import { @@ -160,9 +161,14 @@ const SessionView: Component<{ } const App: Component = () => { + const { isDark } = useTheme() const commandRegistry = createCommandRegistry() const [escapeInDebounce, setEscapeInDebounce] = createSignal(false) + createEffect(() => { + void initMarkdown(isDark()).catch(console.error) + }) + const activeInstance = createMemo(() => getActiveInstance()) const activeSessions = createMemo(() => { @@ -634,8 +640,6 @@ const App: Component = () => { } onMount(() => { - initMarkdown(false).catch(console.error) - setEscapeStateChangeHandler(setEscapeInDebounce) setupCommands() diff --git a/src/components/agent-selector.tsx b/src/components/agent-selector.tsx index cf8e4ed4..6e99aed3 100644 --- a/src/components/agent-selector.tsx +++ b/src/components/agent-selector.tsx @@ -64,17 +64,19 @@ export default function AgentSelector(props: AgentSelectorProps) { itemComponent={(itemProps) => (
- + {itemProps.item.rawValue.name} - subagent + + subagent + - + {itemProps.item.rawValue.description.length > 50 ? itemProps.item.rawValue.description.slice(0, 50) + "..." : itemProps.item.rawValue.description} @@ -86,23 +88,25 @@ export default function AgentSelector(props: AgentSelectorProps) { > > - {(state) => Agent: {state.selectedOption()?.name ?? "None"}} + {(state) => ( + Agent: {state.selectedOption()?.name ?? "None"} + )} - + - - + + - +
diff --git a/src/components/instance-tab.tsx b/src/components/instance-tab.tsx index 21c314a6..2da6a1f6 100644 --- a/src/components/instance-tab.tsx +++ b/src/components/instance-tab.tsx @@ -30,7 +30,9 @@ const InstanceTab: Component = (props) => {
-
diff --git a/src/components/session-tabs.tsx b/src/components/session-tabs.tsx index 08164568..aaa25114 100644 --- a/src/components/session-tabs.tsx +++ b/src/components/session-tabs.tsx @@ -19,7 +19,7 @@ const SessionTabs: Component = (props) => { const totalTabs = () => sessionsList().length + 1 return ( -
+
@@ -39,7 +39,7 @@ const SessionTabs: Component = (props) => { onSelect={() => props.onSelect("info")} />