Skip to content

fix(tui): support single categorical theme hue - #41570

Open
opencode-agent[bot] wants to merge 1 commit into
v2from
theme-crash
Open

fix(tui): support single categorical theme hue#41570
opencode-agent[bot] wants to merge 1 commit into
v2from
theme-crash

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • prevent syntax generation from crashing when a theme defines one categorical hue
  • reuse the sole hue for the skill extmark when no second hue is available
  • cover the valid single-hue theme with a regression test

Context

This surfaced when Alan switched to a custom theme he had made. The custom theme was valid: the theme schema accepts one or more categorical hues. The TUI syntax generator incorrectly assumed every theme supplied at least two and crashed while reading the missing second hue. Because the selected theme is persisted in the client config, restarting or stopping the background service did not recover the TUI.

Closes #41569

Testing

  • bun test test/theme/v2/syntax.test.ts
  • bun test test/theme/v2 test/theme.test.ts
  • bun run typecheck in packages/theme
  • bun run typecheck in packages/tui

Requested by: @kitlangton (Kit via Slack)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant