Skip to content

feat(satellite): two-way bearing sync between modal and main map#737

Merged
msupino merged 2 commits into
mainfrom
dev
Jun 13, 2026
Merged

feat(satellite): two-way bearing sync between modal and main map#737
msupino merged 2 commits into
mainfrom
dev

Conversation

@msupino

@msupino msupino commented Jun 13, 2026

Copy link
Copy Markdown
Owner
  • feat(satellite): two-way bearing sync between modal and main map

Rotating the satellite modal map now rotates the main map and vice versa. A _syncingBearing guard prevents the set→event→set feedback loop; the main-map rotate listener is detached on modal close. Adds window.__satModalMap test hook and asserts both sync directions.

  • feat(satellite): rotate inspector preview thumbnail to main-map bearing

The static satellite snippet in the waypoint inspector now rotates its tile layer to match the main map's bearing (crosshair/attribution stay upright). A one-time map rotate listener keeps a visible preview aligned live as the dial or the satellite modal's two-way sync changes the bearing. Tiles sit in a new .satellite-snippet-tiles layer; the 3×3 overscan hides corner gaps.

  • test(pwa): fix flaky SW-registration test — poll for scriptURL via waitForFunction

The test awaited getRegistration() multiple times and only handled active|installing, so a registration in the 'waiting' state (or a transient null worker slot) threw 'Cannot read properties of null' or returned null. Poll inside waitForFunction until a worker slot (active/waiting/installing) exposes a scriptURL, then assert. Verified stable across repeated runs.

  • fix(satellite): correct inspector preview rotation direction

The static snippet rotated opposite to the main map. Apply rotate(+bearing) so it matches the live (leaflet-rotate) modal map's orientation.


msupino and others added 2 commits June 13, 2026 19:29
* feat(satellite): two-way bearing sync between modal and main map

Rotating the satellite modal map now rotates the main map and vice versa.
A _syncingBearing guard prevents the set→event→set feedback loop; the
main-map rotate listener is detached on modal close. Adds window.__satModalMap
test hook and asserts both sync directions.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(satellite): rotate inspector preview thumbnail to main-map bearing

The static satellite snippet in the waypoint inspector now rotates its tile
layer to match the main map's bearing (crosshair/attribution stay upright).
A one-time map rotate listener keeps a visible preview aligned live as the
dial or the satellite modal's two-way sync changes the bearing. Tiles sit in
a new .satellite-snippet-tiles layer; the 3×3 overscan hides corner gaps.

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(pwa): fix flaky SW-registration test — poll for scriptURL via waitForFunction

The test awaited getRegistration() multiple times and only handled
active|installing, so a registration in the 'waiting' state (or a
transient null worker slot) threw 'Cannot read properties of null'
or returned null. Poll inside waitForFunction until a worker slot
(active/waiting/installing) exposes a scriptURL, then assert. Verified
stable across repeated runs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(satellite): correct inspector preview rotation direction

The static snippet rotated opposite to the main map. Apply rotate(+bearing)
so it matches the live (leaflet-rotate) modal map's orientation.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot marked this pull request as draft June 13, 2026 19:37
@msupino msupino marked this pull request as ready for review June 13, 2026 19:37
@github-actions github-actions Bot enabled auto-merge (squash) June 13, 2026 19:37
@msupino msupino disabled auto-merge June 13, 2026 19:37
@msupino msupino merged commit 03c2800 into main Jun 13, 2026
20 of 21 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview deployed

Open PR preview →

https://msupino.github.io/NavigationApp/branch/dev/

Commit: 26c37fa

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