summaryrefslogtreecommitdiff
path: root/scripts/.claude/ct-remove-mock-tidal.yaml
diff options
context:
space:
mode:
authorClaude <noreply@anthropic.com>2026-04-23 23:10:11 +0000
committerClaude <noreply@anthropic.com>2026-04-23 23:10:11 +0000
commite1db9200e9d44c10450361cc8984a45b2eda87b7 (patch)
tree21bdfca02491e6ff4cde7a22673c821c0a03e108 /scripts/.claude/ct-remove-mock-tidal.yaml
parent55509f579b4d074f01237dd90791b6d25aaec3cd (diff)
parenteb78d317c722234a7ef2c501c68c9aa730ec2758 (diff)
Merge origin/main — unite all work onto one branch
Brings in dev log (NavLogger), UnitPrefs, MapLayerManager, HUD views, conditions throttling, track save/load pipeline, improved ParticleWindView (antimeridian-aware, dynamic particle count), Snackbar error surfacing, and all other main-branch work from the prior session. Combined with master's hardware source flags, vessel registry, crew management, thermal alarm, CPA collision alerts, and track stats. Also documents primary branch policy in CLAUDE.md and .agent/config.md: all work merges to main, never master. https://claude.ai/code/session_011h2dXbgXg3PesQMmQUNTCW
Diffstat (limited to 'scripts/.claude/ct-remove-mock-tidal.yaml')
-rw-r--r--scripts/.claude/ct-remove-mock-tidal.yaml83
1 files changed, 83 insertions, 0 deletions
diff --git a/scripts/.claude/ct-remove-mock-tidal.yaml b/scripts/.claude/ct-remove-mock-tidal.yaml
new file mode 100644
index 0000000..86d4e76
--- /dev/null
+++ b/scripts/.claude/ct-remove-mock-tidal.yaml
@@ -0,0 +1,83 @@
+name: "Remove MockTidalCurrentGenerator"
+description: "LocationService generates random fake tidal current arrows near a hardcoded Solent coordinate (50.8, -1.3) every 60 seconds regardless of boat position. Remove the mock generator; leave the layer empty until a real tidal API is integrated."
+agent:
+ model: "sonnet"
+ working_dir: "/workspace/nav"
+ instructions: |
+ Context
+ -------
+ In LocationService.onCreate() there is a coroutine loop:
+ (android-app/app/src/main/kotlin/org/terst/nav/LocationService.kt, lines ~113-119)
+
+ serviceScope.launch {
+ while (true) {
+ val currents = MockTidalCurrentGenerator.generateMockCurrents()
+ _tidalCurrentState.update { it.copy(currents = currents) }
+ kotlinx.coroutines.delay(60000)
+ }
+ }
+
+ MockTidalCurrentGenerator.generateMockCurrents() produces 10 TidalCurrent objects with:
+ - Random speedKnots (0–5 kn)
+ - Random directionDegrees (0–360°)
+ - Positions scattered within 0.05° of lat=50.8, lon=-1.3 (Solent, UK)
+ regardless of actual boat position.
+ (android-app/app/src/main/kotlin/org/terst/nav/MockTidalCurrentGenerator.kt)
+
+ TidalCurrentState has an isVisible flag (defaults false) and a currents list.
+ MapHandler.updateTidalCurrents() respects isVisible — when false it clears the layer.
+
+ Goal
+ ----
+ 1. Remove the mock generator loop from LocationService.onCreate()
+ 2. Delete MockTidalCurrentGenerator.kt
+ 3. Ensure _tidalCurrentState starts with isVisible=false and empty currents (the default)
+ 4. Remove the import of MockTidalCurrentGenerator from LocationService
+
+ Do NOT remove TidalCurrentState, _tidalCurrentState, or the tidalCurrentState public flow —
+ those are needed when a real tidal API is added later.
+ Do NOT remove ACTION_TOGGLE_TIDAL_VISIBILITY handling in onStartCommand — keep the
+ visibility toggle working for future use.
+
+ Step 1 — Remove the mock loop from LocationService
+ ---------------------------------------------------
+ In android-app/app/src/main/kotlin/org/terst/nav/LocationService.kt:
+
+ Delete the entire block (including the comment):
+ // Mock tidal current data generator
+ serviceScope.launch {
+ while (true) {
+ val currents = MockTidalCurrentGenerator.generateMockCurrents()
+ _tidalCurrentState.update { it.copy(currents = currents) }
+ kotlinx.coroutines.delay(60000) // Update every minute
+ }
+ }
+
+ Remove the import:
+ import org.terst.nav.MockTidalCurrentGenerator
+
+ Step 2 — Delete MockTidalCurrentGenerator.kt
+ ---------------------------------------------
+ Delete android-app/app/src/main/kotlin/org/terst/nav/MockTidalCurrentGenerator.kt
+
+ Step 3 — Build
+ --------------
+ cd android-app && ANDROID_HOME=/opt/android-sdk ./gradlew assembleDebug 2>&1 | tail -5
+ Confirm BUILD SUCCESSFUL with no references to MockTidalCurrentGenerator remaining.
+
+ Step 4 — Commit and push
+ ------------------------
+ git add -A
+ git commit -m "chore: remove MockTidalCurrentGenerator
+
+ The mock generator was producing 10 random tidal current arrows near a
+ hardcoded Solent coordinate (50.8, -1.3) every 60 seconds regardless of
+ boat position. Remove it entirely. The tidal overlay infrastructure
+ (TidalCurrentState, mapHandler.updateTidalCurrents) is retained for when
+ a real tidal current API is integrated."
+ git push github main && git push local main
+timeout: "15m"
+tags:
+ - "cleanup"
+ - "tidal"
+ - "mock-data"