Repository navigation
Show themes without a preview image in the theme picker - #18816
ThePrimeagen wants to merge 3 commits into
Conversation
Generate a solid preview from a theme's background colour when it has no preview or backgrounds, so colours-only themes get a picker row. In the shell picker, wait for the behind-open refresh when the held rows do not list the current theme, so the menu-opened picker preselects the current theme instead of the first row.
[Medium impact] No new blocking issue was found. SummaryAdds theme-picker cards for themes without preview media.
No new findings were accepted. Both previous threads were unnumbered, so they have no numbered finding entries. Reviews (4) · Last reviewed commit: "Keep the picker's fast check cheap and n..." · Reviewed by Greptile |
The picker rebuilt its previews only when a theme folder's modification time changed. Editing colors.toml in place leaves the folder alone, so a colours-only theme kept the preview of its old background colour. Count each theme's colors.toml size and modification time in that check too, and test that a colours-only theme gets a preview of its background and that an in-place edit redraws it. Co-authored-by: Cursor <cursoragent@cursor.com>
…view Drop the per-theme colors.toml stat from the fast signature: it runs on every picker open, the hot path omarchy-dev-benchmark-theme-switcher guards, and every stock theme has a colors.toml, all so an in-place colour edit redraws. When magick cannot draw a colours-only preview, leave the theme without a row as before, rather than linking the first stock theme's preview.png under its name. Keep one test case, the one that fails on the base branch: a colours-only theme gets a preview in its background colour. The half asserting the in-place redraw goes with the stat, and the one-use helpers are inlined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Pushed d1612a6 on top of this, so it is ready for the maintainer. What changed, and why:
Proved on a worker built from the Omarchy ISO: the test passes on this head and fails on Codex Medium reviewed the commit and found nothing to change. It agreed that the |
|
Don't want this. A theme is not valid without a preview.png. |
A theme with only a
colors.tomlis listed byomarchy theme listand applied byomarchy theme set, but the theme picker never shows it: typing its name gives "No matches".bin/omarchy-theme-switcheronly adds a picker row for a theme with apreview.*or abackgrounds/image.Screenshots
Reproduce
mkdir -p ~/.config/omarchy/themes/colours-only && cp /usr/share/omarchy/themes/gruvbox/colors.toml ~/.config/omarchy/themes/colours-only/omarchy theme list: it lists Colours Only.omarchy theme set colours-only: the theme applies.omarchy theme switcherand typecolours.More cases
Opened from the menu while Colours Only is the current theme, the picker selects Catppuccin Latte
Related
add_theme_previewguard lists a theme twice when a user override has no preview imagev3