feat: per-theme descriptions + accent colour in /theme completion#34
Merged
Merged
Conversation
The `/theme <name>` completion dropdown showed the same generic argparse-help line as the meta for every theme. Give each theme its own one-line description (theme_description in ui/theme.py) and render the theme name in its own accent colour in the popup, so the list hints at each theme before you commit. The picker footer shows the description too. Full live banner preview stays in the bare-`/theme` picker — completion menus are passive (no on-highlight hook), so a colour + description hint is the most the dropdown can offer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug reported
In the
/theme <name>completion dropdown, every theme showed the same meta line ("theme to switch to; omit to show the active theme + list") — it was the argparse help for thenamearg, reused for every choice. Users also expected the banner to live-preview while arrowing the dropdown.What changed
theme_description(name)inui/theme.py; the completion dropdown now shows each theme's own line:_theme_label) — a colour hint before you commit. The picker footer shows the description too.On live preview
Completion menus in prompt_toolkit are passive — there's no "on-highlighted" callback, so the banner can't repaint as you arrow the dropdown. Full live banner preview lives in the bare
/themepicker (/theme+ Enter → full-screen, ↑/↓ repaints the banner). The dropdown's colour + description is the most a passive menu can offer. (User chose "both": picker for preview + colour/descriptions in the dropdown.)Tests
theme_descriptionexists for every theme, all distinct; hacker mentions "green"./themearg completions carry per-theme meta (different across themes).pytest --cov=insto --cov-fail-under=80→ 899 passed, coverage 81.89%.🤖 Generated with Claude Code