Skip to content

Conversation

@danditomaso
Copy link
Collaborator

Description

This PR is a fix for a bug introduced in PR #963. If the RSSI/SNR infomation wasnt available the UI was displaying a 0 instead of the content. This PR fixes that bug that was introduced.

Related Issues

Fixes bug from PR#963

Changes Made

  • Changed message.hops && to message.hops != null so that 0 won't render as text

  • Improved readability: Extracted the complex conditional logic into a messageMetadata variable using clear if statements

  • The JSX now just uses {messageMetadata} instead of nested && and || operators

    The logic is now clear and easy to follow:

    • If hops exists, show hops info
    • Otherwise, if SNR and RSSI exist, show that info
    • Otherwise, show nothing

Testing Done

Manual

Screenshots (if applicable)

BEFORE
Screen_Shot_2025-12-01_at_3 59 32_PM

AFTER:

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)

@vercel
Copy link

vercel bot commented Dec 2, 2025

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

A member of the Team first needs to authorize it.

@danditomaso danditomaso changed the title fix(ui): Fix for rssi/snr pr fix(ui): Fix for rssi/snr Dec 2, 2025
@danditomaso danditomaso closed this Dec 2, 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.

1 participant