Skip to content

Show a card in the coordinator's chat when it starts a worker - #35263

Merged
brennanb2025 merged 33 commits into
mainfrom
brennanb2025/agent-start-cards
Oct 30, 2026
Merged

brennanb2025 merged 33 commits into
mainfrom
brennanb2025/agent-start-cards

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1991 $\color{#cf222e}{\Huge{\mathbf{−}}}$​413 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1578
Prod 30 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​597 $\color{#cf222e}{\Huge{\mathbf{−}}}$​156 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​441

When a coordinator in a native chat creates a worker, the conversation currently shows only the shell command. This adds a “Started worker” card with the worker’s live status, name, link, time and full task. The task uses the shared three-line preview, expansion and exact Copy behavior.

The card records confirmed new-worker readiness without holding up the start. Replays preserve one card, and an existing-agent task or context-only dispatch creates none. The entry stays a desktop display record; conversation exports, saved context and existing phone readers omit it. Older clients skip the optional journal kind. Desktop message cards from #34824 are already on main; phone cards are tracked in #36162.

Review path: full. The change adds an optional persisted journal item and orchestration publication, so ownership, replay and mixed-version readers require the full review path. Intended differences from the common pattern: ready-only best-effort publication and the full-task shared card follow the approved design; phone rendering follows the separate planned cut.

Validation: Full CI, including the actual compiler and all 12 unit shards, passed on 772c4694c5ebc67cf8c8cc408313406186d5ce4c. Real CLI/journal/reader, producer/render operation counts at N/10N and runtime-state contracts passed; the unchanged 16-case mobile hook suite has executed CI proof. Admitted M4Air screenshots show the real projected card collapsed and expanded. The candidate writer to pinned pre-kind parser/reducer/projection/status contract passed all six original assertions. Verification follows the review table’s tests path (qa=tests); no live-agent QA round is claimed. Review status and screenshots.

@brennanb2025
brennanb2025 changed the base branch from brennanb2025/agent-message-cards to main October 29, 2026 20:59
@brennanb2025
brennanb2025 marked this pull request as ready for review October 30, 2026 01:01
@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
Walkthrough

The change adds an agent-start journal item and records eligible local and federated worker starts. Desktop native chat projects these records into system messages and renders them as worker-start cards. Transcript handling omits start facts from selected worker, saved-context, archive, and handoff outputs. Tests cover journal validation, recording and replay, rendering, transcript filtering, and projection reuse.

Priority: Normal

Merge Risk: Minimal · previous review 772c4

The reviewed change has no established merge-blocking correctness, availability, or data-integrity risk.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 34.62% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description clearly explains the user-facing change, implementation scope, rationale, testing, and visual evidence. It does not follow the required template structure. It omits an actual Fixes #… Rewrite the description using all required template headings. Add the actual linked issue in Fixes #... format. Add the required before/after visual proof or state N/A with a reason. Document testing platforms and results, including the…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title states the primary change: a coordinator's chat gains a card when it starts a worker. The raw summary confirms this, covering a new 'Started worker' card, the start-card journal recording, a…
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.
Full details: Title check

Explanation

The title states the primary change: a coordinator's chat gains a card when it starts a worker. The raw summary confirms this, covering a new 'Started worker' card, the start-card journal recording, and the renderer changes. The title does not mention the journal or replay-safety work, which is expected for a summary title.

Full details: Docstring Coverage

Explanation

Docstring coverage is 34.62% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 26 functions across 39 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Explanation

The description clearly explains the user-facing change, implementation scope, rationale, testing, and visual evidence. It does not follow the required template structure. It omits an actual Fixes # issue link, explicit Visual Proof and Testing sections, Review, Agent skill upstream boundary, Notes, and Checklist sections. The provided context also conflicts on whether final CI, mobile execution, and screenshots are complete or pending.

Resolution

Rewrite the description using all required template headings. Add the actual linked issue in Fixes #... format. Add the required before/after visual proof or state N/A with a reason. Document testing platforms and results, including the pending or completed CI, mobile, and screenshot checks. Complete AI Disclosure when applicable, Review, Agent skill upstream boundary, Notes, and Checklist sections. Resolve the conflicting validation status.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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
Contributor

Choose a reason for hiding this comment

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

Nitpick comments: 1
src/main/runtime/rpc/methods/orchestration/worker-start-card.test.ts: 1

272-316: Trivial · Maintainability & Code Quality · Quick win

Assert that the cleared-context path reaches the recording boundary.

The scenario reaches recordStart(...), but it only checks that no card exists. That assertion also passes when recordStart(...) is removed. Assert one appendAgentStart call, then keep the zero-card assertion so the test covers both boundary invocation and context rejection.

Suggested fix
     if (scenario === 'success' || scenario === 'federated') {
       await eventually(async () =>
         expect(
           (await current.host.journalSnapshot(COORD)).items.some(
             (item) => item.body.kind === 'agent-start'
@@
         ).toBe(true)
       )
     }
+    if (scenario === 'cleared-context') {
+      await eventually(() => expect(append).toHaveBeenCalledTimes(1))
+    }
     const snapshot = await current.host.journalSnapshot(COORD)

Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 280776e3-8186-4e83-b787-a15202c352a9
Commits

Reviewing files that changed from the base of the PR and between 1b8034f and eaf3692.

Files selected for processing: 1
  • src/main/runtime/rpc/methods/orchestration/worker-start-card.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

When a coordinator created a worker, its chat showed the start command without a card identifying the worker and task. It now shows Started worker once the new worker is ready, with its live identity/status, creation time and full task. The shared three-line preview expands and Copy preserves the exact task.

The full review completed in two rounds. Fixes keep publication detached from worker startup, preserve one card on replay, and keep creation records out of conversation/context exports, worker reads and current phone conversations. The card uses the existing full task without extra detail-fetch fanout. Intended differences from the common pattern follow the approved ready-only, desktop-display design; phone cards are tracked in #36162.

Verified on 772c4694c5ebc67cf8c8cc408313406186d5ce4c: full CI and actual compiler; all 12 unit shards; real CLI/journal/reader contracts; producer, renderer and runtime-state tests, including populated N/10N operation/render counts; the unchanged 16-case mobile hook suite carried from its executed CI proof. Existing naming scans and status projection retain their documented O(NW) naming cost and O(J)+sort status cost. This is the review table’s tests path; no live-agent QA round is claimed.

The admitted M4Air screenshot run rendered the real projected card through MessageRow, checked the three-line fold and expanded full Markdown, and finished without page/console errors. The actual candidate writer → pinned pre-kind parser/reducer/projection/status contract passed all six assertions after a private-loader path-resolution repair. Both captures use the final head; fixture processes stopped and tracked source stayed unchanged.

For Brennan’s review:

Collapsed:

started-narrow-collapsed.png

Expanded:

started-narrow-expanded.png

…art-cards

# Conflicts:
#	src/renderer/src/components/native-chat/NativeChatAgentMessageCard.tsx
@brennanb2025
brennanb2025 merged commit bf3e7ed into main Oct 30, 2026
55 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/agent-start-cards branch October 30, 2026 03:30
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