Skip to content

Polish thread-row, tool-row, composer, and delete-project UI - #151

Merged
soorya-u merged 3 commits into
mainfrom
fix/composer-tool-row-thread-row-ui-polish
Aug 5, 2026
Merged

Polish thread-row, tool-row, composer, and delete-project UI#151
soorya-u merged 3 commits into
mainfrom
fix/composer-tool-row-thread-row-ui-polish

Conversation

@soorya-u

@soorya-u soorya-u commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Rebuild tool-row.tsx on the Accordion primitive (was manual useState); fixes a selector bug ([&_svg:last-child][&>svg]) that had unintentionally matched the kind-icon and status-icon svgs, stomping the check/cross icon colors and adding a translate-y-0.5 misalignment to the chevron
  • thread-row.tsx sidebar rows: add a delete button (backend deleteThread already existed end-to-end, just had no UI trigger), a Cancel option next to Confirm, destructive hover color on the delete icon, and swap the timestamp/delete-icon with an instant display toggle instead of mismatched opacity-transition vs. hidden, which caused a visible overlap frame during the swap
  • Scope the row's focus ring to focus-visible (keyboard nav) instead of focus-within (fires on every mouse click)
  • composer-context-usage.tsx: shrink (32px→24px ring, 9px→8px font) and move from the scrolling footer-controls row to sit directly left of the send button
  • delete-project-dialog.tsx: confirm button is now variant="destructive"
  • main.tsx: set multipleAccountsPerProvider={false} on AuthProvider so LinkedAccounts stops showing a "link" CTA for a provider (GitHub) that's already linked

Test plan

  • bun run check:types (all packages)
  • biome check on touched files
  • Full unit test suite (pre-push hook: 115 web/shared tests + 105 cli tests, all passing)
  • Manual click-through of thread delete/cancel, tool-row expand/collapse, and composer footer in a running dev server

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Moved the context-usage indicator beside the composer’s primary action and refined its size and styling.
    • Tool activity details and diffs now use expandable sections with smoother interactions.
    • Improved project thread controls for renaming, deleting, and canceling actions.
    • Delete project actions now use clearer destructive confirmation styling.
    • Updated account handling to prevent multiple accounts for the same sign-in provider.

- Use Accordion primitives in tool-row.tsx; fix a selector bug that
  stomped the check/cross icon colors and misaligned the chevron
- Add delete affordance, cancel option, and destructive hover color
  to sidebar thread rows; swap timestamp/delete-icon instantly on
  hover to avoid an animation-timing overlap; scope the focus ring to
  keyboard navigation instead of firing on every mouse click
- Shrink composer-context-usage and move it beside the send button
- Make delete-project confirm button destructive
- Fix LinkedAccounts showing a "link" CTA for an already-linked
  provider by setting multipleAccountsPerProvider={false}

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cyrus Ready Ready Preview Aug 5, 2026 4:21pm

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@soorya-u, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 26 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6b4e0f2b-5f46-462d-b791-a93b20d696df

📥 Commits

Reviewing files that changed from the base of the PR and between f18df7f and bb18a81.

📒 Files selected for processing (4)
  • apps/web/src/components/chat/work-log/tool-row.test.tsx
  • apps/web/src/components/chat/work-log/tool-row.tsx
  • apps/web/src/components/sidebar/projects/thread-row.test.tsx
  • apps/web/src/components/sidebar/projects/thread-row.tsx
📝 Walkthrough

Walkthrough

The PR relocates and resizes composer context usage, replaces custom tool-row expansion with shared accordion components, updates deletion controls, and disables multiple accounts per identity provider.

Changes

Composer context usage

Layer / File(s) Summary
Composer indicator placement and sizing
apps/web/src/components/chat/composer/composer-context-usage.tsx, apps/web/src/components/chat/composer/footer-controls.tsx, apps/web/src/components/chat/composer/index.tsx
The indicator becomes smaller and moves from footer controls to the composer action group beside the primary action.

Tool-row accordion behavior

