Skip to content

A bot's slots, queue and speed show under it when you click it (#943) - #944

Merged
Ninja-FSE merged 2 commits into
mainfrom
fix/943-slots-line-only-under-the-clicked-bot
Sep 25, 2026
Merged

Ninja-FSE merged 2 commits into
mainfrom
fix/943-slots-line-only-under-the-clicked-bot

Conversation

@Ninja-FSE

Copy link
Copy Markdown
Owner

Closes #943.

#932 wrote each online bot's advertised free slots, queue and speed on its own sidebar row. It sat in the same flex row as the name, so on a narrow sidebar it squeezed the nick out (rows with the line and no readable name), and on every row at once it was a wall of small print.

Now: the line is out of the layout until its bot is clicked, then sits on a line of its own under the row, lined up with the name. Clicking another bot closes the first one's line; clicking the open one closes it. Still only online bots have a line at all.

  • Any row can be clicked for its line, including a bot whose list we have not fetched (its click still puts the nick in the fetch box) - the marking comes before that early return, since its slots are what you want before deciding to fetch.
  • state.filelistsInfoNick holds the open bot because the rows are rebuilt every poll; botRow() reads it back. Rows with a line carry aria-expanded.
  • .bot-row wraps only so the full-width line can drop below the name; gap: 2px 10px keeps it tight.
  • Web files only (app.js, style.css): no daemon change, no new setting.

Tests: tests/test_the_slots_line_shows_only_under_the_clicked_bot.py (10) - stylesheet and source guards, plus the real click fragment and markFilelistsInfoBot() run under node against stub rows (skipped where node is missing). Mutation-checked four ways: shown by default, a click that never closes, the marking after the early return, a redrawn row forgetting the open bot - each fails a test.

Two older guards in test_list_browser_groups_a_bots_lists.py read the click handler through a fixed 2200-character window that the new lines pushed past; widened to 3000. My own line avoids the substring the second one looks for, so that guard still checks the filter toggle rather than passing on mine.

Checked in node and in review, not yet seen in a browser - the operator's own dashboard is the real check.

Full suite 6708 OK.

🤖 Generated with Claude Code

#932 wrote each online bot's advertised slots line beside the name in the
sidebar row, where it squeezed the nick out on a narrow sidebar and, on every
row at once, was a wall of small print. Now it is out of the layout until its
bot is clicked, then sits on a line of its own under the row. Clicking another
bot closes the first; clicking the open one closes it.

- state.filelistsInfoNick holds the open bot, since the rows are rebuilt on
  every poll; botRow() reads it back
- the marking comes before the not-held early return, so a bot we only saw
  advertising can be clicked for its slots before deciding to fetch
- .bot-row wraps only so the full-width line can drop below the name

tests/test_the_slots_line_shows_only_under_the_clicked_bot.py: stylesheet and
source guards, plus the real click fragment run under node against stub rows
(skipped where node is missing). Mutation-checked four ways.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@chchatzop

chchatzop commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewed. Looks good to me. I checked the one layout risk in flex-wrap: wrap: .bot-row-name is flex: 1 with overflow: hidden, so its minimum width is 0 and a long nick won't push the count or badges onto a second line. Only the 100%-wide line wraps. The line is still set with textContent.

One small thing, not blocking. The marking runs before every early return, including the filter branch, where a click means "include/exclude this bot's matches". So while filtering, excluding a bot also opens its slots line, and including it again closes the line. If you'd rather keep that click to one job, guard the three lines with if (!(state.filelistsFilter || "").trim()) { ... }. They stay in the same place, before the held === "no" return. Or leave it as is if the line is welcome there too.

…943)

botRow() appends the count after the slots line; a full-width flex item that
wraps takes its own line in markup order, so the count fell to a third line.
order: 1 puts the line after everything else. Test added and mutation-checked.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Ninja-FSE
Ninja-FSE merged commit b4cad31 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.

The slots/queue/speed line in the List Browser should show only under the clicked bot

2 participants