Skip to content

fix(web): keep standing bots listed when a scheduled task binds them; collapsible bot tree - #199

Merged
nullStack65 merged 1 commit into
release/native-0.1.10from
fix/bot-sidebar-drop-collapse
Nov 24, 2026
Merged

nullStack65 merged 1 commit into
release/native-0.1.10from
fix/bot-sidebar-drop-collapse

Conversation

@nullStack65

@nullStack65 nullStack65 commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Bug

Standing bots (CEO, CTO, CoS) vanished from the sidebar, which also flattened the Shared Bots tree because their children's parents were gone.

Root cause: isSystemScheduledThread (apps/web/src/components/Sidebar.logic.ts:1492, called from Sidebar.tsx:1249 and placeSystemScheduledThreads) treated any thread in scheduledThreadKeys as a System-shelf thread. A fresh-session scheduled task can bind a standing bot's own thread, so once those tasks ran after app start the bot was removed from the founder list before splitStandingThreads / partitionBotGroups saw it. Verified in the live renderer: the scheduled-key set holds exactly CEO, CTO and CoS, and not CFO or Product Designer, which still showed. It was not a shell snapshot or update problem; the shells stayed present and unchanged.

Fix: a thread with a standing persona goes to the System shelf only via the sys:daemon role, never via scheduled-task binding.

Feature

The bot tree is collapsible. A chevron on any bot with reports folds its subtree, and each group header (My Bots, Shared Bots) folds the whole group. Both are aria-expanded buttons, rows stay one line, and state persists in uiStateStore as botCollapsedById.

Tests

  • Sidebar.logic.test.ts: standing bots stay listed after a scheduled task binds them (fails without the fix, mine: [], shared: []).
  • botOrgTree.test.ts: visibleBotRows. uiStateStore.test.ts: setBotCollapsed and persistence.
  • Typecheck, lint on touched files, knip and fmt pass.

Also fixed two lint errors that already existed in SidebarBotsGroup.tsx (needed to commit through the hook).

Deploy: fleet

🤖 Generated with Claude Code

… thread; collapsible bot tree

A fresh-session scheduled task that binds a standing bot's own thread put that thread in
scheduledThreadKeys, so isSystemScheduledThread moved it to the System shelf before the bot
groups saw it. CEO, CTO and CoS vanished (and the org tree went flat) once their scheduled tasks
ran after app start. A thread with a standing persona now only goes to the System shelf by the
sys:daemon role.

Also make the bot tree collapsible: a chevron on any bot with reports folds its subtree, and each
group header (My Bots, Shared Bots) folds the group. State persists in uiStateStore as
botCollapsedById.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nullStack65
nullStack65 merged commit 312f32b into release/native-0.1.10 Nov 24, 2026
7 of 11 checks passed
@nullStack65
nullStack65 deleted the fix/bot-sidebar-drop-collapse branch November 24, 2026 04:57
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.

2 participants