Repository navigation
fix: adversarial town match, http(s) hrefs, and geolocation - #13
Merged
Merged
Conversation
Town/ZIP matching is exact (normalized), so Milford is not New Milford. Website and legal-help evidence become links only when they are http(s). Native location uses the Capacitor Geolocation plugin; the browser path still falls back to ZIP/town on deny. Tests cover those cases without relying on a gitignored APK. Co-authored-by: Jacobrakai <jacobyoby@users.noreply.github.com>
jacobyoby
marked this pull request as ready for review
September 18, 2026 22:21
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.
Highest-value adversarial findings from the attached plan.
What changed
Milfordis Hunterdon, not New Milford, andFranklinis not Franklin Lakes. Generic/New/1/a/Mainreturn null. Library-name fallback is word-boundary only, length ≥ 4.safeHttpUrlon website, legal-help evidence, and service evidence. Unsafe values (javascript:, parenthetical notes) are not links. Directory website links use the same helper."no": directory option; unit + e2e assert confirmed-negative rows.Capacitor.Plugins.GeolocationwhenisNativePlatform(); otherwisenavigator.geolocation, with ZIP/town on deny.existsSync.preteststill buildswww/. New geolocation unit tests; directory e2e route-mocks ajavascript:website.Finder: Milford resolves to Hunterdon, not New Milford
Directory legal=no shows only no in the Legal help column
adversarial-milford-legal-no-demo.mp4
Test plan
npm test— 45 passing including Milford/Franklin/safeHttpUrl/legal=no/geolocationnpm run test:e2e— 9 passing including Milford finder, javascript: directory fixture, geo deny, legal=noTo show artifacts inline, enable in settings.