Skip to content

feat(tui): support single-mode themes#37930

Merged
jlongster merged 1 commit into
v2from
optional-theme-modes
Jul 20, 2026
Merged

feat(tui): support single-mode themes#37930
jlongster merged 1 commit into
v2from
optional-theme-modes

Conversation

@jlongster

Copy link
Copy Markdown
Contributor

Summary

  • allow V2 theme files to define only light or only dark mode while requiring at least one
  • lazily detect single-mode V1 themes from opaque background/text contrast during migration
  • preserve requested terminal/config mode while rendering the effective supported mode
  • disable app and DevTools mode switching when the opposite mode is unavailable

Behavior

  • transparent V1 backgrounds remain dual-mode because terminal contrast cannot be inferred safely
  • switching away from a one-mode theme restores the retained requested mode when the next theme supports it
  • the V1 registry remains unchanged; mode availability is derived lazily from migrateV1()

Verification

  • bun test test/theme/v2 test/cli/tui/theme-mode.test.tsx --timeout 30000 (32 passed)
  • bun typecheck
  • git diff --check origin/v2...HEAD

@jlongster
jlongster merged commit 7be95bc into v2 Jul 20, 2026
8 of 9 checks passed
@jlongster
jlongster deleted the optional-theme-modes branch July 20, 2026 13:37
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Jul 20, 2026
* upstream/v2: (43 commits)
  feat(codemode): expand standard library parity (anomalyco#37943)
  feat(tui): implement session timeline
  feat(tui): support single-mode themes (anomalyco#37930)
  fix(tui): show opencode2 continuation command (anomalyco#37933)
  fix(tui): soften theme scale extremes (anomalyco#37555)
  fix(tui/mini): idle footer when session idles (anomalyco#37910)
  tui/mini: consolidate stream and panel internals (anomalyco#37903)
  refactor(tui): extract shared frontend helpers (anomalyco#37868)
  fix(codemode): parse canonical index keys (anomalyco#37851)
  fix(ai): preserve compatible reasoning details (anomalyco#37708)
  fix(ai): expand context overflow patterns (anomalyco#37848)
  fix(ai): buffer partial tool call identity (anomalyco#37847)
  fix(codemode): align string, array, and Date behavior (anomalyco#37775)
  fix(cli): accept updated service on restart
  feat(simulation): control arbitrary tool lifecycles (anomalyco#37816)
  mini: add reconnect, forms, and shared targets (anomalyco#37811)
  fix(simulation): validate semantic click identity (anomalyco#37808)
  feat(simulation): expose semantic UI snapshots (anomalyco#37802)
  fix(tui): move agent cycling to shift-tab (anomalyco#37706)
  fix(tui): load root sessions in switcher (anomalyco#37784)
  ...
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