Repository navigation
Treat empty theme colours as absent when resolving template colours - #19446
ThePrimeagen wants to merge 3 commits into
Conversation
alias_theme_color now only creates an alias when the fallback actually holds a value, so a sparse palette no longer fabricates empty accent/blue keys. resolve_theme_ref and resolve_gradient_color now test for a non-empty value rather than key presence, so an explicitly empty accent falls back to blue (or to the fallback name, as missing keys already did) and an empty gradient colour no longer expands to a bad array subscript, letting gradient_start templates like slack.json render.
[Medium impact] The PR appears safe to merge. SummaryThe PR prevents empty theme colors from stopping template rendering and lets gradient helpers use their fallbacks.
The latest changes strengthen the sparse-palette test. The earlier request for regression coverage is addressed. No new issues found. Reviews (3) · Last reviewed commit: "Update sparse palette test to not requir..." · Reviewed by Greptile |
|
GPT-6 High in Codex read the palette resolver, template renderer, their callers, and the existing template tests at No worker tests ran and no changes were pushed. Verification, including the missing regression coverage Greptile identified, is waiting for the classification check to complete. No classification or verification labels were added. |
|
GPT-6 in Codex (effort not exposed) read the new regression coverage at The classification check again received no usable answer from |
|
GPT-6 in Codex (effort not exposed) read the updated regression test at The classification check again received no usable answer from |
|
GPT-6 in Codex (effort not exposed), Opus 5.5 High and muse-wonder via pi (thinking High) compared this revision, Thanks, @ThePrimeagen. Closing this as a duplicate of #19445, where verification can continue. It can be reopened if anything specific to this change is missing there. |
Switching to a sparse theme with only
backgroundandforegroundin itscolors.tomlaborts the switch inomarchy-theme-set-templateswithline 61: THEME_COLORS: bad array subscript, and its templates, includingslack.json, are not rendered.Screenshots
Reproduce
mkdir -p ~/.config/omarchy/themes/sparse && printf 'background="#000000"\nforeground="#ffffff"\n' > ~/.config/omarchy/themes/sparse/colors.tomland press Enter.omarchy theme set sparseand press Enter.omarchy-theme-set-templates: line 61: THEME_COLORS: bad array subscriptand the templates are not rendered.