Skip to content

Keep open health and route details through the startup theme refresh - #2488

Merged
efiten merged 3 commits into
Kpa-clawbot:masterfrom
n30nex:codex/theme-refresh-details-20261126
Nov 28, 2026
Merged

efiten merged 3 commits into
Kpa-clawbot:masterfrom
n30nex:codex/theme-refresh-details-20261126

Conversation

@n30nex

@n30nex n30nex commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2464. Home keeps the selected health card and any open packet journey when the startup theme arrives. Analytics keeps the selected route and refreshes its distances and map. A hop-filter change restores a route only if it remains visible.

Both pages reuse their original detail request, including one in flight. A failed Route Patterns list can retry on the next theme refresh. Leaving the page keeps the detail closed.

Rebased on 31aabf6b3 after #2446. Both pages now use master’s map teardown and tile-sync unregister helpers. The tests open each detail, trigger the delayed theme and navigate away. Reintroducing a duplicate helper made both cleanup assertions fail.

On the new base, the tests reproduced the lost Home card, lost route, and lost eligible filtered route. All 35 Chromium map-provider checks passed locally on the fix, including the cross-tab tile settings and six late-theme cases. The filter tests also exercise selected routes with no mapped coordinates. Mapped routes still check rendered tiles and unregister on teardown. Twelve related unit suites passed. Rebased regression run

@n30nex

n30nex commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Kent Beck Gate: NEEDS-WORK on e3a420fbd. The initial fix keeps both open details, but if the first Route Patterns list fetch fails, the next theme refresh leaves the error visible. I reproduced the prior version recovering on that refresh. I’m fixing recovery and adding committed browser checks for a selected route surviving or being excluded by a changed hop filter, and for an open Home packet journey surviving the refresh.

@n30nex

n30nex commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review feedback addressed (commit d45e8a3cb, tests in 5449a855f).

  1. A theme refresh retries a failed Route Patterns list. An in-flight request finishes normally.
  2. A changed hop filter keeps an eligible route and its map, and closes an excluded route. Both controls made one detail request.
  3. The Home test opens a packet journey before the theme arrives and verifies the same journey afterward.

Kent Beck Gate: PASS (test quality) on d45e8a3cb. All 30 map-provider browser cases passed locally.

@n30nex
n30nex marked this pull request as ready for review November 26, 2026 23:30
@efiten

efiten commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Thanks, the logic is right and the E2E red/green holds as described (30/30 on head, 4 fail on 7beed94a).

It needs a rebase on master: #2446 (03f5ee2b) landed in the same functions, with conflicts in public/analytics.js, public/home.js and tests/unit/test-secondary-map-tile-builder.js.

One trap in that rebase: master already has removeSubpathMap() (public/analytics.js:28) and removeMiniMap() (public/home.js), both of which also call __mcNodeTileSyncUnregister. This PR adds its own removeSubpathMap() (public/analytics.js:2402) without that call. In analytics.js the two merge without a conflict, and the later declaration wins, so the unregister from #2446 would silently stop running. Please drop this PR's two helpers, the if (_subpathMap) / if (miniMap) guards and the setTimeout guard in home.js, and use master's.

@n30nex
n30nex marked this pull request as draft November 27, 2026 21:53
@n30nex
n30nex force-pushed the codex/theme-refresh-details-20261126 branch from d45e8a3 to cfcbc72 Compare November 27, 2026 21:53
@n30nex

n30nex commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Review feedback addressed (commit dc5dd0c66).

  1. Rebased on 31aabf6b3. The implementation in 9124f7142 uses master’s Home and Analytics teardown helpers, including tile-sync unregister. The duplicate helpers and guards are gone.
  2. Browser checks now leave each refreshed detail and verify its map was unregistered. Reintroducing either duplicate helper failed that check.
  3. Routes without mapped coordinates also exercise selection and filtering. Mapped routes still check actual tiles. All 35 browser cases passed locally, including the four cross-tab cases.

Rebased regression

@n30nex

n30nex commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Kent Beck Gate: PASS (test quality) on dc5dd0c66. The selected Home card and routes disappeared on the rebased tests-only commit. Restoring either duplicate teardown helper made the browser catch a registered map after navigation. The final suite verifies mapped and unmapped routes, selection, request counts and cleanup. All 35 local Chromium cases passed. Final revision workflow

@n30nex
n30nex marked this pull request as ready for review November 27, 2026 22:36
@efiten
efiten merged commit 24286b6 into Kpa-clawbot:master Nov 28, 2026
17 checks passed
zfouts added a commit to zfouts/CoreScope that referenced this pull request Nov 29, 2026
Brings in Kpa-clawbot#2457, Kpa-clawbot#2490, Kpa-clawbot#2488, Kpa-clawbot#2500 and Kpa-clawbot#2455. Conflicts were two
added lines on each side: the eslint globals (frameHex/frameSize and
NeighborRank) and the deploy.yml E2E suite list (the privacy-on suite
and test-neighbor-rank-e2e.js); both kept. The leak test now requests
Kpa-clawbot#2457's /api/nodes/neighbor-rank, which serves no positions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.

Home health card and Analytics route detail close when the load-time theme refresh lands

2 participants