Repository navigation
Auto-collapse concurrent workflow cards above the composer - #4889
Merged
Merged
Conversation
Two or more running workflows collapse into a stack whose front card shows the newest run with a +N count; tapping it expands every card. A full-width chevron row below the list (and inside an opened card) collapses again, with focus following each toggle. Applies to Claude Code workflows and the workflows plugin banner. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
brsbl
added a commit
that referenced
this pull request
Oct 5, 2026
…nner (#4890) ## Human comments ## What was wrong After #4889 the workflow cards opened by tapping the card and closed from a full-width chevron row, but every other banner above the composer still toggled from a small rotating header chevron, and grouped banners described extra items with inline "+N more" text. Two expand/collapse models and two count treatments sat in the same stack, inline sections were only clickable on their short label, and the new disclosure pieces were copied between the app and the workflows plugin. ## What changed - **One disclosure model for every composer banner:** to-dos, background commands, Goal, prompt mode, machine status, active child threads, and the context banner's parent-thread, status, and changed-files sections open from their whole header (inline sections fill the rest of their header row) and close from a full-width up-chevron row at the bottom of the opened body. Focus moves to the close row on open and back to the header on close. - **Right-edge column:** a chevron appears on hover or keyboard focus in a 32px column aligned with the Plan/Goal dismiss X (hidden at rest, on touch, and while open). Grouped banners (workflow stack, background commands, active child threads) show a `+N` pill in that column instead of "+N more" text and no chevron. - **Shared definitions:** new shared-ui registry item `prompt-stack-disclosure` (`useDisclosureFocusHandoff`, `PromptStackCollapseRow`, `PromptStackHoverChevron`, `PromptStackCountSlot`, `PromptStackPeekLayers`) used by the app banners and the workflows plugin. The app adds `AnimatedDisclosureBody`; `PromptStackCardChevron` is removed (no remaining users). - **Collapsed bodies are `inert`**, so hidden controls leave the tab order. - **Workflow stack lifecycle:** re-collapses once fewer than two workflows run (including dropping straight to zero), and its expanded state is per thread in both the app and the plugin. The expanded list keeps a stable wrapper so a still-running card does not remount when another finishes. - Not changed: the queued-messages drawer (its own drag-between-modes gesture) and the scheduled-send picker (not collapsible). Registry output regenerated with `build-registry.mjs`. No wire, CLI, or SDK-export changes. ## How you verified Before: `f6cd19aac5` (merge base) · After: `092c7fce5a` · Captured at 2× in Chrome for Testing via Browser Automation, branch dev app, seeded thread with every banner kind (2 workflows, 2 background commands, plan mode, Goal, to-dos, 2 active child threads, parent link, 2 untracked files) | Screen / state | Viewport | Before | After | | --- | --- | --- | --- | | All banners / at rest | Desktop · 1440×1100 |  |  | | To-dos / hovering the header | Desktop · 1440×1100 |  |  | | Changed files / hovering the right end of the row | Desktop · 1440×1100 |  |  | | Changed files / opened | Desktop · 1440×1100 |  |  | | All banners / at rest | Mobile · 390×844 |  |  | | Background commands / opened | Mobile · 390×844 |  |  | - Exercised in the dev app on the final head: to-dos, changed files, and the workflow stack each open from the header with focus on the close row, and close back to the header; clicking the far right of the changed-files row opens it; chevron centers measured at 17px from the card edge, matching the Goal X. - Tests: `ThreadWorkflowCard.test.tsx` (open/close and focus hand-off); `AnimatedBody.test.tsx` (`inert` when collapsed); `ThreadDetailPromptArea.test.tsx` (stack re-collapses below two runs); `plugins/workflows/src/app.test.tsx` (stack 2 → 0 → 2 re-collapses, `+N`, peek layers, single-card focus, `inert`); `ThreadPromptContextBanner.test.tsx` (`+1` pill). Run in remote CI only. - Slop Cop review on `32e9255d47`: security, performance, and code quality found no P0/P1; architecture found one P1 (plugin stack reset skipped when runs dropped to zero or the thread changed), fixed in `073b972d7a` with a 2 → 0 → 2 test. A follow-up slimming pass folded the toggle handlers into the shared hook without behavior changes. - P2 follow-ups, not in this PR: changed-files row uses `flex-1` and may truncate first beside a long PR label and Merge button; two Ladle story hints still describe the old chevrons; focus tests for context-banner sections and Goal/Plan; the plugin card still hand-rolls the animated body markup; the trailing slot assumes 12px host padding. - Not covered visually: machine status (needs a suspended host) and the plugin banner (its runs reconcile against live agent threads); both share the verified pieces. BB-Thread: [Collapse or stack elements](https://brsbl.getbb.app/projects/proj_khiw2za95v/threads/thr_e2uq3rv44u) 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED  --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
Every running workflow got its own full card above the composer, each with a header and a full-width phase strip. With four or more concurrent runs the cards pushed the composer down and the thread content off screen, and there was no way to fold them away.
What changed
+Ncount pill; up to two card edges peek beneath it. Tapping the stack expands every card.plugins/workflows) follows the same rules; its "open in side panel" arrow is kept on each card.ThreadWorkflowStack(apps/app/src/components/promptbox/banner/);ThreadWorkflowCardsplit intoThreadWorkflowSummary+ card; stack-open state lives inThreadDetailPromptArea. Each card now usesuseIdinstead of fixed DOM ids, fixing duplicate ids when several cards render.No wire, CLI, or plugin-API changes.
How you verified
Before:
09ff18a73b(merge base) · After:6fb4b8bb50· Captured at 2× in Chrome for Testing via Browser Automation, branch dev app with seeded running-workflow threadsThreadDetailPromptArea.test.tsx(stack collapsed by default, expands, cards toggle independently, collapses, focus follows) andplugins/workflows/src/app.test.tsx(stack,+N, peek layers, collapse, single-card open/close with focus). Run in remote CI only.BB-Thread: Collapse or stack elements
🤖 Generated with Claude Code