Skip to content

refactor(web): drop the name-redraw hold, MapLibre never closes a popup on redraw - #770

Merged
efiten merged 2 commits into
masterfrom
refactor/drop-name-redraw-hold
Oct 31, 2026
Merged

efiten merged 2 commits into
masterfrom
refactor/drop-name-redraw-hold

Conversation

@efiten

@efiten efiten commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Closes #763

What changes

  • web/map.js: the hold from Web: name-resolution redraw closes an open map popup #271 is gone (deferWhile(() => popupOpen) plus the onPopup listener). The three name-resolution redraws (points, picker, cs:${src}) run directly.
  • web/mapcore.js: onPopup and popupCbs removed, since nothing else subscribed. The close handler now clears popup only when it is still the popup that closed (popup === p). Before, the callbacks were guarded by if (popup).
  • web/deferredredraw.js and its unit test removed; map.js was the only user.
  • web/e2e/ui.spec.js: the Web: name-resolution redraw closes an open map popup #271 test is rewritten as a name-resolution redraw runs under an open popup and leaves it open.

Why

Measured with the hold disabled (#763 comment):

  • On the points path and the cs:* path, a name redraw runs while a popup is open and the popup stays open.
  • The popup is map-level (mapcore.js openPopup/closePopup). setData and clearMarkers do not close it.

The rewritten test

  • Points mode with a full-pubkey sender, /api/resolve held until the popup is open.
  • The URL carries a range that has already ended, so it is not live: neither the 10 s range refresh nor the ticker poll runs. A map draw (/api/points?…limit=5000) within 10 s after the name lands is therefore that redraw and no other.
    • Without the redraw, no map draw came in 15 s.
    • The first version ended the range tomorrow. That is still live, and the check passed only on timing (review finding, fixed in the second commit).
  • Mutations: a redraw that calls wm.closePopup() fails the test (3 of 3); no redraw at all fails it too (2 of 2, with a 15 s window). The real code passes 5 of 5.
  • The nodePosSig comment in map.js no longer says a rebuild closes the popup.

Verified

  • vitest 868/868. That is 876 minus the 8 removed deferredredraw tests. eslint clean.
  • Full Playwright with --workers=2: 337 passed.

Not done

  • No changelog entry. The only visible difference is that names in the picker and the layers update while a popup is open instead of after it closes.

https://claude.ai/code/session_01TDXX3ZV8LEdZgVTNFYFvZi

efiten and others added 2 commits October 31, 2026 12:35
…up on redraw (#763)

#271 held name-resolution redraws while a popup was open because on
Leaflet removing a marker closed its popup. On MapLibre the popup is
map-level and setData leaves it open, measured on the points and
observer paths with the hold disabled. deferredredraw.js and mapcore's
onPopup had no other users. The e2e now guards what is left: the redraw
runs under an open popup and the popup stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TDXX3ZV8LEdZgVTNFYFvZi
…aws (#763)

A range ending tomorrow is still live, so the 10 s range refresh kept
drawing and the redraw check passed on timing alone. With a range that
has ended, no draw comes in 15 s without the redraw. Also corrects the
nodePosSig comment, which still said a rebuild closes the popup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TDXX3ZV8LEdZgVTNFYFvZi
@efiten
efiten merged commit ba9a9b0 into master Oct 31, 2026
7 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 31, 2026
efiten pushed a commit that referenced this pull request Oct 31, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>app: 1.32.1</summary>

##
[1.32.1](app-v1.32.0...app-v1.32.1)
(2026-10-31)


### Bug Fixes

* **web:** a callout with its control in the menu sends the tour copy
into the panel
([#760](#760))
([8592da6](8592da6))
* **web:** keep the bar's labels on one line at tablet widths
([#759](#759))
([f27390c](f27390c))
</details>

<details><summary>server: 1.11.1</summary>

##
[1.11.1](server-v1.11.0...server-v1.11.1)
(2026-10-31)


### Performance Improvements

* **server,web:** one point query per hex refresh for both cell sizes
([#755](#755))
([78868fc](78868fc))
</details>

<details><summary>web: 1.28.1</summary>

##
[1.28.1](web-v1.28.0...web-v1.28.1)
(2026-10-31)


### Bug Fixes

* **web:** a callout with its control in the menu sends the tour copy
into the panel
([#760](#760))
([8592da6](8592da6))
* **web:** a registry answer from before a role change, or an older
failure, no longer moves the attributor
([#769](#769))
([087377d](087377d))
* **web:** date a registry slice from when it was asked for
([#765](#765))
([77badec](77badec))
* **web:** keep the bar's labels on one line at tablet widths
([#759](#759))
([f27390c](f27390c))


### Performance Improvements

* **server,web:** one point query per hex refresh for both cell sizes
([#755](#755))
([78868fc](78868fc))


### Code Refactoring

* **web:** drop the name-redraw hold, MapLibre never closes a popup on
redraw ([#770](#770))
([ba9a9b0](ba9a9b0))


### Tests

* **web:** release the mocked resolver when the popup is open, not after
600 ms ([#762](#762))
([2abc959](2abc959))
* **web:** retry the zoomfade hover until a painted cell answers
([#767](#767))
([9331dfa](9331dfa))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

web: is the #271 name-redraw hold still needed on MapLibre?

1 participant