Skip to content

Add "Exclude MQTT" filter to the Nodes list#1

Merged
VictorioBerra merged 3 commits intomainfrom
copilot/add-exclude-mqtt-filter
Mar 17, 2026
Merged

Add "Exclude MQTT" filter to the Nodes list#1
VictorioBerra merged 3 commits intomainfrom
copilot/add-exclude-mqtt-filter

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 17, 2026

Nodes relayed via MQTT are already tracked in Node.viaMqtt and surfaced in the UI ("via MQTT" label), but there was no way to filter them out of the node list. This adds an "Exclude MQTT" toggle alongside the existing node filters.

Changes

Filter infrastructure

  • UiPreferencesDataSourceexclude-mqtt DataStore key, excludeMqtt StateFlow, setExcludeMqtt()
  • NodeFilterPreferences — exposes excludeMqtt flow, adds toggleExcludeMqtt()
  • NodeFilterState — new excludeMqtt: Boolean = false field

ViewModel wiring

excludeMqtt is fed directly as a third input into the nodeFilter combine rather than going through NodeFilterToggles. This keeps filterToggles as the original clean 5-flow combine (the typed-lambda combine overload caps at 5 flows) and avoids chaining:

private val nodeFilter: Flow<NodeFilterState> =
    combine(
        _nodeFilterText,
        filterToggles,
        nodeFilterPreferences.excludeMqtt,
    ) { filterText, filterToggles, excludeMqtt ->
        NodeFilterState(..., excludeMqtt = excludeMqtt)
    }

Filter logic

GetFilteredNodesUseCase adds a post-processing step: .filter { if (filter.excludeMqtt) !node.viaMqtt else true }

UI

  • NodeFilterTextField — new excludeMqtt/onToggleExcludeMqtt params; checkbox added to the filter dropdown
  • Both NodeListScreen (Android) and DesktopAdaptiveNodeListScreen pass the new params through

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add exclude MQTT filter to Nodes view Add "Exclude MQTT" filter to the Nodes list Mar 17, 2026
Copilot AI requested a review from VictorioBerra March 17, 2026 14:25
@VictorioBerra VictorioBerra marked this pull request as ready for review March 17, 2026 14:30
Copilot AI requested a review from VictorioBerra March 17, 2026 14:36
@VictorioBerra VictorioBerra merged commit d5cb846 into main Mar 17, 2026
@VictorioBerra VictorioBerra deleted the copilot/add-exclude-mqtt-filter branch March 17, 2026 14:47
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.

2 participants