Location caption precision (country / city / city+country)#48
Merged
Conversation
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.
Closes #39.
The location caption was a plain city/country toggle. This turns it into a precision picker and adds a genuinely useful level the data supports — City, Country ("Cortona, Italy") — while being honest about what offline geocoding can't do.
Levels (a dropdown): Country · City · City, Country. Switching reflows the auto labels on existing photos but leaves any caption you typed yourself alone (
isAutoLocationmatches only the generated labels).Honesty about the dataset
offline-geocode-cityreturns only city + country — there's no neighborhood/landmark in the data. Per the issue, rather than fake it, Neighborhood appears as a disabled option ("offline N/A"). Finer detail would need an online API, which we deliberately don't use (privacy is the moat).Changes
geocode.ts:LocationDetail,LOCATION_DETAILS,placeLabel,isAutoLocation.CaptionLocationwidened to the new union (back-compat: oldcity/countryvalues still valid).applyLocationModeuse the helpers; picker replaces the two-button toggle.Verification
9/9 headless assertions: all three labels format correctly and auto-detection matches every generated label while leaving custom captions untouched. typecheck / oxlint / build green.