fix(01): revise plans based on checker feedback
- Clarified ThemeModel delegation rationale (Issue 1) - Documented why Task 3 is one atomic task (Issue 2) - Made customDebugPrint deletion step unambiguous (Issue 3) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -334,7 +334,7 @@ Source files to read before modifying:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
ThemeModel delegates palette storage to ColorThemes (which holds the static list). ThemeModel only tracks current selection and provides rotation. This matches the CONTEXT.md mental model: "holds all possible colour palettes, exposing only the current set of colours (with their nametags), informative 'current set name', and a method for rotating themes." The palettes are held via delegation to ColorThemes, not duplicated.
|
**Design rationale — delegation IS "holding":** The user's mental model says ThemeModel "holds all possible colour palettes, exposing only the current set of colours (with their nametags), informative 'current set name', and a method for rotating themes." ThemeModel satisfies this by delegating palette storage to ColorThemes (which holds the static list of all palettes). From the consumer's perspective, ThemeModel IS the single object that holds palettes, exposes `current` (the active ColorTheme with named colors), `currentSetName` (the label), and `rotate()` (circular cycling). The delegation to ColorThemes is an implementation detail — callers never interact with ColorThemes directly. This avoids duplicating the palette data while giving the user exactly the API they described.
|
||||||
|
|
||||||
Do NOT update imports in main.dart or gps_data_manager.dart yet — that is Task 3.
|
Do NOT update imports in main.dart or gps_data_manager.dart yet — that is Task 3.
|
||||||
</action>
|
</action>
|
||||||
@@ -360,6 +360,8 @@ Source files to read before modifying:
|
|||||||
<action>
|
<action>
|
||||||
This is the critical wiring task. Every import must be updated in a single pass. The app must compile after this task completes.
|
This is the critical wiring task. Every import must be updated in a single pass. The app must compile after this task completes.
|
||||||
|
|
||||||
|
**Why this is one task (not split):** All changes here are interdependent — you cannot update imports without also replacing the constants they point to, and you cannot delete old files until all imports have been rewired. Splitting into "rewire imports" + "replace constants" + "delete files" would create intermediate broken states where imports point to non-existent symbols. The changes span 3 files but are mechanically repetitive (find/replace patterns), not intellectually complex. A single atomic pass is safer.
|
||||||
|
|
||||||
1. **Update `lib/services/gps_data_manager.dart`:**
|
1. **Update `lib/services/gps_data_manager.dart`:**
|
||||||
- Remove the ProcessedGpsData class definition (lines 6-40) — it now lives in models/
|
- Remove the ProcessedGpsData class definition (lines 6-40) — it now lives in models/
|
||||||
- Add imports:
|
- Add imports:
|
||||||
@@ -400,7 +402,7 @@ Source files to read before modifying:
|
|||||||
import 'models/overlay_message.dart';
|
import 'models/overlay_message.dart';
|
||||||
import 'services/logger.dart';
|
import 'services/logger.dart';
|
||||||
```
|
```
|
||||||
- Remove the `customDebugPrint()` function definition (lines 16-20) — replaced by Logger
|
- **Delete the `customDebugPrint()` function definition from main.dart** (lines 16-20, the `void customDebugPrint(String message)` function body). This function is fully replaced by Logger. Remove the entire function, not just its body.
|
||||||
- Replace ALL `customDebugPrint()` calls with appropriate `Logger.*()` calls:
|
- Replace ALL `customDebugPrint()` calls with appropriate `Logger.*()` calls:
|
||||||
- Pattern: `customDebugPrint('[Main] emoji message')` → `Logger.debug('message', 'Main')` (or info/warn/error as appropriate)
|
- Pattern: `customDebugPrint('[Main] emoji message')` → `Logger.debug('message', 'Main')` (or info/warn/error as appropriate)
|
||||||
- Use Logger.error for catch blocks
|
- Use Logger.error for catch blocks
|
||||||
|
|||||||
Reference in New Issue
Block a user