Skip to content

Share a location from the composer - #8

Merged
ZeroElemental merged 1 commit into
mainfrom
dev
Sep 21, 2026
Merged

ZeroElemental merged 1 commit into
mainfrom
dev

Conversation

@ZeroElemental

Copy link
Copy Markdown
Owner

No description provided.

Two entries under the paperclip: "Current location" takes a single
geolocation fix and sends it, "Choose on map" opens a map you pan until
the pin sits where you mean. Point-in-time only -- nothing here tracks.

A location is a body under a new kind rather than new columns: a point is
two numbers, and messages already carry a body. That means it rides the
existing send path, optimistic row and realtime echo included, and
my_conversations() already falls through to the kind for the list preview,
so neither it nor previewOf needed touching.

messages_payload_ck does the real validating. The body reaches the client
and goes straight into a map URL, so the database refuses anything that is
not two in-range coordinates -- the regex runs before the ::numeric casts,
so '0,0&layer=evil' raises a check violation rather than a cast error.
parseLatLng mirrors it on the way back out; rls_test.sql covers the
database half.

Leaflet is imported inside the effect, not at module scope: it touches
window as it loads, which would break the prerender, and this keeps it out
of the main bundle. The picker reads map.getCenter() under a CSS pin
instead of using a Leaflet marker, which sidesteps the marker-icon
breakage bundlers are known for. Received bubbles use an OpenStreetMap
embed rather than a second Leaflet instance -- a thread can hold many, and
an iframe costs no JavaScript per bubble.
@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pixel-chat Ready Ready Preview Sep 6, 2026 3:30pm UTC

@ZeroElemental
ZeroElemental merged commit 1cf41c6 into main Sep 21, 2026
4 checks passed

This branch was successfully deployed

1 active deployment
Preview — 2411332a Deployed Sep 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant