Skip to content

feat: per-theme descriptions + accent colour in /theme completion#34

Merged
subzeroid merged 1 commit into
mainfrom
feat/theme-completion-color-descriptions
May 27, 2026
Merged

feat: per-theme descriptions + accent colour in /theme completion#34
subzeroid merged 1 commit into
mainfrom
feat/theme-completion-color-descriptions

Conversation

@subzeroid
Copy link
Copy Markdown
Owner

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 the name arg, reused for every choice. Users also expected the banner to live-preview while arrowing the dropdown.

What changed

  • Per-theme descriptions. New theme_description(name) in ui/theme.py; the completion dropdown now shows each theme's own line:
    aiograpi   | instagrapi violet → blue (default)
    amber      | 80s amber CRT phosphor
    claude     | Claude Code burnt orange
    cyberpunk  | neon cyan → magenta → green
    hacker     | matrix phosphor green on black
    instagram  | Instagram brand gradient
    
  • Accent colour. Each theme name in the popup renders in its own accent colour (_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 /theme picker (/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_description exists for every theme, all distinct; hacker mentions "green".
  • /theme arg completions carry per-theme meta (different across themes).
  • Full gate green: ruff / format / mypy / pytest --cov=insto --cov-fail-under=80899 passed, coverage 81.89%.

🤖 Generated with Claude Code

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>
@subzeroid subzeroid merged commit 9335457 into main May 27, 2026
3 checks passed
@subzeroid subzeroid deleted the feat/theme-completion-color-descriptions branch May 27, 2026 23:24
This was referenced May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant