Skip to content

fix(ux): theme-aware icon + markdown colors for dark mode - #125

Merged
os-zhuang merged 1 commit into
mainfrom
fix/dark-mode-icon-colors
Jun 11, 2026
Merged

fix(ux): theme-aware icon + markdown colors for dark mode#125
os-zhuang merged 1 commit into
mainfrom
fix/dark-mode-icon-colors

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

Dark-mode color cleanup

Dark mode (PR #116) shipped, but many concrete colors stayed hardcoded to their light-mode values — chiefly lucide icons, which take a color prop rather than a Tailwind class. #1e40af (the light-mode accent) reads too dark on a dark surface, and #0f172a (near-black) is invisible on a dark card.

Changes

  • lib/theme-colors.ts — a useThemeColors() hook returning theme-aware accent / foreground / muted hexes (accent #60a5fa dark / #1e40af light).
  • Swapped genuinely-hardcoded #1e40afaccent across the app shell and renderers: ScreenHeader back arrow (every screen), home, search, apps tab, app navigation, object list, packages, dashboard widget icons, filter drawer, view tabs, batch bar, state-machine actions, theme/language selectors, and the chart/map/calendar/report/query/sync renderers. (Files already made theme-aware in earlier UX PRs kept their existing ternaries.)
  • MarkdownText is now fully theme-aware (body text, links, code blocks/fences, blockquotes, borders) — AI-chat replies were rendering near-black on a dark surface.

Mid-tone greys (#94a3b8, #64748b) and semantic status colors (reds/greens/ambers, chart series) were intentionally left — they read correctly on both themes.

Verify

tsc + lint clean; full suite 1328 passing. Browser (375dp, dark): home accent icons render in the lighter blue, the AI-assistant markdown reply is legible on the dark card, and the back arrow is the lighter accent.

🤖 Generated with Claude Code

Dark mode shipped with many concrete colors still hardcoded to their
light-mode values — chiefly lucide icons (which take a `color` prop, not a
class), where `#1e40af` (too dark) and `#0f172a` (invisible on a dark card)
failed in dark mode.

- Add `lib/theme-colors.ts` → `useThemeColors()` returning theme-aware
  accent / foreground / muted hexes.
- Swap the genuinely-hardcoded `#1e40af` accents to `accent` across the app
  shell and renderers: ScreenHeader back arrow (every screen), home, search,
  apps, app nav, object list, packages, dashboard widget icons, filter drawer,
  view tabs, batch bar, state-machine actions, theme/language selectors, and
  the chart/map/calendar/report/query/sync renderers.
- Make MarkdownText fully theme-aware (body text, links, code blocks,
  blockquotes, borders) — AI chat replies were near-black on a dark surface.

Mechanical color-token swap; tsc + lint clean, full suite 1328 passing.
Verified in the browser (dark): home accent icons render in the lighter blue,
and an AI markdown reply is legible on the dark card.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@os-zhuang
os-zhuang merged commit 233fcfd into main Jun 11, 2026
@os-zhuang
os-zhuang deleted the fix/dark-mode-icon-colors branch June 11, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant