-
Notifications
You must be signed in to change notification settings - Fork 29
web: render node positions over time #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 415a6a7fc5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (typeof mapCleanup === 'function') { | ||
| mapCleanup(); | ||
| mapCleanup = null; | ||
| } | ||
| mapCleanup = await initializeNodeDetailMapPanel(content, reference, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent map panel from moving after overlay closes
There is no request-token check after awaiting initializeNodeDetailMapPanel, so if the user closes the overlay while the positions fetch is still in flight, the map panel can be moved into the hidden overlay after close() has already run. Because mapCleanup gets assigned after the close, the cleanup never executes and the main map stays detached until another action resets it. This shows up when /api/positions/... is slow and the user closes the overlay quickly; adding a token/visibility guard after the await (or immediately cleaning up when stale) would avoid leaving the map panel in the wrong place.
Useful? React with 👍 / 👎.
| const layerGroup = leaflet.layerGroup().addTo(map); | ||
| if (layers?.markersLayer && typeof layers.markersLayer.clearLayers === 'function') { | ||
| layers.markersLayer.clearLayers(); | ||
| } | ||
| if (layers?.neighborLinesLayer && typeof layers.neighborLinesLayer.clearLayers === 'function') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Restore shared map layers after clearing for history view
The node-detail map clears the shared markersLayer (and related neighbor/trace layers) to render position history, but the cleanup handler only removes the temporary layer group and resets view; it never re-renders the cleared layers. If auto-refresh is disabled or slow, closing the detail view leaves the main dashboard map empty until the next manual refresh. This happens because the shared layers are cleared unconditionally here; consider rebuilding the layers on cleanup or isolating the history markers in a separate overlay so the shared layers are preserved.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
ref #522