Repository navigation
Use the fallback colour when a theme colour is empty - #19445
ThePrimeagen wants to merge 4 commits into
Conversation
Treat present-but-empty theme colors as unresolved instead of resolving them. resolve_theme_ref now checks for a non-empty value before using a key or its fallback, resolve_gradient_color returns early on an empty value so it never evaluates an empty array subscript, and alias_theme_color only assigns when the fallback color is non-empty so sparse themes no longer gain empty aliases such as accent, red or blue.
[High impact] The PR appears safe to merge. SummaryEmpty theme colors now use the fallback instead of stopping at an empty value.
No new actionable issues found. The earlier request for empty-color test coverage is addressed. Reviews (4) · Last reviewed commit: "Merge origin/quattro and resolve conflic..." · Reviewed by Greptile |
This comment has been minimized.
This comment has been minimized.
|
Codex High read both changed commands, their callers, the existing template tests, and Greptile's comments at c198078. My classification is bug, but the configured second classifier, deepseek-v4p1-flash, returned no classification, so classification remains unsettled. No worker tests or full second-opinion review ran, and no changes were pushed. Greptile's request for an empty-value regression test remains unaddressed. This is waiting for the maintainer to resolve classification before verification continues. |
|
Codex High read revision My classification remains bug, but the configured second classifier, deepseek-v4p1-flash, again returned no classification. Classification remains unsettled, so worker verification and a full second-opinion review have not proceeded. No changes were pushed or labels added. This is waiting for the maintainer to resolve classification before verification continues. |
|
Codex High read revision My classification remains bug, but the configured second classifier, deepseek-v4p1-flash, returned no classification for this head. The queue workflow requires classification to settle before verification, so no worker tests or full second-opinion review ran, and no changes were pushed or labels added. This is waiting for the maintainer to resolve classification. |
|
Codex High reproduced the sparse-palette error on The CLI suite and the template, user-theme, tmux, Slack, Herdr, VS Code and theme-switch-budget tests passed on a disposable ISO worker. Slack's test needed Node.js installed on that worker. No changes were pushed. Greptile's requested empty-value coverage is present in the contributor's tests and passed. Codex High found no actionable defect. The configured Opus 5.5 High second-opinion run ended without a report; a later health check answered but did not review this PR. Verification evidence is recorded, while the review remains incomplete and is waiting on the maintainer. The The captures show the worker terminal's recorded command and template results; they do not establish how sparse themes look inside applications. |
|
A follow-up on one part of this change that the earlier review did not look at: the
#19467 makes the same change to Reviewed by Claude Fable 5.2, which ran the renders and the reverted-hunk test. Opus 5.5 High and muse-wonder (thinking high) read both diffs as a second opinion and each called the hunk a defect; the tmux consequence is Opus's finding, and I checked the pattern it names in Nothing was pushed. Which of the two lands is the maintainer's choice. |
|
Codex High re-read Opus 5.5 High favors #19467 because it fixes empty-value fallback handling without this alias change. muse-wonder via pi, thinking high, acknowledged the placeholder consequence but gave differing recommendations, treating alias omission as an improvement in its three-way comparison. I retain the regression finding after checking the cited code paths; reviewer independence is not guaranteed. #19474 carries the same alias change and adds fallback-chain behavior. No worker tests ran for this head: this comparison stops before verification because I favor the competing #19467. Its own worker verification is still required. Nothing was pushed, and this PR remains open, without |
The existing empty-colour fixture always resolves through a non-empty blue or a literal fallback. Carry the sparse fallback scenario from omacom#19445 into the focused regression: a missing primary colour and an empty accent alias retain the fallback name without a subscript diagnostic. Reverting only the fallback non-empty check makes this assertion fail; the existing assertions still pass. This preserves the documented single-fallback grammar without claiming a sparse palette produces usable application colours. Co-Authored-By: ThePrimeagen <the.primeagen@gmail.com> Co-Authored-By: muse-wonder via pi, thinking high <noreply@openai.com> Co-Authored-By: GPT-6 (reasoning effort not exposed) <noreply@openai.com>


Switching to a theme whose
colors.tomlhas onlybackgroundandforegroundmakes the switch fail:omarchy-theme-set-templatesprintsTHEME_COLORS: bad array subscriptand templates, including Slack's, do not render.Screenshots
Reproduce
mkdir -p ~/.config/omarchy/themes/sparse-test && printf 'background = "#111111"\nforeground = "#eeeeee"\n' > ~/.config/omarchy/themes/sparse-test/colors.tomlomarchy theme set sparse-testomarchy-theme-set-templates: line 61: THEME_COLORS: bad array subscriptand the switch does not complete.More cases
User template using
gradient_starton missing colours