Repository navigation
refactor(ui): Remove GetWidth from Theme interface - #222
Merged
Merged
Conversation
Moved layout measurement responsibility from Theme to StyleProvider for better separation of concerns. - Theme interface now only handles color palette (what colors to use) - StyleProvider handles rendering and layout utilities (how to render/measure) - Updated task_management_view.go to use styleProvider.GetWidth() instead of themeService.GetCurrentTheme().GetWidth() - Removed GetWidth() implementations from all theme types - Updated mock themes in tests - Removed unused lipgloss import from theme_provider.go This refactoring eliminates the architectural inconsistency where a layout utility function was incorrectly placed in the theming layer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
edenreich
commented
Nov 21, 2025
edenreich
commented
Nov 21, 2025
edenreich
commented
Nov 21, 2025
inference-gateway-releaser Bot
pushed a commit
that referenced
this pull request
Nov 21, 2025
## [0.58.0](v0.57.1...v0.58.0) (2025-11-21) ### 🚀 Features * **cli:** Add --version flag support ([#220](#220)) ([21dd893](21dd893)) ### ♻️ Code Refactoring * **ui:** Remove GetWidth from Theme interface ([#222](#222)) ([893e5f8](893e5f8)) * Update config structure and handling ([#221](#221)) ([22d9096](22d9096))
Contributor
|
🎉 This PR is included in version 0.58.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Closed
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
GetWidth()method from theThemeinterface to achieve proper separation of concernsChanges
GetWidth(s string) intfrom Theme interfaceGetWidth()implementations from TokyoNightTheme, GithubLightTheme, and DraculaThemethemeService.GetCurrentTheme().GetWidth()tostyleProvider.GetWidth()Rationale
Previously,
GetWidth()was part of the Theme interface, but it had nothing to do with theming/colors. All three theme implementations delegated identically tolipgloss.Width(). This created an architectural inconsistency:The StyleProvider already had a
GetWidth()method, so this was redundant functionality incorrectly placed in the Theme layer.Test plan
🤖 Generated with Claude Code