Description:
The app's color palette is currently defined across multiple files, creating duplication and inconsistency. There are two separate theming systems, one of which is entirely unused.
Current Behavior:
ContentView.swift (lines 3–20) — Contains Color and UIColor extensions defining the actual colors used throughout the app (darkBackground, neonBlue, neonPurple, etc.).
Theme.swift — Contains a separate Theme enum with system colors (Color(.systemBackground), Color.blue) that are never referenced anywhere in the codebase.
ProblemModels.swift — Contains an unrelated Color(hex:) initializer extension mixed in with model code.
This structure is confusing for new contributors and makes the design system fragile.
Feature Requirements:
- Create a dedicated color/theme file (e.g.,
CForge/Theme/AppColors.swift) or repurpose Theme.swift.
- Move all
Color extensions from ContentView.swift into this file.
- Move the
UIColor extensions from ContentView.swift into this file.
- Move the
Color(hex:) initializer from ProblemModels.swift into this file.
- Remove the unused
Theme enum or update it to reference the actual neon color palette.
- Ensure
ContentView.swift only contains the ContentView struct.
Steps to Implement:
- Create a new file
CForge/Theme/AppColors.swift (or rename/repurpose Theme.swift).
- Move all
Color and UIColor extensions from ContentView.swift into the new file.
- Move the
Color(hex:) extension from ProblemModels.swift into the new file.
- Delete or update the unused
Theme enum.
- Build (
Cmd+B) and verify all views still compile — the extensions are global, so no import changes are needed.
- Run the app to confirm there are no visual regressions.
Expected Outcome:
- All color and theme definitions live in a single, dedicated file.
ContentView.swift contains only view code.
ProblemModels.swift contains only model code.
- The app looks and functions identically to before (pure refactor).
Description:
The app's color palette is currently defined across multiple files, creating duplication and inconsistency. There are two separate theming systems, one of which is entirely unused.
Current Behavior:
ContentView.swift(lines 3–20) — ContainsColorandUIColorextensions defining the actual colors used throughout the app (darkBackground,neonBlue,neonPurple, etc.).Theme.swift— Contains a separateThemeenum with system colors (Color(.systemBackground),Color.blue) that are never referenced anywhere in the codebase.ProblemModels.swift— Contains an unrelatedColor(hex:)initializer extension mixed in with model code.This structure is confusing for new contributors and makes the design system fragile.
Feature Requirements:
CForge/Theme/AppColors.swift) or repurposeTheme.swift.Colorextensions fromContentView.swiftinto this file.UIColorextensions fromContentView.swiftinto this file.Color(hex:)initializer fromProblemModels.swiftinto this file.Themeenum or update it to reference the actual neon color palette.ContentView.swiftonly contains theContentViewstruct.Steps to Implement:
CForge/Theme/AppColors.swift(or rename/repurposeTheme.swift).ColorandUIColorextensions fromContentView.swiftinto the new file.Color(hex:)extension fromProblemModels.swiftinto the new file.Themeenum.Cmd+B) and verify all views still compile — the extensions are global, so no import changes are needed.Expected Outcome:
ContentView.swiftcontains only view code.ProblemModels.swiftcontains only model code.