M2-10 (2/2): the heat map screen #55
No reviewers
Labels
No labels
area/agent
area/capture
area/editor
area/geo
area/security
area/sync
area/transcription
area/ui
area/vault
area/voice-memos
blocked
milestone/M1
milestone/M2
milestone/M3
milestone/M4
needs-decision
needs-hardware
p0
p1
p2
type/bug
type/enhancement
type/feature
type/idea
type/infrastructure
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stash/stash-ios!55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "m2-10-heat-map-screen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The second half of M2-10 (#39). Based on
m2-10-heat-map(#54), not onmain, so this diff isthe screen alone — merge #54 first and this retargets cleanly.
What this is
MKOverlayRendererover anMKMapView, with the heat drawn under the map'slabels, so street names stay readable through it. The ground with no colour on it is the answer
the map exists to give, and it is only readable if the streets around it are.
current period on screen rather than behind it.
with nothing recorded yet, a period that selects nothing, and a library that could not be read.
the documented exception to M2-06's rule that it creates.
Two things running it found that reading it did not
The overlay drew nothing at all. The screen framed correctly, reported the right number of
cells, and rendered an empty map.
boundingRectwas handing MapKit a rectangle whose origin satpast the eastern edge of the world, which intersects no tile — so the renderer was never called.
The cause is a floating-point tie: for a library entirely in one hemisphere the plain span and the
one measured the other way round the world are the same distance, and
(a + world) - (b + world)is not bit-for-bit
a - bat these magnitudes. Losing that tie put every x a world east. Fixed atthe comparison, with the origin wrapped back inside the world as a second line of defence.
Dark mode swallowed the faint end of the ramp — which is a street walked once, the evidence the
screen exists to show. The alpha ramp is now chosen from the colour scheme.
The disclosure problem, and what it cost
Both location purpose strings and the Settings explainer said Stash uses location while a memo is
recording and at no other time. Opening this screen asks the phone where it is, so that stopped
being true. Not writing the fix to disk does not make it not a use.
The strings are corrected — but iOS prompts for location exactly once, so a phone that already
granted it for route recording would never be shown the new sentence, and would have its
neighbourhood sent to Apple Maps under consent obtained for something else. So the screen says it
itself, once, before it takes any fix: the same explainer with a Continue button, and
HeatMapNoticerecording that it has been shown. What is stored is that a sentence was shown —not consent, and not a history of what has been turned on and off.
What was validated
make test— 692 tests, green.make lint— clean.times reads clearly hotter than streets walked once or twice; street names stay readable through
the heat in both light and dark; the empty state and the first-open notice both render; the map
opens centred on the simulator's location.
regression test for the framing bug passed against the unfixed code. Chasing why is what
found the floating-point tie, which is the real defect. The tie is a rounding difference rather
than a shape, so what the tests pin now is the invariant across four library shapes.
What was NOT validated
.agent/m2-10-heat-map/PLAN.md.draw(_:zoomScale:in:)needs a liveMKMapView; everyrule it consults is tested — cell selection, tile alignment across the date line, the ramp.
regionWillChangeAnimatedneeds real gestures. If it fails,the camera re-centres after a pan — that is device check 9.
build; device check 10.
Full reasoning and every disposition:
.agent/m2-10-heat-map/PLAN.mdand.agent/m2-10-heat-map-screen/SUMMARY.md.⚠️ No screenshots of this feature anywhere — this repository is public and a heat map of daily walks
is a home address with extra steps. Every fixture is synthetic coordinates.