Skip to content

Fix default filter behaviour#820

Merged
danditomaso merged 1 commit into
meshtastic:mainfrom
philon-:fix-668
Sep 1, 2025
Merged

Fix default filter behaviour#820
danditomaso merged 1 commit into
meshtastic:mainfrom
philon-:fix-668

Conversation

@philon-

@philon- philon- commented Aug 31, 2025

Copy link
Copy Markdown
Contributor

Description

This PR fixes #668 by adjusting filter default-boundary behaviour for SNR and voltage fields. Previously, default range boundaries were bounded and not open, resulting in nodes with <-20dB or >10dB SNR and >5V voltage to be excluded.

Related Issues

Fixes #668

Changes Made

  • Updated useFilterNode.ts to use open boundaries if range boundary is equal to default boundary.
  • Updated FilterControl with refactored labelContent component to show this by inserting "<" or ">" for relevant range boundaries.
  • Updated tests to check that boundaries are open when expected.

Testing Done

Updated automatic tests
Tested manually

Screenshots (if applicable)

Screenshot From 2025-09-01 00-01-41

Checklist

  • Code follows project style guidelines
  • Documentation has been updated or added
  • Tests have been added or updated
  • All i18n translation labels have been added (read
    CONTRIBUTING_I18N_DEVELOPER_GUIDE.md for more details)

Copilot AI review requested due to automatic review settings August 31, 2025 22:02
@vercel

vercel Bot commented Aug 31, 2025

Copy link
Copy Markdown

@philon- is attempting to deploy a commit to the Meshtastic Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes filter default boundary behavior where nodes with extreme values (SNR <-20dB or >10dB, voltage >5V) were incorrectly excluded from results. The fix implements open boundaries when filter values equal default boundaries, ensuring such nodes are included rather than filtered out.

Key changes:

  • Modified filter logic to use open boundaries when range boundaries equal defaults
  • Refactored FilterControl to use a unified RangeLabelContent component that displays boundary semantics with "<" and ">" indicators
  • Added comprehensive tests to verify open boundary behavior

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/web/src/components/generic/Filter/useFilterNode.ts Updated SNR and voltage filtering logic to use open boundaries when values equal defaults
packages/web/src/components/generic/Filter/useFilterNode.test.ts Added test suite covering default boundary semantics for lastHeard, SNR, and voltage filters
packages/web/src/components/generic/Filter/FilterControl.tsx Refactored to use unified RangeLabelContent component and improved code organization

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/web/src/components/generic/Filter/FilterControl.tsx
Comment thread packages/web/src/components/generic/Filter/FilterControl.tsx
@philon- philon- mentioned this pull request Aug 31, 2025
3 tasks
@vercel

vercel Bot commented Sep 1, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
web-test Ready Ready Preview Comment Sep 1, 2025 1:31am

@danditomaso danditomaso merged commit 01fa030 into meshtastic:main Sep 1, 2025
3 of 4 checks passed
Mictronics added a commit to Mictronics/meshtastic-web that referenced this pull request Sep 1, 2025
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.

[Bug]: Number of nodes mismatch

3 participants