Repository navigation
fix(webui): keep a row while any of its hide_zero fields is visible - #3727
Merged
nicolargo merged 1 commit intoSep 10, 2026
Merged
Conversation
hide_zero is decided per field but applied per row, and the two front ends
read that per-field verdict in opposite directions.
msg_curse drops a disk only when *all* of its hide_zero_fields are hidden:
if all(self.get_views(item=..., key=f, option='hidden') for f in self.hide_zero_fields):
continue
plugin-diskio.vue and plugin-network.vue keep a row only when *all* of them
are visible:
return (
(!readBytesRate || readBytesRate.hidden === false) &&
(!writeBytesRate || writeBytesRate.hidden === false)
);
Those agree while both fields say the same thing, and disagree the moment
one moves and the other does not -- a disk that has only ever been read, an
interface that has only ever received. Curses shows it; the browser drops
it entirely.
Use the same rule as msg_curse in both components.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
hide_zerois decided per field but applied per row, and the two front ends read that per-field verdict in opposite directions.msg_cursedrops a row only when all of itshide_zero_fieldsare hidden:plugin-diskio.vueandplugin-network.vuekeep a row only when all of them are visible:The two agree while both fields say the same thing, and disagree the moment one moves and the other does not — a disk that has only ever been read, an interface that has only ever received. Curses shows the row; the browser drops it entirely, with no indication that anything was filtered.
Measured
DiskioPluginwithhide_zero=Trueandhide_threshold_bytes=1024, fed an idle sample then a read-only one (2048 B/s read, 0 B/s write). The views dict that both front ends then read:Both predicates run against exactly that payload:
msg_curse(all(...hidden)→ drop).vuebefore.vueafterThe change
Use the same rule as
msg_cursein both components:&&→||, so a row survives while any of its fields is still visible. The existing!rate ||guard for a row that has stats but no view entry yet is untouched.Tests
The repo has no runner for the WebUI, so
tests/test_hide_zero_row_visibility.py(5 tests) pins the rule on the side that can be tested here — including a test that first asserts the two fields really do disagree, so the rest cannot pass vacuously.Mutation — turn the curses
all(...)intoany(...), i.e. give it the reading the.vuehad: 2 fail, exactly the read-only and write-only cases.tests/test_plugin_diskio.py,tests/test_plugin_network.py,tests/test_lazy_views.py— 86 passed.ruff checkandruff format --checkclean.One note, not fixed here
get_views()answers'DEFAULT'for a key it cannot find, and'DEFAULT'is truthy, soall(...)treats a missing view as hidden while the.vueguard treats it as visible. That only bites in the window where a disk appears in stats before it appears in views, and fixing it is a different change from this one — happy to follow up if you want it.Independent of #3725 and #3726.