Skip to content

Treat empty theme colours as absent when resolving template colours - #19446

Closed
ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/72bf502a-8b19-4b86-bd03-04653ce06fae
Closed

ThePrimeagen wants to merge 3 commits into
omacom:quattrofrom
ThePrimeagen:fix/72bf502a-8b19-4b86-bd03-04653ce06fae

Conversation

@ThePrimeagen

Copy link
Copy Markdown
Contributor

Switching to a sparse theme with only background and foreground in its colors.toml aborts the switch in omarchy-theme-set-templates with line 61: THEME_COLORS: bad array subscript, and its templates, including slack.json, are not rendered.

Screenshots

Before After
before after

Reproduce

  1. Press Super+Enter to open a terminal.
  2. Run mkdir -p ~/.config/omarchy/themes/sparse && printf 'background="#000000"\nforeground="#ffffff"\n' > ~/.config/omarchy/themes/sparse/colors.toml and press Enter.
  3. Run omarchy theme set sparse and press Enter.
  4. You see omarchy-theme-set-templates: line 61: THEME_COLORS: bad array subscript and the templates are not rendered.

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.
@greptile-apps

greptile-apps Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

The PR prevents empty theme colors from stopping template rendering and lets gradient helpers use their fallbacks.

  • Theme templates use fallbacks when palette colors are empty.

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

Comment thread bin/omarchy-theme-set-templates Resolved
@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 High in Codex read the palette resolver, template renderer, their callers, and the existing template tests at 19e9dd050172391a970f42dc79208fdc6cbae564. This appears to be a bug fix for sparse palettes, but the classification check received no usable answer from its second model, deepseek-v4p1-flash, so classification remains unsettled.

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.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed) read the new regression coverage at 2e5dd07003cd760245d2df1726486ab07e4f8ca3, along with the resolver changes and review comments. The added cases check sparse palettes finishing template rendering and explicitly empty gradient colors using their fallbacks; they have not been run on a worker by this review.

The classification check again received no usable answer from deepseek-v4p1-flash, so classification remains unsettled and verification stops at that gate. No changes were pushed and no labels were added. This is waiting on the maintainer to resolve the classification check; the author has supplied the regression coverage requested earlier.

@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed) read the updated regression test at 80504b5c7fdab59c3e0454f4b59782e6d813e730, the resolver changes and review comments. The sparse-palette test now checks every built-in template without requiring the removed slack.json, and includes a custom gradient template to exercise the missing-key fallback.

The classification check again received no usable answer from deepseek-v4p1-flash, leaving classification unsettled. No worker tests or second code review ran, no changes were pushed, and no labels were added. Verification is waiting on the classification check; this run reviewed the code by reading only.

@omarchybot omarchybot added the bug Something isn't working label Nov 20, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

GPT-6 in Codex (effort not exposed), Opus 5.5 High and muse-wonder via pi (thinking High) compared this revision, 80504b5c7fdab59c3e0454f4b59782e6d813e730, with the earlier #19445. Both make the same sparse-palette alias and empty-gradient fallback correction and cover the same regression cases. The reviewers agreed that keeping #19445 loses no supported case; their independence is not guaranteed. No worker tests ran during this duplicate comparison.

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.

@omarchybot omarchybot added the duplicate This issue or pull request already exists label Nov 20, 2026
@omarchybot omarchybot closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants