Skip to content

fix(mobile): never hide a working bot behind the Bots list's Show more - #52837

Merged
orca-remote-automation[bot] merged 2 commits into
mainfrom
orca-remote-automation/mobile-bots-cap-keep-working
Nov 30, 2026
Merged

orca-remote-automation[bot] merged 2 commits into
mainfrom
orca-remote-automation/mobile-bots-cap-keep-working

Conversation

@orca-remote-automation

@orca-remote-automation orca-remote-automation Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The phone's Bots cap from #52737 hid bots whose agents were working. It only kept the first 3 bots, bots that need you, and the open one. Bot order defaults to manual, so a busy bot at position 4 or later went behind "Show N more". With Hide bot workspaces on, that bot's workspaces only list under it, so they were hidden too.

  • Each drawn bot or group now carries live. It is true when the bot's own row, or any workspace it lists (nested ones included), is working or monitoring, or shows a needs-you dot (asking, failed, unconfirmed). For a group, it is true when its member-session dot is working or needs you. A bot on a computer that is down is never live: its last read isn't live work.
  • The cap keeps the first 3, plus every entry that needs you, is live, or holds the open row, in their usual order. "Show N more" counts only the rest.
  • The swap between the capped list and the full list (phone vs sidebar/wide layout) moved into drawnHostBotSections, so it can be tested on its own.
  • Unchanged: 3 or fewer bots, search (all matches), the iPad sidebar and wide layouts, the header, the count and statuses.

Checked against how comparable products handle this.

Testing

  • pnpm check:changed passed (18 checks). pnpm --dir mobile typecheck and typecheck:tests pass.
  • New mobile/src/bots/host-bots-cap.test.ts runs the real buildHostBotSections. It covers:
  • Rendered the real components with React Native Web, at 390×844 and 320×568, in dark and light. With 30 bots, Fix PTY listener leak, use local restty with selection support #5 and Add repo-added notifications #19 working: the list shows 3, then Builder and Crash Scanner 2 (Working), then "Show 25 more". 30 idle bots are unchanged (3 plus "Show 27 more"). 3 bots, search, and the sidebar path are unchanged. There is no horizontal overflow at 320 px.

Performance

This is reasoning over the diff; nothing here was measured.

  • drawHostBotEntries now reads getWorktreeDotStatus for each bot's home row and listed workspace rows. That is O(listed rows), once per build, under the same memo as before. The direct workers were already read for the bot's dot; nested lines are the only new reads.
  • The cap reads one boolean per entry instead of scanning group items.
  • drawnHostBotSections does the same single shallow copy as before.
  • No new RPCs, subscriptions, polling or timers. The list is still a virtualized SectionList.
  • Effect: if every bot is working, the cap keeps them all, which is the same as before the cap.

Risk

Low. The change only adds entries to the capped phone list. It never removes any, and the full section that drives counts and statuses is unchanged. A revert needs no migration.

Visual proof

From left: working bots kept at 390 px dark, light, 320 px dark, and 30 idle bots (unchanged).

working bots kept

The phone's Bots cap kept bots that need you or hold the open row, but a
bot at position four or later whose agents were working went behind
"Show N more" with its workspaces, which Hide bot workspaces lists only
under it. The cap now also keeps every bot or group with live work, and
Show more counts only the rest.
@orca-remote-automation
orca-remote-automation Bot merged commit f91f251 into main Nov 30, 2026
28 of 29 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.

0 participants