Skip to content

Fix theme toggle reliability and improve light/dark readability#121

Merged
podcctv merged 1 commit into
mainfrom
codex-z3796o
Apr 4, 2026
Merged

Fix theme toggle reliability and improve light/dark readability#121
podcctv merged 1 commit into
mainfrom
codex-z3796o

Conversation

@podcctv

@podcctv podcctv commented Apr 4, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Users reported that the UI could not reliably switch between light and dark modes and that muted text had poor readability in both themes.
  • The goal is to make theme switching robust across pages and improve visual contrast for critical UI text and cards.

Description

  • Rewrote the theme wiring in master-api/static/theme.js to bind to any existing .theme-toggle elements and avoid injecting duplicate controls, and to provide a floating fallback toggle when no in-layout toggle exists.
  • Improved theme state handling by validating stored values (localStorage) and falling back to the system preference via prefers-color-scheme, and synchronized color-scheme via html.style.colorScheme when applying a theme.
  • Unified toggle UI updates so both new markup (.theme-icon) and legacy markup (.theme-toggle-icon) are refreshed and accessibility aria-label/title are kept correct after changes.
  • Enhanced master-api/static/theme.css with higher-contrast --text-muted/--text-dimmed values, added floating toggle styles, legacy toggle compatibility styles, and targeted light-theme adjustments for headers, cards and sidebar items to improve overall readability.

Testing

  • Ran a JavaScript syntax check with node --check master-api/static/theme.js, which completed successfully.
  • Verified the changes are limited to the two files master-api/static/theme.js and master-api/static/theme.css via local diff inspection.
  • No automated browser/visual tests were available in this environment to show render screenshots, so visual verification should be performed in a browser after deployment.

Codex Task

@podcctv podcctv merged commit 8f79cf2 into main Apr 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant