Repository navigation
Venue pins for checked-in friends + opt-in live location + opt-in auto check-in - #176
Merged
Merged
Conversation
… auto check-in
- Friends with an active check-in are pinned at the event venue
("Alex @ Founders Brunch"), stacked avatars for several friends,
preferred over raw GPS. Friend check-ins refresh every 2 min while visible.
- Live GPS sharing is now opt-in (profiles.share_live_location, default off);
turning it off deletes the stored location. get_friends_locations() only
returns opted-in friends updated in the last 2h.
- Opt-in auto check-in (profiles.auto_check_in): 90s dwell within 150m of a
live plan event, toast with Undo; undone events are skipped for the session.
- Migration (not applied) deletes all existing user_locations rows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
user_locations. Turning it off deletes your row (client delete, plus a DB trigger). When it's on, your location updates on enable and then every 5 min while the tab is visible.watchPosition(enableHighAccuracy: false; fixes are throttled to one every 10s and fixes with worse than 200m accuracy are ignored). After 90s within 150m of a live event in your plan, it inserts the check-in and shows the toast "You're at {event} — checked in" with Undo. Undo deletes the row, and falls back to a checkout if the delete isn't allowed. It skips events you already checked in to, and events you undid this session. The UI copy says it only works while plan.wtf is open.useLocationSharing,useAutoCheckIn, purelib/venue-pins.ts+lib/auto-checkin.ts(tested),VenueFriendMarker,AutoCheckInToast,LocationSettings. Removed the unused, deprecateduseFriendLocations(it also did the non-consented upsert).supabase/migrations/20261001130000_location_privacy_venue_pins.sql(NOT applied)profiles.share_live_locationandprofiles.auto_check_in(boolean, default false).user_locationsrows. Every row belongs to a user who hasn't opted in, because the new column defaults to false. These rows were collected on app open without consent.user_locationsRLS: insert/update are only allowed while you've opted in, and you can now delete your own row. A trigger clears the row when sharing is turned off.get_friends_locations(): returns only friends who have opted in and whose location was updated in the last 2h. Restricted toauthenticated.get_friends_active_check_ins(): friends only, not checked out, last 12h. The client falls back to a directcheck_insquery if the RPC is missing.check_ins(needed for Undo) and an index oncheck_ins(created_at).*, so a missing column reads as off. Toggles fail and revert until the migration is applied.QA checklist (needs 2 signed-in accounts that are friends, A and B)
user_locationsis empty and the profile columns existuser_locationsrow for A; B sees no GPS pin for AVerification
npm run lint(0 errors),npx tsc --noEmit,npm test(327 passed, incl. new dwell + venue-pin tests),npx next buildpassed;/kbw2026returns 200 innext dev.🤖 Generated with Claude Code