Skip to content

Show workflow activity in sidebar#255

Open
ymichael wants to merge 1 commit into
mainfrom
bb/clarify-running-workflow-sidebar-thr_pi68rqjrs6
Open

Show workflow activity in sidebar#255
ymichael wants to merge 1 commit into
mainfrom
bb/clarify-running-workflow-sidebar-thr_pi68rqjrs6

Conversation

@ymichael

Copy link
Copy Markdown
Owner

Summary

  • Add thread list activity counts for active background workflows and background subagents.
  • Show the workflow icon in sidebar status slots when the runtime is idle but a workflow is still running; keep the spinner for active runtime work.
  • Invalidate thread-list queries when background-task activity starts or settles.
  • Use a scoped CTE query for activity counts so the sidebar path does not scan all events or do per-row correlated latest-state lookups.

Validation

  • pnpm exec turbo run typecheck --filter=@bb/app --filter=@bb/server --filter=@bb/db --filter=@bb/domain --filter=@bb/server-contract
  • pnpm exec turbo run test --filter=@bb/db
  • pnpm exec turbo run test --filter=@bb/app
  • git diff --check

Perf notes

Measured against the local SQLite DB on this machine using a snapshot with ~148k events, 185 live threads, 12 visible sidebar threads, and 45 background-task events.

  • Before branch, sidebar thread list + latest-session lookup: ~0.10 ms p50.
  • Initial activity-query shape: ~3.6 ms p50, ~6.1 ms p95.
  • Optimized activity query in this PR: ~0.23 ms p50, ~0.53 ms p95 for visible sidebar threads.
  • Combined sidebar path after optimization: ~0.41 ms p50.

A live DB read while the app was writing measured ~0.38 ms p50, ~3.7 ms p95, and ~7.6 ms p99 for the optimized activity query.

@ymichael ymichael force-pushed the bb/clarify-running-workflow-sidebar-thr_pi68rqjrs6 branch from 8af11bd to 8cc8276 Compare June 19, 2026 03:39
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.

1 participant