Skip to content

refactor: move MOBILE_BREAKPOINT from utils to ui package#93

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

refactor: move MOBILE_BREAKPOINT from utils to ui package#93
adelrodriguez merged 1 commit intomainfrom
02-18-refactor_move_mobile_breakpoint_from_utils_to_ui_package

Conversation

@adelrodriguez
Copy link
Collaborator

@adelrodriguez adelrodriguez commented Feb 19, 2026

Greptile Summary

Moved MOBILE_BREAKPOINT constant from @init/utils to @init/ui package for better separation of concerns.

  • Relocated UI-specific breakpoint constant to the UI package where it is consumed
  • Updated import in use-mobile.ts hook to reference new location
  • Removed breakpoint.ts file from utils package
  • Cleaned up exports in utils constants index

This refactor improves package boundaries by keeping UI-related constants with UI code. The migration is complete with no remaining references to the old location.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • Clean refactoring with complete migration - all references updated, no breaking changes, and improved package organization
  • No files require special attention

Important Files Changed

Filename Overview
packages/ui/src/constants.ts Added MOBILE_BREAKPOINT constant (768) to UI package constants
packages/ui/src/hooks/use-mobile.ts Updated import to reference MOBILE_BREAKPOINT from @init/ui/constants instead of @init/utils/constants
packages/utils/src/constants/breakpoint.ts Deleted file as MOBILE_BREAKPOINT has been moved to UI package
packages/utils/src/constants/index.ts Removed re-export of breakpoint.ts module

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    subgraph Before["Before (utils package)"]
        A["`**@init/utils**
        constants/breakpoint.ts
        MOBILE_BREAKPOINT = 768`"]
    end
    
    subgraph After["After (ui package)"]
        B["`**@init/ui**
        constants.ts
        MOBILE_BREAKPOINT = 768`"]
    end
    
    C["`**use-mobile.ts**
    (UI hook consumer)`"]
    
    A -.->|"old import"| C
    B -->|"new import"| C
    
    style A fill:#fee,stroke:#f66
    style B fill:#efe,stroke:#6f6
    style C fill:#eef,stroke:#66f
Loading

Last reviewed commit: acb844a

@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_mobile_breakpoint_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_mobile_breakpoint_from_utils_to_ui_package branch from 8a253ef to 058dcb0 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 force-pushed the 02-18-refactor_move_themes_constant_from_utils_to_ui_package branch 2 times, most recently from 5f50c73 to 0d0edeb Compare February 19, 2026 03:24
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_mobile_breakpoint_from_utils_to_ui_package branch 2 times, most recently from 8973883 to bf8d6d6 Compare February 19, 2026 03:29
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_themes_constant_from_utils_to_ui_package branch from 0d0edeb to 497317e Compare February 19, 2026 03:29
@adelrodriguez adelrodriguez changed the base branch from 02-18-refactor_move_themes_constant_from_utils_to_ui_package to graphite-base/93 February 19, 2026 03:32
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_mobile_breakpoint_from_utils_to_ui_package branch from bf8d6d6 to eac8e82 Compare February 19, 2026 03:32
@graphite-app graphite-app bot changed the base branch from graphite-base/93 to main February 19, 2026 03:33
@adelrodriguez adelrodriguez force-pushed the 02-18-refactor_move_mobile_breakpoint_from_utils_to_ui_package branch from eac8e82 to acb844a Compare February 19, 2026 03:33
@adelrodriguez adelrodriguez merged commit 46efd08 into main Feb 19, 2026
7 checks passed
@adelrodriguez adelrodriguez deleted the 02-18-refactor_move_mobile_breakpoint_from_utils_to_ui_package branch February 19, 2026 03:52
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