Skip to content

feat(frontend): v1.13.0 "Vantage" - HighContrast/Colorblind themes#96

Merged
doublegate merged 2 commits into
mainfrom
feat/v1.13.0-vantage
Jul 12, 2026
Merged

feat(frontend): v1.13.0 "Vantage" - HighContrast/Colorblind themes#96
doublegate merged 2 commits into
mainfrom
feat/v1.13.0-vantage

Conversation

@doublegate

Copy link
Copy Markdown
Owner

Summary

  • Adds AppTheme::HighContrast (near-black/near-white theme pushing every foreground/background pair past WCAG 2.1 AA, most past AAA) and AppTheme::Colorblind (interactive accents drawn from the Okabe-Ito palette, mutually distinguishable under the most common red-green color-vision deficiencies). Both additive after the original Light/Dark/System trio; both regression-tested against the stock dark theme so a builder that forgot to override a Visuals field can't silently ship an indistinguishable theme.
  • Investigated the other two originally-planned v1.13.0 items and honestly re-scoped both rather than forcing code that doesn't fit the actual gap:
    • Save-state "versioned migration": the plan's premise was stale. System::load_state was always designed to fail loudly on an older-format blob (never to migrate one), by deliberate choice recorded since the FORMAT_VERSION 2/3 bumps — and a regression fixture proving exactly that behavior has existed since v0.7.0 (save_state_backward_compat.rs). Closed as verified-non-issue; no code change needed. Documented in docs/frontend.md's "Save-states, rewind, run-ahead" section.
    • Keyboard-only-navigation audit: found to be a manual-walkthrough task, not a discrete code fix — egui's own default Tab order is used everywhere (nothing custom, nothing known-broken, but nothing walked/confirmed either). Documented as an explicit open item in docs/frontend.md's Theme section rather than converted into a hollow "audit passed" claim.

Test plan

  • cargo fmt --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo clippy -p rustysnes-frontend --all-targets --features full -- -D warnings
  • cargo clippy -p rustysnes-frontend --all-targets --features emu-thread,hd-pack -- -D warnings
  • cargo test --workspace (all green, including 3 new theme tests)
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps
  • markdownlint-cli2 on both touched docs — +2 findings vs. baseline, both MD024 (duplicate-heading) from reusing the CHANGELOG's own established ### Added/### Deferred section pattern, not new problems

🤖 Generated with Claude Code

Adds AppTheme::HighContrast (WCAG AA/AAA dark theme) and
AppTheme::Colorblind (Okabe-Ito accent palette), both additive after
the original Light/Dark/System trio. Regression-tested against the
stock dark theme so a builder that forgot to override a Visuals field
can't silently ship an indistinguishable theme.

Also investigates the two other originally-planned v1.13.0 items and
honestly re-scopes both rather than forcing code that doesn't fit:
- Save-state "versioned migration": found the plan's premise was
  stale. System::load_state was always designed to fail loudly on an
  older-format blob (never to migrate one), and a regression fixture
  proving exactly that has existed since v0.7.0. Closed as
  verified-non-issue, documented in docs/frontend.md.
- Keyboard-only-navigation audit: found to be a manual-walkthrough
  task, not a discrete code fix (egui's default Tab order is used
  everywhere, untested but not known-broken). Documented as an open
  item rather than converted into a hollow "audit passed" claim.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 12, 2026 13:33

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces two new accessibility-oriented theme variants to the desktop UI shell: AppTheme::HighContrast (a high-contrast dark theme meeting WCAG 2.1 AA/AAA standards) and AppTheme::Colorblind (using the Okabe-Ito palette for interactive accents). It also adds corresponding regression tests, updates the documentation, and documents the deferral of a keyboard-only navigation audit. The reviewer suggests setting v.widgets.active.weak_bg_fill in the colorblind theme to ensure visual consistency for all active interactive elements.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread crates/rustysnes-frontend/src/ui_shell.rs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the rustysnes-frontend egui shell with two new accessibility-focused themes (HighContrast and Colorblind) and documents the corresponding release notes and re-scoped v1.13.0 planning items.

Changes:

  • Adds AppTheme::HighContrast and AppTheme::Colorblind to frontend config, including UI labels and serialization names.
  • Implements new egui Visuals builders for both themes and wires them into ui_shell::apply_theme.
  • Adds regression tests ensuring the new themes diverge from stock dark visuals and that apply_theme handles all variants; updates docs/frontend.md and CHANGELOG.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
docs/frontend.md Updates theme documentation and clarifies save-state/version-plan findings (but currently contains broken inline-code formatting that should be fixed).
crates/rustysnes-frontend/src/ui_shell.rs Adds the two theme Visuals builders, dispatches them in apply_theme, and adds regression tests.
crates/rustysnes-frontend/src/config.rs Adds the new AppTheme variants, display names, and expands the all() list (with an API-stability concern for the fixed-size-array return type).
CHANGELOG.md Adds Unreleased entries describing the new themes and the re-scoped/deferred items.

Comment thread docs/frontend.md Outdated
Comment thread docs/frontend.md Outdated
Comment thread docs/frontend.md Outdated
Comment thread crates/rustysnes-frontend/src/config.rs Outdated
Comment thread crates/rustysnes-frontend/src/config.rs
Addresses gemini/copilot findings on PR #96:
- colorblind_visuals() now also sets widgets.active.weak_bg_fill --
  egui reads that (not bg_fill) for many active states (tabs, selected
  menu items), so it was silently exempt from the colorblind-safe
  palette.
- Three docs/frontend.md inline-code spans that were split across a
  line wrap, breaking the rendered Markdown.
- AppTheme's doc comment corrected: variant APPEND ORDER doesn't
  preserve config.toml compatibility, the serde string rename does
  (order was never load-bearing here).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@doublegate doublegate merged commit 3607fec into main Jul 12, 2026
12 checks passed
@doublegate doublegate deleted the feat/v1.13.0-vantage branch July 12, 2026 13:43
@doublegate doublegate mentioned this pull request Jul 12, 2026
5 tasks
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.

2 participants