Skip to content

Add persisted dark theme support#21

Open
newmattock wants to merge 2 commits into
CodeBountyOrg:mainfrom
newmattock:codex/issue-1-dark-theme
Open

Add persisted dark theme support#21
newmattock wants to merge 2 commits into
CodeBountyOrg:mainfrom
newmattock:codex/issue-1-dark-theme

Conversation

@newmattock
Copy link
Copy Markdown
Contributor

Fixes #1.

Summary

  • add a header theme toggle that switches between light and dark mode
  • resolve the initial theme from taskforge.theme or prefers-color-scheme before the stylesheet loads to avoid dark-mode flash
  • persist manual choices in localStorage under taskforge.theme
  • move theme behavior into a focused module with Node test coverage
  • add an ESLint flat config so the lint script runs on the current ESLint version

Verification

  • node --test
  • node --check src/theme.js src/app.js test/theme.test.js eslint.config.mjs
  • eslint src test
  • git diff --check
  • live server smoke: confirmed the served HTML includes the pre-stylesheet theme resolver and toggle markup, src/theme.js exposes taskforge.theme/system-preference handling, and styles.css serves dark-theme variables plus responsive toggle styling

Notes

  • Playwright package was available only without browser binaries in this environment, so the browser smoke used the local HTTP server plus static served-asset checks and unit coverage for theme resolution/toggle persistence.

@codebounty-dev-bot
Copy link
Copy Markdown

⚠️ Attention Sponsor: This PR was submitted by @newmattock who has not applied for this bounty (#1). Please verify if you want to consider this contribution.

👋 Hey @newmattock: This issue has a bounty on CodeBounty! To be eligible for the reward, please sign up on CodeBounty and apply for this bounty. If you apply, your PR will be automatically associated with your application.

@codebounty-dev-bot codebounty-dev-bot Bot mentioned this pull request May 26, 2026
5 tasks
@codebounty-dev-platform
Copy link
Copy Markdown

📝 Thank you for applying to this bounty! Your PR has been associated with your application. The sponsor will review your application soon.

@newmattock
Copy link
Copy Markdown
Contributor Author

Resolved the merge conflicts from the merged OAuth work and pushed the updated branch. Validation on the rebased branch: npm test (12 passed), npm run lint, and git diff --cached --check. The PR is mergeable again.

@newmattock
Copy link
Copy Markdown
Contributor Author

Following up on the dark theme bounty submission. PR #21 is still mergeable and associated with my CodeBounty application; validation remains npm test, npm run lint, and git diff --check from the rebased branch. Please let me know if you want any adjustments while it is under review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dark theme support

1 participant