[PR #264] [MERGED] feat(tui): theme switcher with preview #9566

Closed
opened 2026-02-16 18:13:46 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/264
Author: @xHeaven
Created: 6/20/2025
Status: Merged
Merged: 6/20/2025
Merged by: @adamdotdevin

Base: devHead: theme-switcher


📝 Commits (2)

  • bb5c969 refactor(tui): always call modal.Close() before setting it to nil
  • 4be8ffe feat(tui): preview theme via arrows, save via Enter, discard via Esc

📊 Changes

2 files changed (+27 additions, -10 deletions)

View changed files

📝 packages/tui/internal/components/dialog/theme.go (+20 -8)
📝 packages/tui/internal/tui/tui.go (+7 -2)

📄 Description

Previously, to see a theme in action, you had to do this:

  1. /themes
  2. Select a new theme
  3. Save with Enter
  4. Decide whether you like it or not
  5. If you like it, profit, if you don't, go back to step 1

After this PR, the new behavior is this:

  1. /themes
  2. Preview the available themes via the up and down arrow keys
  3. Press Enter if you like a theme to save it or Esc to discard the selection and close the modal

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/264 **Author:** [@xHeaven](https://github.com/xHeaven) **Created:** 6/20/2025 **Status:** ✅ Merged **Merged:** 6/20/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `theme-switcher` --- ### 📝 Commits (2) - [`bb5c969`](https://github.com/anomalyco/opencode/commit/bb5c969731a7393c19ae45051590c8ccdb1567cc) refactor(tui): always call modal.Close() before setting it to nil - [`4be8ffe`](https://github.com/anomalyco/opencode/commit/4be8ffeb029d348653ae9c7207deaf720318c6a1) feat(tui): preview theme via arrows, save via Enter, discard via Esc ### 📊 Changes **2 files changed** (+27 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/dialog/theme.go` (+20 -8) 📝 `packages/tui/internal/tui/tui.go` (+7 -2) </details> ### 📄 Description Previously, to see a theme in action, you had to do this: 1. `/themes` 2. Select a new theme 3. Save with `Enter` 4. Decide whether you like it or not 5. If you like it, profit, if you don't, go back to step 1 After this PR, the new behavior is this: 1. `/themes` 2. Preview the available themes via the up and down arrow keys 3. Press `Enter` if you like a theme to save it or `Esc` to discard the selection and close the modal --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:46 -05:00
yindo closed this issue 2026-02-16 18:13:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9566