feat(sidebar): collapse subagent thread trees#510
feat(sidebar): collapse subagent thread trees#510puls-com-leon-komarovsky wants to merge 2 commits intoDimillian:mainfrom
Conversation
36b63de to
56db944
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56db94490d
ℹ️ 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".
| onClick={(event) => { | ||
| event.preventDefault(); | ||
| event.stopPropagation(); | ||
| onToggleThreadCollapsed(workspaceId, thread.id); | ||
| }} |
There was a problem hiding this comment.
Stop keyboard events from bubbling out of collapse toggle
The new tree toggle only stops propagation on click, but the row still has an onKeyDown handler for Enter/Space. When a keyboard user focuses this button and presses Enter or Space, the key event bubbles to the parent row, which selects the thread (and can prevent the button activation), so collapse/expand cannot be reliably triggered from the keyboard. This regresses keyboard accessibility for the new control.
Useful? React with 👍 / 👎.
|
Don't like the UI, IMO a bit unecessary |
What
Adds a disclosure arrow to sidebar thread rows that have child threads (subagents), allowing per-node collapse/expand of the child subtree.
UX
Implementation
useThreadRowsto computehasChildren+isCollapsedand skip recursion when collapsed.Testing
npm run test -- src/features/app/hooks/useThreadRows.test.tsx src/features/app/components/ThreadList.test.tsx src/features/app/components/PinnedThreadList.test.tsx src/features/app/components/WorktreeSection.test.tsxnpm run typechecknpm run lint(existing warnings only)