feat(settings): move Position Estimation to global Settings#3360
Conversation
Position estimation is a single global, cross-source batch job (issue #3271): one set of position_estimation_* keys, one scheduler pooling observations across all Meshtastic sources. It was rendered in the per-source Automation tab, which (a) implied per-source configuration, (b) mismatched the backend — whose status/run-now/save endpoints are gated by settings:read/settings:write, not the automation resource — and (c) was hidden for mqtt_bridge sources and depended on which source you opened. Relocate the section into the global Settings tab (SettingsTab, mode="global"), add it to GLOBAL_SECTIONS, gate it on hasPermission('settings','write') to match the backend, and remove it (and its import) from the Automation tab. Adds a static-source invariant test (both files are too large to render in jsdom) asserting the section is global-only, rendered + nav-linked in SettingsTab, permission-gated, and gone from the Automation tab. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review: Position Estimation Settings Migration
|
… Accuracy Two follow-ups addressing oversized estimated-position uncertainty circles. 1. Maximum Acceptable Accuracy setting. New global setting position_estimation_max_uncertainty_km (0 = no limit). When set, the scheduler passes it to recomputeAll, which discards any solved estimate whose uncertainty radius exceeds the ceiling rather than storing it — and deletes that node's stale estimate so a now-too-uncertain node doesn't keep an oversized circle. Surfaced in the global Settings → Position Estimation section with a km input and reflected in the last-run summary (N discarded). The dominant "huge circle" case is the 5km single-anchor default (DEFAULT_SINGLE_ANCHOR_KM); a 2-3km cutoff drops those low-confidence guesses. 2. Gate the estimated-position uncertainty circles behind the existing "Show Accuracy" map toggle (showAccuracyRegions) instead of "Show Estimated Positions". Now one control governs every accuracy overlay (precision-bits rectangles + estimated-position circles); the estimated markers stay under "Show Estimated Positions". Both are required so a circle never renders without its marker. Tests: scheduler passes maxUncertaintyKm through (incl. 0=no-limit default); service discards over-threshold estimates + clears stale rows, keeps within- threshold, and treats 0 as unlimited. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review: Position Estimation Settings Migration
|
|
Position estimation (issue #3271) overhaul covering relocation, a max-accuracy cutoff, and map-toggle gating. 1. Move to global SettingsPosition estimation is a single global, cross-source batch job (one set of
2. Maximum Acceptable Accuracy cutoffThe "huge circles" on the map are honestly-computed but large — dominated by the 5 km single-anchor default (
3. Gate uncertainty circles behind "Show Accuracy"The estimated-position uncertainty circles were tied to Show Estimated Positions. They're now gated by the existing Show Accuracy map toggle ( Verified: no unit/render bugTraced the pipeline — Testing
Notes
🤖 Generated with Claude Code |
…ngs page On the global Settings page the document scrolls on the window, but <body> computes to overflow-y:auto while not being the actual scroller (it's as tall as its content). SectionNav picked the first overflow:auto ancestor — body — and called body.scrollBy(), a no-op, so none of the section buttons scrolled. Require the chosen ancestor to be genuinely scrollable (overflow auto/scroll AND scrollHeight > clientHeight) and skip <body>/<html>, falling through to window scrolling. Per-source / MeshCore views keep using their real inner scroll panes. Verified live: every settings nav button now scrolls to its section (previously 0px movement). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Claude finished @Yeraze's task —— View job PR Review: Position Estimation Settings Migration
|
…#3361) - Bump version to 4.9.3 (package.json, package-lock.json, helm Chart.yaml, desktop/package.json, desktop tauri.conf.json). - CHANGELOG: 4.9.3 entry covering the Position Estimation move + max-accuracy cutoff + Show-Accuracy gating (#3360), Sources sidebar Edit-mode (#3355) and resizable width (#3356), the MQTT node-count fix (#3354), and the settings section-nav scroll fix. - New docs/features/position-estimation.md (registered in the VitePress Maps & Geography nav); cross-links + sections added to maps.md, global-settings.md, and multi-source.md. - New blog post announcing the Estimated Positions UI (feeds the in-app news). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

Relocates the Position Estimation settings out of the per-source Automation tab and into the global Settings UI.
Why
Position estimation (issue #3271/#3349) is a single global, cross-source batch job:
position_estimation_enabled/_frequency_hours/_lookback_hours),positionEstimationScheduler) pooling traceroute + neighbor observations across all Meshtastic sources.But it was rendered in the per-source Automation tab, which:
Implied per-source config — you reach that tab by opening a specific source (e.g. "RAK4631"), so editing the global estimator there was misleading.
Mismatched the backend permission model — the endpoints are gated by
settings, notautomation:GET /api/settings/position-estimation/status→settings:read(server.ts:6558)POST /api/settings/position-estimation/run-now→settings:write(server.ts:6568)POST /api/settings→settings:writeSo a user with
automation:readbut nosettings:writecould open the section and then hit permission errors on Save/Recalculate.Was hidden for
mqtt_bridgesources and depended on which source you opened — wrong for an app-wide feature. (This is the same root issue behind the closed fix(automation): add Position Estimation to the Automation section nav #3359, which only added a quick-link in the old, wrong location.)Change
PositionEstimationSectiontoSettingsTabunderGLOBAL_SECTIONS(settings-position-estimation), rendered + nav-linked in the global Settings tab (mode="global", reached via the Dashboard ⚙️ →/settings).hasPermission('settings', 'write')to match the backend (admin short-circuits).App.tsx.Testing
PositionEstimationSettings.move.test.ts) —SettingsTab.tsx/App.tsxare too large to render in jsdom, so it asserts: section is global-only (inGLOBAL_SECTIONS, notSOURCE_SECTIONS), rendered + nav-linked + permission-gated in SettingsTab, and gone from the Automation tab. 4 passed.tsc --noEmitclean.Notes
automation.position_estimation.*(still resolve correctly); renaming them tosettings.*would churn 9 locale files for no functional gain.🤖 Generated with Claude Code