Repository navigation
feat: in-house theme system (bundled catalog, live re-apply, hover preview) - #1
Merged
Merged
Conversation
Curated catalog from iTerm2-Color-Schemes (~30 themes), bundle-resolved paths, live re-apply on settings change, file watcher for user overrides, and hover-to-preview in the picker. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Replace Ghostty app/config search paths with: user override (~/.config/forge/themes, first), bundled themes (Bundle.main.resourceURL + SPM fallback). Strip .conf extension before deriving display names. Update default theme to Seti.conf. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Log once when loadTheme(id:) finds no matching file for a non-empty id, so saved configs referencing missing themes are diagnosable. Use Self.searchPaths in loadTheme to match the style already used in loadAllThemes. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Extract applyGhosttyTheme() helper on AppDelegate (with overrideTheme param for Task 7 hover preview), replace inline launch-time block, and subscribe to .forgeConfigChanged so theme/font changes in Settings take effect immediately. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Add docs/THEMES.md with full attribution table for all bundled themes (sourced from mbadolato/iTerm2-Color-Schemes), trademark notes, and a reporting-issues link. Add a secondary "Theme Acknowledgments" link button to the About pane that opens the doc on GitHub. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ThemeWatcher uses DispatchSource/O_EVTONLY to watch the user themes directory and posts .forgeThemesChanged; ThemeSettingsPane reloads on that notification so dropped theme files appear without reopening Settings. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Post forgeThemeHoverPreview / forgeThemeHoverEnded notifications from ThemePreviewCard; AppDelegate observers call applyGhosttyTheme with the hovered theme or revert to configured theme. Pane disappear cleans up. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
make test — swift test make restart — kill running Forge then make dev make logs — tail -f /tmp/forge.log Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Forge now owns its theme catalog end-to-end. No more dependency on a Ghostty install, the theme picker actually repaints terminals when you change it, and you can preview themes by hovering.
mbadolato/iTerm2-Color-Schemesat a pinned commit. Imported viascripts/import-themes.sh(re-runnable, SHA-verified, attribution headers prepended).Resources/themes/*.confbundled into the .app via the Makefile.ThemeParsersearches~/.config/forge/themes/(user override, first) → bundled themes → SPM fallback. Ghostty paths dropped entirely.applyGhosttyTheme(overrideTheme:)helper inAppDelegate;.forgeConfigChangedobserver calls it so picking a theme repaints existing panes immediately (was a known bug —applyConfigwas only called once at launch).ThemeWatcher(DispatchSource.makeFileSystemObjectSource) watches~/.config/forge/themes/; dropping a.confthere shows up in the picker without restart.ThemePreviewCard.onHoverposts a transient theme, observers inAppDelegateapply it to libghostty without touchingForgeConfigStore. Mouse-out and pane disappear revert.docs/THEMES.mdcredits the upstream catalog and per-theme authors; About pane gets a "Theme Acknowledgments" link.Plan:
docs/superpowers/plans/2026-05-18-in-house-theme-system.md.Breaking change
Existing users whose saved config references
"ghostty-seti"(the previous default) will land on the no-theme fallback colors until they reselect a theme. This is documented as accepted UX in the plan.loadThemenow logs the unresolved id so the situation is diagnosable.Test plan
swift testpasses (142 tests, 14 suites). The rest requiresmake dev+ manual interaction:mkdir -p ~/.config/forge/themes && cp Resources/themes/Dracula.conf ~/.config/forge/themes/MyTheme.conf— appears in picker without restartgrep -r "ghostty/themes" Sources/returns no hits (Ghostty path references are gone)🤖 Generated with Claude Code