🧹 Extract string literals 'Lavoro' and 'Riposo' into constants#38
🧹 Extract string literals 'Lavoro' and 'Riposo' into constants#38TargetMisser wants to merge 1 commit intomainfrom
Conversation
Extracted 'Lavoro' and 'Riposo' string literals into reusable constants `SHIFT_TITLE_WORK` and `SHIFT_TITLE_REST` in `src/constants/shifts.ts` to improve code maintainability and reduce duplication. Updated all occurrences in utility functions, components, and screens. Co-authored-by: TargetMisser <52361977+TargetMisser@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🎯 What
Extracted the hardcoded string literals
'Lavoro'and'Riposo'into reusable constants (SHIFT_TITLE_WORKandSHIFT_TITLE_REST) in a new filesrc/constants/shifts.ts. Updated the entire codebase to utilize these constants instead of the raw strings.💡 Why
This improves maintainability by centralizing the definitions for these important, frequently used domain concepts. It reduces duplication, prevents typos, and makes any future changes or localization efforts regarding these shift titles significantly easier and safer.
✅ Verification
src/screens,src/utils, andsrc/widgets.npm run typecheckwhich confirmed there are no TypeScript compilation errors.npx jest --passWithNoTeststo confirm no tests were broken.✨ Result
A cleaner, more maintainable codebase free of magic string literals for core shift types, resulting in enhanced safety and readbility.
PR created automatically by Jules for task 4361916221772028880 started by @TargetMisser