Skip to content

feat(ui): add light and dark mode with theme toggle#27

Closed
gcko wants to merge 10 commits intomasterfrom
feature/light-and-dark-mode
Closed

feat(ui): add light and dark mode with theme toggle#27
gcko wants to merge 10 commits intomasterfrom
feature/light-and-dark-mode

Conversation

@gcko
Copy link
Owner

@gcko gcko commented Feb 7, 2026

PR checklist

  • Ensure you have added or ran the appropriate tests for your PR.
  • DCO signed

What type of PR is this?

Feature

What this PR does / why we need it:

Adds light and dark mode support to the Write Wall extension:

  • Defaults to the system preference (prefers-color-scheme) with a CSS-only fallback to prevent FOUC
  • Provides a toggle button in the top-right info bar to manually switch themes
  • Persists the user's theme choice across sessions via chrome.storage.local (per-device, not synced)
  • Uses a warm sepia/paper palette for light mode to reduce eye strain
  • Toggle button has a fixed width to prevent layout shift when switching modes
  • Bumps version to 2.6.0

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

  • Light palette uses warm tones (#f0ebe3, #e6e0d6) instead of cool grays for easier reading
  • Theme stored under theme key in chrome.storage.local (alongside existing cursor key)
  • 10 new test cases added (50 total in main.spec.ts), 100% statement coverage maintained
  • color-scheme: light dark added to #count-mode select for native widget rendering

Does this PR introduce a user-facing change?:

Yes. Users can now toggle between light and dark mode via a button in the top-right corner. The extension respects the system color scheme preference by default.

gcko and others added 9 commits February 7, 2026 13:51
Add @vitest/coverage-v8 with 90% thresholds on statements, branches,
functions, and lines. Coverage enforcement runs in both pre-commit hooks
and CI, with coverage-final.json uploaded as a GitHub Actions artifact.

Added 21 new tests (34 -> 55) to achieve 100% coverage across all
metrics for main.ts, service_worker.ts, and utils.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@variable.team>
Add a coverage-report workflow that triggers after CI completes on PRs.
It downloads coverage artifacts from both the PR and master branches,
compares them, and posts a markdown summary as a PR comment showing
overall coverage delta and per-file coverage for changed files.

Changes:
- ci.yml: trigger on push to master, upload coverage-main artifact
- coverage-report.yml: new workflow_run-triggered reporter
- scripts/coverage-report.cjs: coverage comparison and report generation
- src/coverage-report.spec.ts: 29 tests for the report script

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@variable.team>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@variable.team>
- Checkout default branch instead of PR head to prevent untrusted code
  execution in a privileged workflow_run context
- Move attacker-controllable values (head_branch, head_owner) to env
  variables to prevent shell injection via crafted branch names
- Replace tj-actions/changed-files with gh pr diff API call to avoid
  needing PR code checkout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@variable.team>
Move steps.pr.outputs.number and steps.changed.outputs.files from
direct ${{ }} interpolation in run: blocks to env: variables,
preventing potential shell injection via attacker-controlled values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@variable.team>
Add code coverage tracking and enforce 90% minimum
Signed-off-by: Jared Scott <jared.scott@variable.team>

# Conflicts:
#	pnpm-lock.yaml
Add system-preference-aware theming with a manual toggle button that
persists the user choice to chrome.storage.local. Uses a warm
sepia/paper palette for light mode to reduce eye strain.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jared Scott <jared.scott@variable.team>
@github-actions
Copy link

github-actions bot commented Feb 7, 2026

Coverage Report

Summary

Metric Coverage Change
Overall 100.0% NEW
Changed Files
File Coverage Change
src/main.ts 100.0% NEW

@gcko gcko closed this Feb 7, 2026
@gcko gcko deleted the feature/light-and-dark-mode branch February 7, 2026 07:36
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