fix(auto-favorite): never auto-favorite CLIENT/CLIENT_MUTE on CLIENT_BASE locals (#3774)#3786
Conversation
#3774) Update the Auto Favorite section description to read "Automatically favorite eligible nodes for zero-cost hop and prioritized routing." Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SJPe6J5vKrcbwzt6vCdtrt
|
Claude finished @Yeraze's task —— View job PR Review
SummaryThis is a minimal, clean copy-only change. The description text on line 169 was updated from:
to:
Code quality: The change is correct and well-scoped. The updated text is grammatically sound and accurately reflects both benefits of favoriting nodes in Meshtastic. Potential issues: None. The i18n key ( Test coverage: The PR notes that the existing test only checks the "Read more" link URL, not this description string. That's accurate — no test changes are needed for a UX copy tweak, though it would be reasonable to add an assertion for this string if test coverage of copy is desired in the future. Performance / Security: No concerns — this is a pure string change. Verdict: LGTM. The change is minimal, accurate, and low-risk. |
…T_BASE tip (#3774) Apply the ZERO_HOP_RELAY_ROLES filter for every eligible local role, not just ROUTER/ROUTER_LATE. Previously a CLIENT_BASE local fell through to an unconditional `return true`, auto-favoriting every 0-hop neighbor including CLIENT and CLIENT_MUTE nodes that never relay. Add a CLIENT_BASE-only info bubble suggesting operators manually favorite their nearby CLIENT/CLIENT_MUTE nodes, since that prioritization is a deliberate per-node choice rather than something Auto Favorite should do. Revert the description copy back to "zero-cost hop routing" — the feature now only covers zero-cost hop relay roles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SJPe6J5vKrcbwzt6vCdtrt
|
Claude finished @Yeraze's task —— View job PR Review
SummaryThis PR is broader than the title suggests. Beyond the description copy tweak, it includes a substantive logic fix: CLIENT and CLIENT_MUTE nodes are now excluded from auto-favoriting, and a new
|
…separate Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SJPe6J5vKrcbwzt6vCdtrt
|
Claude finished @Yeraze's task —— View job PR Review
SummaryThis PR correctly fixes issue #3774 by excluding
|
|
Thanks for the review — addressing the three points:
|
* chore(release): bump version to 4.12.0 Finalize 4.12.0 (from 4.12.0-rc2): package.json, package-lock.json, desktop/package.json, desktop/src-tauri/tauri.conf.json, helm/Chart.yaml. Promote CHANGELOG [Unreleased] → [4.12.0]. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011JEaCGwY9Wz8jeV4e22GW4 * docs(4.12.0): document Automation Engine, MeshCore regions/scopes & UI additions Release-audit of every PR since v4.11.5 surfaced documentation gaps. Brings the docs site current with the 4.12.0 feature set: - New page docs/features/automation-engine.md (+ sidebar nav) for the node/ builder-based Automation Engine (#3653 et al). v-pre-wrapped so the {{ }} token syntax renders literally without breaking the VitePress build. - meshcore.md: new Regions/Scopes section (#3667 et al), channel unread indicators, heard-repeaters badge, per-message route line, byte counter, on-demand telemetry polling, Define Path editor, repeater DM-hidden behavior. - automation.md: corrected stale auto-favorite eligibility table (#3786/#3774). - maps.md: traceroute default-keyed channel routing + channel dropdowns (#3723). - map-analysis.md: rich multi-source node popups (#3692). - device.md: unmessagable-node DM-hidden behavior (#3760). Verified: vitepress build passes; tokens render literally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011JEaCGwY9Wz8jeV4e22GW4 * fix(migration): make migration 104 PostgreSQL channel_database rebuild atomic Release-audit (PR #3753) flagged the tombstone-exhaustion rebuild path as a data-availability risk: it DROPs the live channel_database and RENAMEs a fresh copy into place, but the migration runner wraps each migration's statements in no transaction, so each DDL auto-commits. A crash/connection drop in the DROP→RENAME window would leave the database with no channel_database — and the migration's own idempotency check (`'channel_database'::regclass`) would then throw "relation does not exist" on the next startup, blocking recovery. Wrap the rebuild in BEGIN/COMMIT with ROLLBACK on error. PostgreSQL DDL is transactional, so any failure now rolls back to the original table intact. (Channel keys/PSKs were already copied before the drop, so this hardens the narrow availability window rather than fixing data loss. The path only fires at ≥1500 attnum tombstones — 1500+ restarts on the old migration 021 bug — so it's rare, but the blast radius warranted the fix.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011JEaCGwY9Wz8jeV4e22GW4 --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Fixes #3774. The Auto Favorite feature was favoriting every 0-hop neighbor when the local node's role is
CLIENT_BASE— includingCLIENTandCLIENT_MUTEnodes that never relay traffic. Zero-cost hops only apply when the relay isROUTER,ROUTER_LATE, orCLIENT_BASE, so favoriting non-relay roles provides no routing benefit and undermines the selective intent of theCLIENT_BASErole.Changes
src/server/constants/autoFavorite.ts): apply theZERO_HOP_RELAY_ROLESfilter (ROUTER / ROUTER_LATE / CLIENT_BASE) for all eligible local roles. Previously aCLIENT_BASElocal fell through to an unconditionalreturn true.CLIENTandCLIENT_MUTEtargets are now never auto-favorited regardless of the local role.AutoFavoriteSection.tsx): when the local node isCLIENT_BASE, show an info bubble — "For maximum benefits, you should manually Favorite your local nearby CLIENT and CLIENT_MUTE nodes." Prioritizing personal devices remains a deliberate, manual per-node action.getTargetDescriptionno longer claims CLIENT_BASE favorites "all 0-hop nodes".Tests
meshtasticManager.autoFavorite.test.ts:CLIENT_BASElocal +CLIENTtarget →false, added aCLIENT_BASE+CLIENT_MUTE→falseregression, and aCLIENT_BASE+CLIENT_BASE→truecase.Closes #3774
🤖 Generated with Claude Code