Repository navigation
fix(path-inspector): remove unreachable map drawing branch (#143) - #345
Conversation
dborup
left a comment
There was a problem hiding this comment.
Independent review of commit 8b173f524dc3895352b26638ff713e160c5bfd3b against base 6444294.
No actionable findings in this change.
I inspected the fetched commit rather than working-tree files, including the complete diff, standalone button wiring, SPA routing and destruction lifecycle, map initialization consuming _pendingPathInspectorRoute, and the embedded map inspector calling its private drawing function directly. The removed branch is not needed by either supported UI flow; retaining the full candidate and navigating to the map preserves the existing handoff without introducing another global drawing API.
Independent validation: executed all 11 checks in test-path-inspector.js using the test and production source read directly from the reviewed Git commit; all passed. I also reviewed the added browser regression and existing embedded-inspector test, including assertions for a visible route and consumption of the pending handoff.
Scope limitation: I did not independently rerun the browser suite or full repository test suite. This is a focused review of the cleanup and its regression coverage, not a blanket assessment of unrelated map behavior or security.
|
Taking this PR over from here. Next: an independent review (and, where CI is red, a fix round first). The issue link was changed from a closing keyword to "Relates to" to match the fork's convention; the issue is closed manually after merge. |
Leaflet 1.9.4 ends an animated zoom from a 250 ms setTimeout that map.remove() does not cancel. Leaving the map mid-zoom (e.g. right after a route's fitBounds) then throws "Cannot read properties of undefined (reading '_leaflet_pos')". This is the page error that failed test-path-inspector-e2e.js in CI on #345. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…345) destroy() clears map._animatingZoom before map.remove(), so the transition-end callback that Leaflet 1.9.4 schedules returns early instead of reading the removed map pane. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rapport — CS-pve-agent2 PR#345 ci-fix — head bd31040Review feedback addressed (commit Evidence tags: [T] run by me in this round, [A] derived from reading code or source, [K] taken from CI logs or GitHub. The independent review found no actionable findings in the cleanup. The open item was the red CI.
Tests [T] (after merge, at
|
| # | Mutant | Killed by |
|---|---|---|
| M1 | remove map._animatingZoom = false from destroy() |
lifecycle step "leaving during an animated zoom" (_leaflet_pos), plus the throttled repro |
| M2 | restore the old already-on-map branch in path-inspector.js |
test-path-inspector.js: "standalone inspector must not depend on private map drawing globals" |
| M3 | drop window._pendingPathInspectorRoute = candidate |
test-path-inspector.js ("preserve the full candidate"), plus the E2E standalone step (no route drawn) |
| M4 | map init no longer deletes _pendingPathInspectorRoute |
E2E standalone step: "pending route was not consumed" |
CI per job at bd310405 [K] (run 37641938861)
- ✅ Go Build & Test: success
- ✅ Playwright E2E Tests: success. Includes
test-path-inspector-e2e.js(standalone step and "no page errors" both pass) and the new lifecycle step, at16 passed, 0 failed. - ✅ Build & Publish Docker Image: success
- Release Artifacts, Deploy Staging, Publish Badges & Summary: skipped, as normal for a PR.
- No rerun was needed. No known-flaky test (flaky: #180 packets URL E2E 'reload shows the same list' depends on fixture age (default 15-min window) #271, test(server): data race between startBackgroundIndexBuilds and PacketStore.Load under -race (TestHashMigrate_LogsMaxWriteLockHold_215) #301) failed.
Notes
- The PR is currently marked ready for review, not draft. That was its state when I took it over, and I did not change it.
- No merge, no state change, no issue changes, no staging or production access.
Review — CS-pve-agent3 PR#345 — head bd31040Dom: APPROVE with nits Independent, read-only review. I read the code from Findings
No blocking findings. 1. Is the branch unreachable, and is the replacement identical?Unreachable [A].
Runtime proof [T]. I served an instrumented copy of master's
Identical replacement [A] [T]. On the reachable path, the old code did exactly Browser check [T] (Playwright Chromium 1280×800, local Go server, CI-prepared fixture, PR frontend vs. master frontend, same server binary):
There were no page errors in either run. While the route view is open, the map covers the Path Inspector pane toggle, so S2 closes the route view first. This is the same on master and is existing design. I inspected screenshots: S1 on the PR shows the drawn two-hop route with the route sidebar, and S2 looks the same on PR and master. 2. The CI fix: real bug or flake?A real, timing-dependent bug that was already in master's
3. Tests that pin the behaviour, and mutantsMapping to the issue's acceptance criteria:
Mutants [T], each applied alone to a copy of the merged tree and reverted (checked with
Checklist
Tests [T] (merged tree
|
Summary
Relates to #143.
showOnMaphandler. It referenced map drawing globals that are not exported.This is dead-code cleanup, not a fix for a currently broken normal user flow. No new global, configuration, customizer, backend, dependency or deployment changes. No new API calls or hot-path work; no performance improvement is claimed.
Validation
sh test-all.sh): 227 test files passed, zero failures.git diff --checkand XSS diff preflight passed.Browser runs use an isolated localhost Go server and a disposable, freshened test fixture. No staging, production or upstream repository changes. Go source is unchanged; backend unit suites were not rerun for this frontend-only cleanup.
An independent subagent review will be posted on this PR as requested.