Repository navigation
feat(site/src/pages/AgentsPage/components): show a waiting subagent in the chat top bar - #127
Conversation
…n the chat top bar
A running subagent that waits for a free concurrency slot shows a
"Waiting for a free subagent slot" badge in its chat top bar. It reads
GET /api/v2/chats/fork/{root}/family behind fork-nested-subagents and
polls on its own, because the sidebar polls only while the root row is
expanded.
… ID between the sidebar and the top bar
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee2cc0a7f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…document the waiting status
|
@codex review
|
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
UI UAT on head e6dbd96 (dev server built from this head, A root spawned two workers. While worker-a held the family's only concurrency slot, the API reported: Playwright (Chromium) opened worker-b's chat page with the root collapsed in the sidebar (
After worker-a finished ( Negative check: worker-a's page, with worker-a no longer The only console errors were the dev setup's |
Closing and reopening only to make GitHub recompute the merge ref against current main ( |
The merge ref now points at current main ( |
Merge evidence for head
|
Part of #8 (W2 nested subagents: capacity states in the UI). It reads the family capacity endpoint from #109, as the sidebar markers in #116 do.
With
fork-nested-subagentson, the top bar of a subagent's chat shows a "Waiting for a free subagent slot" badge with an hourglass while the subagent isrunningbut waits for a concurrency slot. On narrow screens the badge shows only the hourglass and keeps the label for screen readers. The badge sits inside the title'srole="status"region, so its appearance is announced.Why. #116 marks a waiting subagent in the sidebar tree, but the sidebar can be collapsed, hidden on mobile, or show the root collapsed. A user who has the subagent's chat open saw a running chat that produced nothing, with no reason why.
Change.
components/ForkSubagentSlotBadge.tsx(fork file) asksGET /api/v2/chats/fork/{root}/familyonly when the chat is a subagent the user owns, its live status isrunning, and the experiment is on. It keys the query on the family root (root_chat_id, else the parent), because the endpoint rejects a child ID, and shares the cache entry with the sidebar.ChatTopBar.tsxgains one element after the agent type badge.ForkFamilyCapacity.tsxexportswaitingForSlotStatus, so the icon, color and label match the sidebar, andgetForkFamilyRootID, which both places use to pick the root.WaitingForSubagentSlotcovers the badge for the visual check.Validation
ChatTopBar nested subagent slot: a running grandchild chat asks for the family ofroot_chat_id, not its own ID or its parent's. A negative control (query keyed on the chat's own ID) fails the test. TheWaitingForSubagentSlotstory covers the badge visually.vitestonChatTopBar.test.tsxandChatsSidebar.test.tsx(100 tests),biome checkon the touched files andtsc --noEmitpass.