Skip to content

Commit 61ba844

Browse files
authored
fix: add fg color to some TUI text elements for light mode visibility (anomalyco#5378)
1 parent ffec52a commit 61ba844

7 files changed

Lines changed: 22 additions & 10 deletions

File tree

packages/opencode/src/cli/cmd/tui/component/dialog-provider.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ function AutoMethod(props: AutoMethodProps) {
122122
return (
123123
<box paddingLeft={2} paddingRight={2} gap={1} paddingBottom={1}>
124124
<box flexDirection="row" justifyContent="space-between">
125-
<text attributes={TextAttributes.BOLD}>{props.title}</text>
125+
<text attributes={TextAttributes.BOLD} fg={theme.text}>
126+
{props.title}
127+
</text>
126128
<text fg={theme.textMuted}>esc</text>
127129
</box>
128130
<box gap={1}>
@@ -198,7 +200,7 @@ function ApiMethod(props: ApiMethodProps) {
198200
<text fg={theme.textMuted}>
199201
OpenCode Zen gives you access to all the best coding models at the cheapest prices with a single API key.
200202
</text>
201-
<text>
203+
<text fg={theme.text}>
202204
Go to <span style={{ fg: theme.primary }}>https://opencode.ai/zen</span> to get a key
203205
</text>
204206
</box>

packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function DialogStatus() {
1919
</text>
2020
<text fg={theme.textMuted}>esc</text>
2121
</box>
22-
<Show when={Object.keys(sync.data.mcp).length > 0} fallback={<text>No MCP Servers</text>}>
22+
<Show when={Object.keys(sync.data.mcp).length > 0} fallback={<text fg={theme.text}>No MCP Servers</text>}>
2323
<box>
2424
<text fg={theme.text}>{Object.keys(sync.data.mcp).length} MCP Servers</text>
2525
<For each={Object.entries(sync.data.mcp)}>

packages/opencode/src/cli/cmd/tui/routes/session/sidebar.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,17 +259,19 @@ export function Sidebar(props: { sessionID: string }) {
259259
flexDirection="row"
260260
gap={1}
261261
>
262-
<text flexShrink={0}></text>
262+
<text flexShrink={0} fg={theme.text}>
263+
264+
</text>
263265
<box flexGrow={1} gap={1}>
264-
<text>
266+
<text fg={theme.text}>
265267
<b>Getting started</b>
266268
</text>
267269
<text fg={theme.textMuted}>OpenCode includes free models so you can start immediately.</text>
268270
<text fg={theme.textMuted}>
269271
Connect from 75+ providers to use other models, including Claude, GPT, Gemini etc
270272
</text>
271273
<box flexDirection="row" gap={1} justifyContent="space-between">
272-
<text>Connect provider</text>
274+
<text fg={theme.text}>Connect provider</text>
273275
<text fg={theme.textMuted}>/connect</text>
274276
</box>
275277
</box>

packages/opencode/src/cli/cmd/tui/ui/dialog-alert.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ export function DialogAlert(props: DialogAlertProps) {
2222
return (
2323
<box paddingLeft={2} paddingRight={2} gap={1}>
2424
<box flexDirection="row" justifyContent="space-between">
25-
<text attributes={TextAttributes.BOLD}>{props.title}</text>
25+
<text attributes={TextAttributes.BOLD} fg={theme.text}>
26+
{props.title}
27+
</text>
2628
<text fg={theme.textMuted}>esc</text>
2729
</box>
2830
<box paddingBottom={1}>

packages/opencode/src/cli/cmd/tui/ui/dialog-confirm.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ export function DialogConfirm(props: DialogConfirmProps) {
3434
return (
3535
<box paddingLeft={2} paddingRight={2} gap={1}>
3636
<box flexDirection="row" justifyContent="space-between">
37-
<text attributes={TextAttributes.BOLD}>{props.title}</text>
37+
<text attributes={TextAttributes.BOLD} fg={theme.text}>
38+
{props.title}
39+
</text>
3840
<text fg={theme.textMuted}>esc</text>
3941
</box>
4042
<box paddingBottom={1}>

packages/opencode/src/cli/cmd/tui/ui/dialog-help.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export function DialogHelp() {
1818
return (
1919
<box paddingLeft={2} paddingRight={2} gap={1}>
2020
<box flexDirection="row" justifyContent="space-between">
21-
<text attributes={TextAttributes.BOLD}>Help</text>
21+
<text attributes={TextAttributes.BOLD} fg={theme.text}>
22+
Help
23+
</text>
2224
<text fg={theme.textMuted}>esc/enter</text>
2325
</box>
2426
<box paddingBottom={1}>

packages/opencode/src/cli/cmd/tui/ui/dialog-prompt.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ export function DialogPrompt(props: DialogPromptProps) {
3535
return (
3636
<box paddingLeft={2} paddingRight={2} gap={1}>
3737
<box flexDirection="row" justifyContent="space-between">
38-
<text attributes={TextAttributes.BOLD}>{props.title}</text>
38+
<text attributes={TextAttributes.BOLD} fg={theme.text}>
39+
{props.title}
40+
</text>
3941
<text fg={theme.textMuted}>esc</text>
4042
</box>
4143
<box gap={1}>

0 commit comments

Comments
 (0)