Repository navigation
Closed
Labels
area:uiWeb/desktop UI and copyWeb/desktop UI and copybugSomething isn't workingSomething isn't working
Description
What is wrong
Two costs the archived section still has when it has nothing to show (plugins/tree/client.js, added by #34 / f20cfa37).
- An empty section still draws the sidebar's separator. The slot host wraps every
flybot.sidebar.sectionentry indiv.bt-flybot-section(core/src/client/flybot-slots.js:113-116), and that class is styled unconditionally (:292):margin-top: 8px; border-top: 1px solid …; padding-top: 6px.ArchivedViewreturnsnullatclient.js:462whenbots.length === 0, which removes the header and the rows but not the wrapper. The reorganisation notice (:516) also renders nothing when it has none, so a fresh install draws two 1 px lines 8 px apart with nothing between them. Tree: a reachable Archived group in the sidebar, and one group for a concurrent burst #810's acceptance says "no header, no border, no empty group"; the third part does not hold, and the test renders the component alone — it has never rendered the slot wrapper. - The section re-fetches the roster every 10 s on top of the refresh that already runs.
makeArchivedSection(:485) installs its ownsetInterval(refresh, REFRESH_MS)withREFRESH_MS = 10000(:277), whileregisterStructure(:352) already callsflybot.bots()on the same interval. With both registered the roster is fetched twice per 10 s where once is enough.
Expected behaviour
An archived section with no archived Bots leaves no trace in the sidebar — no border, no margin, no padding — and, with both entries registered, the roster is fetched once per refresh tick. With archived Bots present the section looks and behaves exactly as it does today.
Acceptance
- A test renders the slot host (
FlyBotSections/ the sidebar path), not the component on its own, with an entry whose component returnsnull, and asserts no visible separator: either no wrapper element is produced, or the wrapper matches:emptyand its computed style isborder-top: 0,margin-top: 0,padding-top: 0. It fails on today's code and passes after the fix. - The same test or a sibling renders the archived entry with
N > 0and asserts the headerArchived (N), the rows, and one separator are present (the fix must not hide a section that has content). - Counting
flybot.bots()across one 10 s tick with both the structure entry andflybot-tree-archivedregistered: exactly one call (today two). Rows still update after anarchivedfield change and afterbot.removed, and an expanded section stays expanded across a tick. - With N = 0 nothing is drawn at all; with N = 1 the header reads
Archived (1). npm testincoreandplugins/treegreen;plugin-importsand thearch-docscheck green.
Kill conditions
- Hiding the wrapper with
display: nonewhenever it is empty while also hiding a wrapper that has rows — the rule must key on emptiness, not on the section id. - Removing the wrapper for every section, which breaks the spacing of sections that do have content.
- Fixing the border in the tree's own CSS while the host rule stays unconditional: the next null-rendering section draws the line again.
- "Fixing" the duplicate fetch by lengthening the interval or by dropping the field/removal updates.
- Touching Tree reorg must MOVE/reparent bots; never rename to 归档- and recreate #452's
include()or moving archived Bots back into the Bot list.
Out of scope
- The reorganisation notice's content, Undo and Dismiss.
- The optional
flybot-treesection at:126(sidebarSection: trueonly). - The reorg notice's own null state: same wrapper problem, fixed by the same host rule; no separate change to that component.
Metadata
Metadata
Assignees
Labels
area:uiWeb/desktop UI and copyWeb/desktop UI and copybugSomething isn't workingSomething isn't working
Activity
Birfy commentedon Oct 23, 2026
Written-by: Dev4
Claiming #818. Branch:
fix/818-empty-section-and-single-roster-readonBirfy/FlyBot, cut from mainf5f20b01. PR opens next; the six-section body goes there.Document the bundle's empty section-wrapper rule (#818)
Stop an empty sidebar section drawing a border (#818)
Draw a group's own header until its first message (ThinkFlowLab#998) (T…