"Online only" takes the offline bots off the sidebar (#948) - #949
Merged
Merged
Conversation
The box only reached /api/filelists/search?online=1, which is asked only while a search term is typed, so with the filter empty ticking it changed nothing on screen. The sidebar now leaves out a bot known to be away (online === false) and redraws at once when the box changes. Kept: bots whose presence is unknown, our own lists, and the open bot. Only the row is left out; state.filelistsBots still holds every bot. tests/test_online_only_filters_the_sidebar.py: source guards plus the real hiddenByOnlineOnly() run under node (skipped where node is missing). Mutation-checked five ways. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ilters-the-sidebar # Conflicts: # docs/UPDATES-PUBLIC.md # docs/UPDATES.md # web/app.js
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.
Closes #948.
Ticking Online only beside the List Browser's filter did nothing to the sidebar. The box only reached
/api/filelists/search?online=1, and that request is made only while a search term is typed (loadFilelists()builds the browse URL without it), so with an empty filter the box changed state and nothing else. Reported from the operator's own dashboard: ticked, offline (red) bots still listed.Now: the sidebar leaves out a bot known to be away and redraws the moment the box changes, not on the next four-second poll.
online === falsegoes.null(the bot has not finished joining, membership mirror still empty) stays - it is not known to be offline.state.filelistsBotsstill holds every bot, since the fetch box, the tabs andentriesForNick()look bots up there.app.js); no daemon change, no new setting.Tests:
tests/test_online_only_filters_the_sidebar.py(9) - source guards, plus the realhiddenByOnlineOnly()(with the realprimaryEntry,isOwnSource,nickOfSource) run under node, skipped where node is missing. Mutation-checked five ways (unknown presence hidden too, own lists hidden, the open bot hidden, the box ignored, ticking not redrawing) - each fails a test.Full suite 6707 OK. Independent of #944; both add a changelog entry under Unreleased, so whichever merges second needs the usual changelog merge.
Not yet seen in a browser - to be tried on the operator's own dashboard first.
🤖 Generated with Claude Code