One click on the composer's globe icon posts your exact location to the room: no preview or confirm, accuracy ignored, shown to 5 decimals #340

Closed
opened 2026-10-06 18:27:38 -04:00 by jared · 0 comments
Owner

handleShareLocation (src/app/features/room/RoomInput.tsx:361-400, added in 86464f49) calls getCurrentPosition and sends the m.location event straight from the success callback. The browser asks for permission only once; after that a single click shares your position.

Measured (geolocation granted, position 40.748817, −73.985428, accuracy 3500 m):

  • One click on the 32×32 "Share location" button sent the event about 1 s later, with no dialog at any point: {"msgtype":"m.location","geo_uri":"geo:40.748817,-73.985428", …}.
  • The card renders "40.74882, -73.98543", which reads as exact to ~1 m, although the fix was ±3.5 km. pos.coords.accuracy is discarded.

Why this matters:

  • The button is on by default in every room (showLocation ?? true), including big public ones. It sits 36 px from its toolbar neighbours and its globe icon (Icons.SpaceGlobe) doesn't say "location", so it's easy to hit by accident.
  • On a laptop at home, "your location" is your home address. Redacting afterwards doesn't remove it from other people's clients, notifications, bridges or exports.
  • The opposite problem with inaccurate fixes: a Wi-Fi/IP fix shown to 5 decimals sends friends to the wrong place.

Fix:

  • Show a confirm step: a small map preview (click-to-load as in MLocation), the coordinates with "± N m", and Send / Cancel. Optionally offer "Send approximate (≈1 km)", which rounds to 2 decimals.
  • Include accuracy in the event as u= in the geo URI (RFC 5870, e.g. geo:40.7488,-73.9854;u=3500) so receivers can render a radius.
  • Show the location icon (Icons.Pin, already used in MLocation) instead of the globe.
  • Consider defaulting the toolbar button to hidden in rooms with more than ~50 members or public join rules.

Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny 30e2dbcd, cinny-desktop 8f67ec7, element-call 3b0050e8.

`handleShareLocation` (src/app/features/room/RoomInput.tsx:361-400, added in 86464f49) calls `getCurrentPosition` and **sends the `m.location` event straight from the success callback**. The browser asks for permission only once; after that a single click shares your position. **Measured** (geolocation granted, position 40.748817, −73.985428, accuracy **3500 m**): - One click on the 32×32 "Share location" button sent the event about **1 s later**, with no dialog at any point: `{"msgtype":"m.location","geo_uri":"geo:40.748817,-73.985428", …}`. - The card renders **"40.74882, -73.98543"**, which reads as exact to ~1 m, although the fix was ±3.5 km. `pos.coords.accuracy` is discarded. **Why this matters:** - The button is on by default in every room (`showLocation ?? true`), including big public ones. It sits 36 px from its toolbar neighbours and its globe icon (`Icons.SpaceGlobe`) doesn't say "location", so it's easy to hit by accident. - On a laptop at home, "your location" is your home address. Redacting afterwards doesn't remove it from other people's clients, notifications, bridges or exports. - The opposite problem with inaccurate fixes: a Wi-Fi/IP fix shown to 5 decimals sends friends to the wrong place. **Fix:** - Show a confirm step: a small map preview (click-to-load as in `MLocation`), the coordinates with **"± N m"**, and *Send* / *Cancel*. Optionally offer "Send approximate (≈1 km)", which rounds to 2 decimals. - Include accuracy in the event as `u=` in the geo URI (RFC 5870, e.g. `geo:40.7488,-73.9854;u=3500`) so receivers can render a radius. - Show the location icon (`Icons.Pin`, already used in `MLocation`) instead of the globe. - Consider defaulting the toolbar button to hidden in rooms with more than ~50 members or public join rules. --- _Found in the October 2026 client audit (Playwright against a local Synapse + LiveKit stack, plus code reading). Code refs are at cinny `30e2dbcd`, cinny-desktop `8f67ec7`, element-call `3b0050e8`._
jared added the priority: mediumsecurityarea: messaging labels 2026-10-06 18:27:38 -04:00
jared closed this issue 2026-10-11 23:23:06 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#340