Skip to content

"Online only" takes the offline bots off the sidebar (#948) - #949

Merged
Ninja-FSE merged 2 commits into
mainfrom
fix/948-online-only-filters-the-sidebar
Sep 25, 2026
Merged

Ninja-FSE merged 2 commits into
mainfrom
fix/948-online-only-filters-the-sidebar

Conversation

@Ninja-FSE

Copy link
Copy Markdown
Owner

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.

  • Only online === false goes. null (the bot has not finished joining, membership mirror still empty) stays - it is not known to be offline.
  • Never removed: our own lists, and the bot whose list is open (the table would show a list the sidebar has no row for).
  • Only the row is left out; state.filelistsBots still holds every bot, since the fetch box, the tabs and entriesForNick() look bots up there.
  • A soft reload can hand the box back ticked, so the state starts from what is on screen.
  • Web file only (app.js); no daemon change, no new setting.

Tests: tests/test_online_only_filters_the_sidebar.py (9) - source guards, plus the real hiddenByOnlineOnly() (with the real primaryEntry, 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

Ninja-FSE and others added 2 commits September 25, 2026 06:05
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
@Ninja-FSE
Ninja-FSE merged commit eb214ba into main Sep 25, 2026
9 checks passed
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.

"Online only" in the List Browser does nothing to the sidebar unless a search term is typed

1 participant