4.4 KiB
FAIL
Checked: cargo test -p ely-ui -p ely-platform passes (ely-ui 10 omarchy tests plus startup_panic, ely-platform 12 + 10 + 2 + 1). cargo clippy -p ely-ui -p ely-platform --all-targets is clean. tests/scripts/theme.sh passes on macOS, including the live swap, the empty theme and the return. tests/scripts/references.sh, agents_md.py and comments.py pass. All 22 fixtures are byte-identical to reference/omarchy/themes/*/colors.toml at f45461a. accessibility.rs and env.rs, built alone in a scratch crate, cargo check cleanly for x86_64-unknown-linux-gnu and x86_64-pc-windows-msvc. That backs the cross-compile claim; cargo check -p ely-platform --target … itself cannot run here because ring has no C cross compiler. Contrast figures below are WCAG ratios worked out from the fixture hex values, where danger, warning, success and info equal the raw red, yellow, green and blue.
Round 1:
- Fixed.
palette.rs:28-48lifts against bg, surface, overlay, sunken, hover and active.tests.rs:65checks every listed token on all six for all 22 themes. - Fixed.
colors.rs:11-27,111-133follows Omarchy's alias cascade, thecolorNfixture checks it, and hues that are still missing are logged inwatch.rs:38. - Fixed.
env::flagwarns on any value other than 0 or 1, andtheme.sh:64coversELY_OMARCHY_SYNC=false. - Fixed.
watch.rs:47-51clears the state, re-applies and logs at info.theme.sh:99-100checks this live. - Fixed.
dirs.rs:21-27builds the path from home and ignoresXDG_STATE_HOME.
New defects:
-
crates/ely-ui/src/theme/omarchy/palette.rs:102 (and tests.rs:42) What is wrong:
success,warning,dangerandinfoare the theme's raw hues and are never lifted. The component library draws text in them:overlays::PromptDialog's validation reason (dialogs.rs:299), the required-field star (forms/structure.rs:156), git badges, the merge marker and others. Ely's own palettes keep all four at or above 4.5 on bg (light 4.82–5.33, dark 6.37–9.97). The test's "every text token" list leaves them out. So the TASKS line ("全部正文色在六种表面上达 4.5:1") and agents.md ("每个正文色…都拉到 4.5:1") claim more than the code does. Failing scenario: 11 of the 22 bundled themes put a status hue under 4.5:1 on bg alone. Some examples: nord red 3.05, solitude red 2.78, miasma red 2.30, catppuccin-latte yellow 2.31 and green 2.96, rose-pine yellow 2.05, matte-black yellow 2.90. Under nord, a PromptDialog error reads at 3.05:1 on the plain background and lower on the dialog's surface. Fix direction: lift each status color for text the way the syntax colors are lifted, or keep the hue for fills and add a lifted text variant if the component library allows it. Add the four tokens totext_on_surfaces. If that is not done, narrow the claim in TASKS.md and agents.md. -
crates/ely-ui/src/run.rs:33-37 What is wrong:
ELY_SMOKEtreats every value exceptholdas one-frame smoke and treats an unset or non-UTF-8 value as off. Neither case gives a warning. That is the same silent fallback round 1 flagged forELY_OMARCHY_SYNC. The newholdmode is also missing from agents.md:111, which documents onlyELY_SMOKE=1. Failing scenario:ELY_SMOKE=0 cargo run -p ely-docopens a window, draws one frame and quits, and the log does not say why. Fix direction: match"1","hold"and unset explicitly, warn on anything else (throughenv::value), and documentholdin agents.md. -
crates/ely-platform/src/accessibility.rs:11-13 What is wrong: when the OS gives no answer, it logs "using full motion" before it looks at
ELY_REDUCE_MOTION. The log then contradicts the decision that follows. Failing scenario: on Linux without gsettings, withELY_REDUCE_MOTION=1, the log reads "the OS gives no reduce-motion answer, using full motion" and then "theme: reduced motion on". Fix direction: log the fallback only when both the environment variable and the OS give no answer, or log the source the decision came from. -
crates/ely-platform/src/accessibility.rs:4-6 What is wrong:
pub fn system_reduce_motiononly forwards toos_reduce_motion. Its sole caller isreduce_motionin the same file, so it is a public layer with one user (rule 8). Failing scenario: no behavior breaks. It is an extra public entry point with no caller outside the file. Fix direction: callos_reduce_motionfromreduce_motionand delete the wrapper.