Skip to content

tree: a Bot retired by archive_bot does not reach the Archived section until the next poll #2450

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: d879114220934e53b59a6491683beec2
Branch: dev/5-archived-retired
Base: 16d1645
At: 2026-11-04T17:56:19Z

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Dev-5

Reproduction (clean base 16d16456, plugins/tree unit test)

archive_bot hides a retired Bot from the default list (bot.hidden), so the sidebar's Archived section (plugins/tree/client.js:526 makeArchivedSection, order 88) is the only way back to its chat. That section's field-change subscription lists archived, parent, treeRole and removed, but not retired (plugins/tree/client.js:537), although docs/subsystems/tree.md:121 states the shared roster feed refreshes on archived, parent, treeRole, retired and idle for both consumers. The structure entry has retired (client.js:391); the archived list is the one that does not.

So right after a Main Bot retires a Bot, the open sidebar keeps drawing the old Archived (N) header and the old rows until the next 10 s roster poll (REFRESH_MS), and with the section collapsed the user does not see that the retired Bot is reachable at all until then.

Probe with a component harness (node --import ./test/resolve.mjs --test test/archived-retired-refresh.test.js) at 16d16456:

not ok 1 - a retired Bot reaches the Archived section on the change, not on the next poll
  a retired change refreshes the archived list
  0 !== 1
# tests 1 / pass 0 / fail 1

The two controls in the same test (archived and parent each call feed.refresh() once) pass at the base, so the subscription is real and only the retired key is missing.

Expected

A retired field change refreshes the archived list immediately, like the structure entry already does, matching docs/subsystems/tree.md:121.

Scope

plugins/tree/client.js (one condition), plugins/tree/test/archived-retired-refresh.test.js. No doc change needed: the doc already states the behavior; the code catches up with it.

Duplicate check

Open issues searched for archived in title: none. Tree issues open at 16d16456 are #2430 (mine), #6/#577/#450/#1218/#1748 (enhancements, hold or needs-human, unrelated).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions