Skip to content

Claude Sdk Idle Handoff#728

Merged
arul28 merged 2 commits into
mainfrom
ade/involves-claude-agent-sdk-so-e30689cf
Jul 8, 2026
Merged

Claude Sdk Idle Handoff#728
arul28 merged 2 commits into
mainfrom
ade/involves-claude-agent-sdk-so-e30689cf

Conversation

@arul28

@arul28 arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/involves-claude-agent-sdk-so-e30689cf branch  ·  PR #728

Greptile Summary

This PR adds compact activity handoff and transcript rendering for Claude SDK chat flows.

  • Activity bundles for task, subagent, workflow, and scheduled-work updates.
  • Desktop and iOS transcript grouping updates around turn boundaries.
  • CLI activity rendering for compact TUI transcript rows.
  • A narrower idle-reader handoff path in the desktop chat service.

Confidence Score: 4/5

The CLI activity bundle path can still merge unrelated turn-less updates.

Desktop and iOS turn-boundary fixes cover the changed grouped transcript paths, but the TUI aggregator still treats two missing turn ids as the same bundle key.

apps/ade-cli/src/tuiClient/aggregate.ts

T-Rex T-Rex Logs

What T-Rex did

  • I reproduced the null-turn bundle scenario by running a targeted Vitest repro that imports the real CLI aggregateChatBlocks path and feeds a todo_update followed by a scheduled_work_update with both turnId fields omitted.
  • The serialized aggregation output showed exactly one activity-bundle block with turnId null containing both unrelated task and schedule entries.
  • The repro assertions passed, confirming that the current PR code collapses the adjacent turn-less activity source events into a single Activity row.
  • I attempted to render the UI using the claude activity bundle harness, but the environment hit a blocker: Vite reported readiness while Playwright timed out before usable captures could be produced.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ade-cli/src/tuiClient/aggregate.ts Adds TUI activity bundle aggregation, but adjacent missing-turn activity events can still merge.
apps/desktop/src/renderer/components/chat/chatTranscriptRows.ts Adds desktop activity bundle grouping with explicit missing-turn separation.
apps/ios/ADE/Views/Work/WorkTimelineHelpers.swift Adds iOS activity bundle collapsing with turn-aware card IDs and grouping.
apps/desktop/src/main/services/chat/agentChatService.ts Narrows idle-reader handoff to the generation-only mismatch case.

Comments Outside Diff (1)

  1. apps/ade-cli/src/tuiClient/aggregate.ts, line 246 (link)

    P1 Null Turn Bundles Merge

    When adjacent activity source events omit turnId, both calls pass null into this check, so the TUI merges unrelated task, schedule, or subagent updates into one Activity row. The desktop path now breaks on missing turn ids, but the CLI transcript can still hide separate turn-less updates behind a single bundle.

    Artifacts

    Repro: targeted Vitest aggregation harness for adjacent turn-less activity events

    • Contains supporting evidence from the run (text/typescript; charset=utf-8).

    Repro: verbose Vitest output showing one null-turn activity-bundle with two unrelated entries

    • Keeps the command output available without making the summary code-heavy.

    View artifacts

    T-Rex Ran code and verified through T-Rex

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/ade-cli/src/tuiClient/aggregate.ts
    Line: 246
    
    Comment:
    **Null Turn Bundles Merge**
    
    When adjacent activity source events omit `turnId`, both calls pass `null` into this check, so the TUI merges unrelated task, schedule, or subagent updates into one Activity row. The desktop path now breaks on missing turn ids, but the CLI transcript can still hide separate turn-less updates behind a single bundle.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/ade-cli/src/tuiClient/aggregate.ts:246
**Null Turn Bundles Merge**

When adjacent activity source events omit `turnId`, both calls pass `null` into this check, so the TUI merges unrelated task, schedule, or subagent updates into one Activity row. The desktop path now breaks on missing turn ids, but the CLI transcript can still hide separate turn-less updates behind a single bundle.

Reviews (2): Last reviewed commit: "ship: iteration 1 - address activity rev..." | Re-trigger Greptile

@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Jul 8, 2026 1:00am

@cursor

cursor Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jul 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 1 minute

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aa1a4264-a4e5-41c7-84e2-6f28b4b7b77c

📥 Commits

Reviewing files that changed from the base of the PR and between 93dbb6d and 3283cc2.

📒 Files selected for processing (15)
  • apps/ade-cli/src/tuiClient/__tests__/ChatView.test.tsx
  • apps/ade-cli/src/tuiClient/__tests__/aggregate.test.ts
  • apps/ade-cli/src/tuiClient/aggregate.ts
  • apps/ade-cli/src/tuiClient/components/ChatView.tsx
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
  • apps/desktop/src/renderer/components/chat/chatTranscriptRows.test.ts
  • apps/desktop/src/renderer/components/chat/chatTranscriptRows.ts
  • apps/ios/ADE/Models/RemoteModels.swift
  • apps/ios/ADE/Views/Work/WorkChatRichCardViews.swift
  • apps/ios/ADE/Views/Work/WorkTimelineHelpers.swift
  • apps/ios/ADE/Views/Work/WorkTranscriptParser.swift
  • apps/ios/ADETests/ADETests.swift
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/involves-claude-agent-sdk-so-e30689cf

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.

@arul28 arul28 force-pushed the ade/involves-claude-agent-sdk-so-e30689cf branch from cd91062 to 5e0d523 Compare July 8, 2026 01:24
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/arul28s-projects?upgradeToPro=build-rate-limit

@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5e0d523bcf

ℹ️ 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".

const status = activityBundleStatus(item);
if (status.includes("failed")) return <XCircle size={12} weight="bold" className="text-red-300/80" />;
if (status.includes("stopped") || status.includes("cancelled")) return <Warning size={12} weight="fill" className="text-amber-300/80" />;
if (status.includes("complete")) return <CheckCircle size={12} weight="bold" className="text-emerald-300/80" />;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Avoid marking partial task bundles complete

When an activity_bundle contains a todo_update with remaining pending or in-progress items, activityBundleStatus() returns strings like 1/2 complete, so this substring check renders the green completed icon even though the task list is still active. This makes partial task progress look finished in the transcript; use the todo item counts/status directly instead of matching the word complete.

Useful? React with 👍 / 👎.

Comment thread apps/desktop/src/renderer/components/chat/chatTranscriptRows.ts Outdated
Comment thread apps/ios/ADE/Views/Work/WorkTimelineHelpers.swift
Comment thread apps/desktop/src/main/services/chat/agentChatService.ts Outdated
@arul28

arul28 commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 3283cc25e9

ℹ️ 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".

@arul28 arul28 merged commit b1b66ca into main Jul 8, 2026
31 of 32 checks passed
@arul28 arul28 deleted the ade/involves-claude-agent-sdk-so-e30689cf branch July 8, 2026 04:28
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