Layer / File(s) Summary
Accordion component primitives
apps/web/src/components/ui/accordion.tsx
Radix-based root, item, trigger, and content wrappers are added and exported with shared styling and open-state behavior.
Tool-row expansion integration
apps/web/src/components/chat/work-log/tool-row.tsx
Tool-row heading and detail rendering are extracted, and expandable rows use a single-item collapsible accordion.

Project deletion controls

Layer / File(s) Summary
Deletion confirmation presentation
apps/web/src/components/portals/delete-project-dialog.tsx, apps/web/src/components/sidebar/projects/thread-row.tsx
The project delete action uses a destructive variant. Thread rows separate selection and deletion controls and show explicit confirmation states.

Authentication configuration

Layer / File(s) Summary
Provider account policy
apps/web/src/main.tsx
AuthProvider disables multiple accounts per identity provider.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the pull request's primary UI changes across thread rows, tool rows, the composer, and the delete-project dialog.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/composer-tool-row-thread-row-ui-polish

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/components/chat/work-log/tool-row.tsx`:
- Around line 50-89: Update ToolRowHeading so the accordion trigger contains
valid phrasing content: replace the wrapper <div> and nested <p> around
presentation.heading and preview with <span> elements, preserving the existing
flex, truncation, spacing, and text classes.

In `@apps/web/src/components/sidebar/projects/thread-row.tsx`:
- Around line 45-79: Move the rename `<input>` out of the selection `<button>`
in `ThreadRow` so `renaming` renders two separate siblings instead of nesting
interactive controls. Keep the existing `onClick`/`onDoubleClick` selection and
rename behavior on the button, and preserve the current input handlers
(`onBlur`, `onChange`, `onKeyDown`, `ref`) on the standalone input. Use the
existing `renaming`, `setRenaming`, `draft`, `thread.id`, and `onRename` flow
unchanged, just relocate the conditional rendering structure.
- Around line 101-106: Update both delete-button variants in the thread row to
include group-focus-within/sub:flex alongside the existing visibility classes,
ensuring keyboard focus within the group reveals the buttons on desktop while
preserving hover and small-screen behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a8d22f9-c7d9-4b9a-b811-ff027c1355d5

📥 Commits

Reviewing files that changed from the base of the PR and between aaa2093 and f18df7f.

📒 Files selected for processing (8)
  • apps/web/src/components/chat/composer/composer-context-usage.tsx
  • apps/web/src/components/chat/composer/footer-controls.tsx
  • apps/web/src/components/chat/composer/index.tsx
  • apps/web/src/components/chat/work-log/tool-row.tsx
  • apps/web/src/components/portals/delete-project-dialog.tsx
  • apps/web/src/components/sidebar/projects/thread-row.tsx
  • apps/web/src/components/ui/accordion.tsx
  • apps/web/src/main.tsx
💤 Files with no reviewable changes (1)
  • apps/web/src/components/chat/composer/footer-controls.tsx

Comment thread apps/web/src/components/chat/work-log/tool-row.tsx
Comment thread apps/web/src/components/sidebar/projects/thread-row.tsx Outdated
Comment thread apps/web/src/components/sidebar/projects/thread-row.tsx
- tool-row.tsx: AccordionTrigger renders as a real <button>; replace the
  <div>/<p> wrappers in ToolRowHeading with <span>s since block-level
  content isn't valid inside phrasing content
- thread-row.tsx: move the rename <input> out of the selection <button>
  in both variants (a button can't contain another interactive control)
- thread-row.tsx: reveal the delete button on keyboard focus
  (group-focus-within/sub:flex), not just mouse hover / small screens

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- thread-row.test.tsx: cover select, rename (commit/cancel/blur), and
  delete-confirm flows for both "sub" and "list" variants
- While writing the delete-confirm test, found the "list" variant never
  got the Cancel button added to "sub" earlier — added it for parity
- tool-row.test.tsx: regression test locking the accordion trigger's
  chevron styling to `[&>svg]` (direct child) instead of `[&_svg:last-child]`
  (descendant), which had leaked onto the kind/status icons

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@soorya-u
soorya-u merged commit 0cfb1ea into main Aug 5, 2026
9 checks passed
@soorya-u
soorya-u deleted the fix/composer-tool-row-thread-row-ui-polish branch August 5, 2026 16:22
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