Refactor conversation folding/thread-feed and thread event bus - #140
Conversation
…auth UI Simplifies fold/thread-feed logic with test coverage, adds ephemeral vs persisted chunk stamping to the CLI event bus, and reorganizes auth component internals (moves show.tsx into components/helpers). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 48 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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughConversation processing now uses ChangesConversation sequencing and feed pipeline
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 56-57: Prevent nested DiffRow controls from triggering the parent
ToolRow expansion handlers: either move the parent expand/collapse role and
handlers to the tool header, or stop click and keyboard event propagation in
DiffRow while preserving both toggle behaviors. Add a regression test verifying
that opening a diff leaves its parent tool row open.
In `@shared/utils/src/conversations/fold.ts`:
- Around line 463-467: Update latestTurnIdFromEntries() to determine the latest
user turn from canonical (seq, sub) entry order rather than createdAt, scanning
sorted entries in reverse or comparing sequence keys directly. Preserve the
active-turn streaming and turn-state behavior, and add coverage with reversed
timestamps where a later running turn remains identified as latest.
🪄 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: 4d311f50-05ef-4124-b10b-8bb6fb979942
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (29)
apps/cli/package.jsonapps/cli/src/queue/bus.test.tsapps/cli/src/queue/bus.tsapps/web/src/components/auth/login-form.tsxapps/web/src/components/auth/magic-link-sent.tsxapps/web/src/components/auth/provider-button.tsxapps/web/src/components/auth/security/active-session.tsxapps/web/src/components/auth/security/active-sessions.tsxapps/web/src/components/auth/security/linked-accounts.tsxapps/web/src/components/chat/composer/agent-model-picker.tsxapps/web/src/components/chat/composer/compact-composer-controls.tsxapps/web/src/components/chat/composer/footer-controls.tsxapps/web/src/components/chat/feed/feed-entry-view.tsxapps/web/src/components/chat/work-log/diff-row.tsxapps/web/src/components/chat/work-log/tool-row.tsxapps/web/src/components/helpers/show.tsxshared/hooks/package.jsonshared/hooks/src/conversation/conversation-cache.tsshared/hooks/src/conversation/use-interactive-respond.tsshared/hooks/src/conversation/use-thread-conversation.tsshared/schemas/src/rtc/chat.tsshared/schemas/src/rtc/threads.tsshared/schemas/src/view/index.tsshared/utils/src/conversations/entries.test.tsshared/utils/src/conversations/entries.tsshared/utils/src/conversations/fold.test.tsshared/utils/src/conversations/fold.tsshared/utils/src/conversations/thread-feed.test.tsshared/utils/src/conversations/thread-feed.ts
💤 Files with no reviewable changes (1)
- apps/web/src/components/chat/feed/feed-entry-view.tsx
…urn lookup DiffRow's toggle button click bubbled up into ToolRow's own click handler, closing the parent row (and unmounting the diff) whenever a diff was opened. Stop propagation in DiffRow. latestTurnIdFromEntries still compared createdAt strings after fold.ts moved to trusting entry array position (seq, sub) as the canonical order; reversed or skewed timestamps could pick the wrong turn as latest. Take the last user_message in iteration order instead. Addresses CodeRabbit review comments on PR #140. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
fold/thread-feedconversation logic inshared/utils, with new/expanded test coverageapps/cli/src/queue/bus.ts), with new testsshow.tsxintocomponents/helpersTest plan
turbo check:typespassesknippassessyncpack lintpassesvitest runandbun test:unitpass (104 tests passed, 1 skipped)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Refactor