Separate font handling in useThemeManager#12759
Merged
mayagbarnes merged 1 commit intodevelopfrom Oct 17, 2025
Merged
Conversation
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
✅ PR preview is ready!
|
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
useThemeManager
2d8dfca to
fac9e6b
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors font handling in the useThemeManager hook by extracting font-related logic into a separate setFonts method. This separation of concerns reduces unnecessary createTheme calls when only font information needs to be processed.
Key Changes
- Extracted font handling logic from
setImportedThemeinto a dedicatedsetFontsmethod - Updated
App.tsxto usesetFontsinstead ofsetImportedThemefor font-only operations - Added comprehensive test coverage for the new
setFontsmethod
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
frontend/app/src/util/useThemeManager.ts |
Extracted font handling logic into separate setFonts method and updated interface |
frontend/app/src/util/useThemeManager.test.ts |
Added comprehensive test suite for new setFonts method and reorganized existing tests |
frontend/app/src/App.tsx |
Updated to call setFonts instead of setImportedTheme for font-only processing |
frontend/app/src/App.test.tsx |
Updated test mocks and assertions to reflect the new setFonts method usage |
fac9e6b to
1da7156
Compare
1da7156 to
d1bd138
Compare
kmcgrady
approved these changes
Oct 16, 2025
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.

Describe your changes
This PR refactors the font handling/setting logic in
useThemeManagerfromsetImportedThemeto separate concerns and reduce unnecessarycreateThemecalls triggered throughApp.tsx's processing of thethemeInputfrom new session message.Testing Plan