Colota - Android GPS Location tracker
refactor(profiles): cut each condition caption to what the condition means (#882)
Max Dietrich5df56a84710f
diff --git a/apps/docs/docs/guides/geofencing.md b/apps/docs/docs/guides/geofencing.mdindex aefca288..c1a47903 100644--- a/apps/docs/docs/guides/geofencing.md+++ b/apps/docs/docs/guides/geofencing.md@@ -85,7 +85,7 @@ See the [Deep Link Setup](deep-link-setup.md#geofences) guide for the full paylo- The notification shows "Paused" with "Inside zone", "Zone WiFi" or "No movement" and when tracking resumes. The zone name only appears on the Dashboard- By default, GPS continues running inside the zone to detect when you leave. If **WiFi pause** or **motionless pause** is enabled, GPS stops entirely inside the zone and zone exit is detected when GPS resumes- If you leave before the entry delay completes, the delay is cancelled and tracking continues uninterrupted-- Stationary detection is suspended inside zones so GPS is never stopped by the stationary timer while zone exit needs to be detected+- A stationary profile stays active inside a zone, but records nothing while WiFi pause or motionless pause has GPS off- When exiting the zone, tracking automatically resumes- If GPS goes quiet while paused (for example, indoors for a long stretch), Colota periodically requests a fresh position to check whether you have left- Zone checks happen every location update with minimal overheaddiff --git a/apps/docs/docs/guides/tracking-profiles.md b/apps/docs/docs/guides/tracking-profiles.mdindex 17b1d54d..649ba494 100644--- a/apps/docs/docs/guides/tracking-profiles.md+++ b/apps/docs/docs/guides/tracking-profiles.md@@ -36,13 +36,15 @@ The list opens with a line that says which profile is in force and its values, "## Condition Types-| Condition | Trigger | Cost |-| --- | --- | --- |-| **Charging** | Phone is plugged in to a power source | Nothing to watch |-| **Android Auto** | Android Auto is connected | Nothing to watch |-| **Speed above** | Average speed exceeds the speed you set (km/h or mph) | Fixes keep flowing to measure it, even below the movement threshold |-| **Speed below** | Average speed drops below the speed you set (km/h or mph) | Fixes keep flowing to measure it, even below the movement threshold |-| **Stationary** | Still for the activation delay (60 s by default) | Fixes keep flowing to measure it; movement threshold not used |+| Condition | Trigger |+| ---------------- | --------------------------------------------------------- |+| **Charging** | Phone is plugged in to a power source |+| **Android Auto** | Android Auto is connected |+| **Speed above** | Average speed exceeds the speed you set (km/h or mph) |+| **Speed below** | Average speed drops below the speed you set (km/h or mph) |+| **Stationary** | Still for the activation delay (60 s by default) |++A stationary profile records less often, but GPS stays on. To stop GPS while you stay somewhere, use a [geofence](geofencing) with WiFi pause or motionless pause.Speed conditions use a rolling average of the last 5 GPS readings to avoid triggering on momentary speed spikes. The stationary condition uses a fixed speed threshold (0.3 m/s) that has to hold across 60 seconds of fixes, so unlike speed-below it does not flap on GPS noise near zero. The window is measured over the fixes themselves, so a stretch with no fixes at all is not counted as stillness and the profile waits for the stream instead of switching on.diff --git a/apps/docs/static/img/screenshots/ProfileEditor.png b/apps/docs/static/img/screenshots/ProfileEditor.pngindex 99f153b8..d78e603d 100644Binary files a/apps/docs/static/img/screenshots/ProfileEditor.png and b/apps/docs/static/img/screenshots/ProfileEditor.png differdiff --git a/apps/mobile/src/constants/index.ts b/apps/mobile/src/constants/index.tsindex 542603f6..ffd98bc4 100644--- a/apps/mobile/src/constants/index.ts+++ b/apps/mobile/src/constants/index.ts@@ -97,38 +97,35 @@ export const PROFILE_CONDITIONS: {label: "Charging",listLabel: "When charging",icon: Zap,- description: "Phone is plugged in · costs nothing to watch"+ description: "Phone is plugged in"},{type: "android_auto",label: "Android Auto",listLabel: "On Android Auto",icon: Car,- description: "Android Auto is connected · costs nothing to watch"+ description: "Android Auto is connected"},{type: "speed_above",label: "Speed above",listLabel: "Speed above",icon: ArrowUp,- description:- "Average of the last 5 fixes is faster than the speed below · fixes keep flowing to measure it, even below the movement threshold"+ description: "Average speed is above the speed you set"},{type: "speed_below",label: "Speed below",listLabel: "Speed below",icon: ArrowDown,- description:- "Average of the last 5 fixes is slower than the speed below · fixes keep flowing to measure it, even below the movement threshold"+ description: "Average speed is below the speed you set"},{type: "stationary",label: "Stationary",listLabel: "When stationary",icon: Pause,- description:- "Still for the activation delay · records a point every interval, movement threshold not used · fixes keep flowing to measure it"+ description: "Phone stays still for the activation delay"}]diff --git a/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx b/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsxindex f470a9c2..e61da8c7 100644--- a/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx+++ b/apps/mobile/src/screens/__tests__/ProfileEditorScreen.test.tsx@@ -179,13 +179,13 @@ describe("ProfileEditorScreen", () => {})describe("condition", () => {- it("comes first, in sentence case, with what watching it costs on each row", () => {- const { getByText, getAllByText, getByTestId } = renderNew()+ it("comes first, in sentence case, with what each condition means on its row", () => {+ const { getByText, getByTestId } = renderNew()expect(getByText("Android Auto")).toBeTruthy()expect(getByText("Speed above")).toBeTruthy()- expect(getByText("Phone is plugged in · costs nothing to watch")).toBeTruthy()- expect(getAllByText(/fixes keep flowing to measure it, even below the movement threshold/)).toHaveLength(2)+ expect(getByText("Phone is plugged in")).toBeTruthy()+ expect(getByText("Average speed is above the speed you set")).toBeTruthy()expect(getByTestId("condition-charging").props.accessibilityState.checked).toBe(true)})