fix(zoom): stop reporting map labels as a precise address (#13) - #23
Merged
Merged
Conversation
`findmy person <name> --zoom` on macOS 26.6.2 returned `precise_address: "Champaign Point, 3D"` for every person — the name of a lake headland and the map's own 3D control, OCR'd off the map canvas and presented as their street address. Wrong location data labelled precise is worse than none. macOS 26 replaced FindMy's split view with a floating sidebar over a full-window map, so there is no right-hand detail pane left to scrape. `ExtractDetailPaneAddress` had no guard that it was looking at one — it took the first line right of the sidebar as the header and everything after it as the address — where the sidebar parser has had `RequireSidebarVisible` for this exact class of bug since the beginning. Three defects, each verified on macOS 26.6.2: - `screencapture -l` pads the bitmap with the window's ~34pt drop shadow, so a 1024x768 window captured 2184x1672 rather than 2048x1536. Image-to-window point mapping assumed the two origins coincide and that the width ratio is the backing scale, so every synthesized click landed ~22pt low and ~25pt right, and the row was never actually selected. `-o` omits the shadow and makes the arithmetic exact. The redesigned sidebar also moved the name column in to ~66pt, under the old 80pt cutoff, so that drops to 60pt. - With the click landing, the redesign answers with a callout pinned to the map: the entity's name over the same coarse location and staleness the sidebar already showed. Matching the header against the clicked row's name is the language-neutral proof a pane is really open (`DetailButtons` is English-only, so gating on button labels would have broken every localized install), and address lines are now held to the header's column so scattered street labels cannot join on. - `looksLikeAddressLine` matched street words as substrings, so "Winston" matched "st" and "Redmond" matched "rd". Whole words only, and a line carrying FindMy's "•" location/staleness separator is never an address. `--zoom` now warns on stderr and leaves `precise_address` unset. It stays exit 0 with the coarse reading intact so `--json` pipelines keep working. Verified on macOS 26.6.2: `go test ./...`, `go vet ./...`, `gofmt -l`, and live `people`/`devices`/`items`/`person --zoom` runs diffed against a binary built from origin/main — identical output apart from the fabricated address going away. Note PR CI runs plugin-inspector only and never executes the Go tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VDD6P9ft7DNNbrXpNWvCsk
|
| Filename | Overview |
|---|---|
| internal/findmy/findmy.go | Corrects capture geometry and adds entity-header, column-alignment, and whole-word safeguards around OCR-derived precise addresses. |
| cmd/findmy/main.go | Passes the selected entity name into detail extraction and treats unavailable precise addresses as a nonfatal warning. |
| internal/findmy/detail_pane_test.go | Adds focused regression coverage based on map-canvas and map-callout OCR captures, along with matcher and address-shape cases. |
| README.md | Documents that macOS 26 and later no longer expose a street address through the zoom interaction. |
Sequence Diagram
sequenceDiagram
participant CLI
participant FindMy as Find My
participant OCR
CLI->>FindMy: Capture shadow-free sidebar
CLI->>FindMy: Click matched entity row
CLI->>FindMy: Capture resulting view
CLI->>OCR: Read positioned text
OCR-->>CLI: Header and candidate address lines
alt Matching detail-pane header and valid address
CLI-->>CLI: Populate precise address fields
else No pane or no precise address
CLI-->>CLI: Preserve coarse result and warn
end
Reviews (1): Last reviewed commit: "fix(zoom): stop reporting map labels as ..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13.
What was actually wrong
The issue reported that the macOS 27 beta redesigned FindMy so a row click no longer reveals a precise location, making
--zoomineffective. Reproduced on macOS 26.6.2 — the redesign already shipped, and the failure is worse than "ineffective":Every person returned the same string, because it came from the map canvas, not from them. Wrong location data labelled precise is worse than no data.
Root causes
Three separate defects, each verified on this machine:
1.
screencapture -lincludes the window's drop shadow. A 1024x768 window captured 2184x1672 instead of 2048x1536 — ~34pt of padding per side. The image-to-window point mapping assumes the origins coincide and thatimageWidth/windowWidthis the backing scale; the shadow breaks both, inflating the derived scale to 2.13 and landing every synthesized click ~22pt low and ~25pt right. The row was never selected at all.-oomits the shadow and makes the arithmetic exact. The redesigned sidebar also moved the name column in to ~66pt from the window edge, under the old 80pt cutoff, sopixelLayoutdrops to 60pt (which still clears the older split-view layout's ~90pt).2. No guard that a detail pane exists.
ExtractDetailPaneAddresstook the first line right of the sidebar as the header and everything after as the address. On a full-bleed map that is map furniture. The sidebar parser has hadRequireSidebarVisiblefor this exact class of bug since the beginning; the detail-pane side had nothing.With the click fixed, the redesign's actual answer is visible: a callout pinned to the map, carrying the entity's name over the same coarse location and staleness the sidebar already showed — no street address anywhere. So the header now has to match the clicked row's name, and address lines have to sit in the header's column. Header matching is against the entity name rather than
DetailButtons()because that list is English-only and never populated per-locale, so gating on it would have broken every localized install.3.
looksLikeAddressLinematched street words as substrings."Winston"matched"st","Redmond"matched"rd","Kirkland"matched"ln". Whole words only now, and a line carrying FindMy's•location/staleness separator is never an address.Behaviour now
Warning on stderr, exit 0, coarse reading intact —
--jsonpipelines keep working, andprecise_addressis simply absent rather than invented. Documented under Limitations in the README.Verification
go test ./...,go vet ./...,gofmt -lall clean. New tests cover both real captures (map canvas, map callout), the substring street-word bug, and pane-present-but-no-address.Live on macOS 26.6.2,
people/devices/itemsoutput was diffed against a binary built fromorigin/main— identical, apart from the fabricated address going away.Worth knowing: PR CI here is
plugin-inspectoronly and never runsgo test ./..., so the Go verification above is local.Out of scope, filed separately
While verifying I hit an intermittent Devices-tab parse where names and locations swap (
Home • 3 days agoas the name,Omar's AirPods Maxas the location). It reproduces identically onorigin/main, so it is pre-existing and unrelated to this change. Filed with OCR evidence rather than widened into this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01VDD6P9ft7DNNbrXpNWvCsk