Skip to content

fix: show previous toolcalls when composing new chat message in thread#30

Merged
zortos293 merged 1 commit intomainfrom
capy/fix-toolcalls-in-new
Mar 14, 2026
Merged

fix: show previous toolcalls when composing new chat message in thread#30
zortos293 merged 1 commit intomainfrom
capy/fix-toolcalls-in-new

Conversation

@zortos293
Copy link
Owner

@zortos293 zortos293 commented Mar 14, 2026

This PR fixes an issue where previous tool calls disappeared from the thread timeline after starting a new chat message. The timeline was deriving work log entries filtered to only the latest turn, causing prior tool activity to be hidden when the user began composing a new turn.

  • Added deriveVisibleThreadWorkLogEntries() in apps/web/src/components/ChatView.logic.ts to derive work entries from all thread activities regardless of turn
  • Updated apps/web/src/components/ChatView.tsx to use deriveVisibleThreadWorkLogEntries() for timeline rendering
  • Added regression test in apps/web/src/components/ChatView.logic.test.ts verifying completed tool calls from previous turns remain visible in the timeline

Open in Capy TC-11 · 5.4

Summary by CodeRabbit

  • Refactor

    • Streamlined internal structure for handling thread work log entry visibility
  • Tests

    • Added test coverage for thread work log entry handling in chat view

@zortos293 zortos293 added the capy Generated by capy.ai label Mar 14, 2026 — with Capy AI
@coderabbitai
Copy link

coderabbitai bot commented Mar 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 12e7b19c-fd93-42fa-9e72-a796eab80480

📥 Commits

Reviewing files that changed from the base of the PR and between de57e54 and 7a3d809.

📒 Files selected for processing (3)
  • apps/web/src/components/ChatView.logic.test.ts
  • apps/web/src/components/ChatView.logic.ts
  • apps/web/src/components/ChatView.tsx

📝 Walkthrough

Walkthrough

A new function deriveVisibleThreadWorkLogEntries is introduced in ChatView.logic that wraps deriveWorkLogEntries by passing undefined as the turn ID parameter. ChatView.tsx is updated to import and use this new function instead of directly importing and calling deriveWorkLogEntries with the active turn ID. Tests are added to verify the new function returns completed tool calls from multiple turns in order.

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main bug fix: restoring visibility of previous tool calls in the thread timeline when composing a new message.
Description check ✅ Passed The description explains what changed and why, including the root cause (filtering to only latest turn) and the solution, though it lacks before/after screenshots mentioned in the template.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

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

@zortos293 zortos293 merged commit 76f2de1 into main Mar 14, 2026
6 checks passed
@zortos293 zortos293 mentioned this pull request Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capy Generated by capy.ai size:M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant