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:
|
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