Skip to content

refactor: move THEMES constant from utils to ui package#92

Merged
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_themes_constant_from_utils_to_ui_package
Feb 19, 2026
Merged

refactor: move THEMES constant from utils to ui package#92
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_themes_constant_from_utils_to_ui_package

Conversation

@adelrodriguez
Copy link
Collaborator

@adelrodriguez adelrodriguez commented Feb 19, 2026

Greptile Summary

Moved theme-related constants (THEMES, Theme type, and THEME_STORAGE_KEY) from the @init/utils package to the @init/ui package, updating all imports across the codebase. This refactoring improves package organization by placing UI-specific constants with their related UI components.

Changes:

  • Created new packages/ui/src/constants.ts file with theme constants
  • Added ./constants export to @init/ui package.json
  • Removed theme constants from packages/utils/src/constants/app.ts
  • Updated 4 import statements across app and desktop apps to reference the new location

All imports have been correctly updated and no orphaned references remain.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Clean refactoring that moves constants to a more appropriate package location. All imports have been systematically updated, the package export configuration is correct, and no logical changes were made to the code. The change improves code organization without affecting functionality.
  • No files require special attention

Important Files Changed

Filename Overview
packages/ui/src/constants.ts Created new constants file exporting THEMES, Theme type, and THEME_STORAGE_KEY - clean implementation
packages/ui/package.json Added ./constants export mapping to expose the new constants file
packages/utils/src/constants/app.ts Removed THEMES, Theme type, and THEME_STORAGE_KEY as they moved to ui package

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["@init/utils/constants"] -->|"Before: exports THEMES,<br/>Theme, THEME_STORAGE_KEY"| B["apps/app<br/>(theme validation & functions)"]
    A -->|Before| C["apps/desktop<br/>(main.tsx)"]
    A -->|Before| D["packages/ui<br/>(theme.tsx)"]
    
    E["@init/ui/constants"] -->|"After: exports THEMES,<br/>Theme, THEME_STORAGE_KEY"| B
    E -->|After| C
    E -->|After| D
    
    F["@init/utils/constants"] -->|"Still exports APP_NAME,<br/>APP_ID, I18N_COOKIE_NAME"| G["Other packages<br/>(backend, api, mobile, etc.)"]
    
    style E fill:#90EE90
    style F fill:#87CEEB
Loading

Last reviewed commit: 497317e

@adelrodriguez adelrodriguez marked this pull request as ready for review February 19, 2026 03:03
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 02-18-refactor_move_themes_constant_from_utils_to_ui_package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Collaborator Author

adelrodriguez commented Feb 19, 2026

@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package branch from 88a6cc0 to 4c513e7 Compare February 19, 2026 03:10
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_themes_constant_from_utils_to_ui_package branch from 2a87461 to c89fe43 Compare February 19, 2026 03:10
@adelrodriguez adelrodriguez changed the base branch from 02-18-refactor_move_environment_prefix_constants_from_utils_to_env_package to graphite-base/92 February 19, 2026 03:24
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_themes_constant_from_utils_to_ui_package branch from c89fe43 to 5f50c73 Compare February 19, 2026 03:24
@graphite-app graphite-app bot changed the base branch from graphite-base/92 to main February 19, 2026 03:24
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_themes_constant_from_utils_to_ui_package branch 2 times, most recently from 0d0edeb to 497317e Compare February 19, 2026 03:29
@adelrodriguez adelrodriguez merged commit ad90be1 into main Feb 19, 2026
8 checks passed
@adelrodriguez adelrodriguez deleted the 02-18-refactor_move_themes_constant_from_utils_to_ui_package branch February 19, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments