fix(map): wire activeStyleJson into MapAnalysis and MeshCore BaseMap consumers - #4376
Conversation
…consumers #4360 lifted activeStyleJson into SettingsContext and wired it into DashboardMap/NodesTab, but MapAnalysisCanvas and MeshCoreMap never destructured it or passed styleJson to their <BaseMap> calls, so a custom Map Style silently never applied on those two surfaces. Closes #4374 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MB93JJ3aT85e6C7cvnGYsk
|
Claude finished @Yeraze's task —— View job PR Review: fix(map): wire activeStyleJson into MapAnalysis and MeshCore BaseMap consumersTasks:
SummaryThis is a clean, minimal, targeted fix. Both changes are correct and follow the established pattern exactly. MapAnalysisCanvas.tsx
MeshCoreMap.tsx
Observations
No Issues FoundThe change is correct, minimal, and well-described. No bugs, security concerns, or performance issues introduced. Visual verification on both map surfaces before merging is reasonable given no dev container was available during authoring. |
|
Correction to the PR description's test plan: on a second full run with complete output captured, the local failures are actually 12 test files / 9 tests (my first summary was based on a truncated tail of the first run and only showed Root cause confirmed: -- Authored by Roger 🤓 Generated by Claude Code |
Summary
Closes #4374.
#4360 lifted
activeStyleJsonintoSettingsContextand wired it intoDashboardMap.tsx/NodesTab.tsx, but two more<BaseMap>consumers were never updated to consume it, so a custom Map Style silently never applied on those two surfaces:src/components/MapAnalysis/MapAnalysisCanvas.tsx—activeStyleJsonwasn't destructured fromuseSettings(), and its<BaseMap>call had nostyleJsonprop.src/components/MeshCore/MeshCoreMap.tsx— same gap.Both get the same two-line fix
DashboardMap.tsxalready received: destructureactiveStyleJsonand passstyleJson={activeStyleJson ?? undefined}into the<BaseMap>call.Per the issue,
EmbedMap.tsxis intentionally excluded — it has noSettingsProviderin its bundle (documented in an existing comment atEmbedMap.tsx:258-261), soactiveStyleJsonisn't reachable there the same way; that would need a separate mechanism and is out of scope here.Test plan
npx tsc --noEmit— cleannpm run lint:ci— no in-repoFAILlinesMapAnalysisCanvas.test.tsx+MeshCoreMap.test.tsx— 24/24 passedsrc/server/mqttBrokerManager.test.ts("zero-hop injection" protobuf encode errors), unrelated to this change — confirmed pre-existing by running the same file againstorigin/main(this branch ismain+ this 2-file diff,git diff origin/main --statshows only the two map files touched).-- Authored by Roger 🤓
Generated by Claude Code