Skip to content

feat(tui)!: surfaces, themes by scheme, shimmer and progress bars - #25

Merged
dgrieser merged 2 commits into
mainfrom
fix/tui-cursor-colors
Nov 27, 2026
Merged

dgrieser merged 2 commits into
mainfrom
fix/tui-cursor-colors

Conversation

@dgrieser

Copy link
Copy Markdown
Collaborator

Summary

  • theme / notice / term: theme.Scheme names color schemes (default, muted, deep, pastel) shared across packages. notice.AllColors becomes notice.Schemes, keyed by those names. Light-background detection moves to term.LightBackground.
  • tui look: panels, dialogs, menus and the help screen use title bars with the title as a badge instead of outlines. Dialogs are filled, buttons and tabs are badges, and notices fill the status bar with their level's color. NewTitleBar adds a bar at the top of the screen.
  • Selection: the cursor row has one consistent background. Text on it keeps its color, in a shade that reads on that background, so cells no longer get reverse video.
  • Themes: tui.Schemes has a dark and a light version of each theme. ThemeOf picks one from the terminal's background, PlainTheme is used when colors are off, and 24-bit colors are reduced to 256 colors where needed.
  • Motion: Shimmer and GradientText use the mittwald gradient. ProgressBar is in the nickpit style. Animated keeps the screen redrawing.
  • Demo: has a --theme flag, a shimmering wordmark, a progress bar while tickets load, and colors taken from the theme.

Breaking changes

  • notice.AllColors is now notice.Schemes.
  • tui.ThemeFrom is removed.
  • Panels draw a title bar unless they are given a border.
  • Buttons draw as badges.

Test plan

  • make check
  • codex-review clean
  • Rendered frames of the demo in the dark and light themes

🤖 Generated with Claude Code

dgrieser and others added 2 commits November 27, 2026 12:12
Add theme.Scheme with the names default, muted, deep and pastel, so one
name from a flag or a configuration file gives a tool one look in every
package with colors of its own.

BREAKING CHANGE: notice.AllColors is now notice.Schemes, keyed by
theme.Scheme.

Move the COLORFGBG light-background detection from notice to
term.LightBackground, so other packages share it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Panels, dialogs, menus and the help draw a title bar with the title as a
badge instead of a rounded border; dialogs and menus are filled. Buttons
are badges, tabs a bar with the active tab as a badge, and a notice fills
the status bar with its level's color and label. NewTitleBar adds a line
at the top of the screen.

The row under the cursor keeps one background: text on it keeps its
color, shaded to read on that background, and rows keep their own
colors. Solid turns a foreground color into a badge background.

Themes come by theme.Scheme, each with a dark and a light version, picked
by ThemeOf from the terminal's background. PlainTheme is used where the
terminal takes no colors, and 24-bit colors become the nearest of the 256
colors where the terminal does not announce 24-bit colors.

Add Shimmer and GradientText for text whose colors flow through the
mittwald gradient, ProgressBar for a bar with its label inside that
glides to its value, PastelColors, and the Animated interface that keeps
the screen redrawing.

BREAKING CHANGE: ThemeFrom is gone; use ThemeOf or Schemes. Panels draw
a title bar unless SetBorder is given a border, and pad one column on
each side by default. Button draws as a badge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dgrieser
dgrieser merged commit 55bfdac into main Nov 27, 2026
14 checks passed
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