Skip to content

Fix bug where playgroud conversation is was not reset when playground…#2473

Merged
sarah-inkeep merged 2 commits intomainfrom
prd-6210
Mar 2, 2026
Merged

Fix bug where playgroud conversation is was not reset when playground…#2473
sarah-inkeep merged 2 commits intomainfrom
prd-6210

Conversation

@sarah-inkeep
Copy link
Copy Markdown
Contributor

… was closed or when navigating between agents

… was closed or when navigating between agents
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 2, 2026

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

Project Deployment Actions Updated (UTC)
agents-api Ready Ready Preview, Comment Mar 2, 2026 9:33pm
agents-docs Ready Ready Preview, Comment Mar 2, 2026 9:33pm
agents-manage-ui Ready Ready Preview, Comment Mar 2, 2026 9:33pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 2, 2026

🦋 Changeset detected

Latest commit: f51d8ec

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@inkeep/agents-manage-ui Patch
@inkeep/agents-api Patch
@inkeep/agents-cli Patch
@inkeep/agents-core Patch
@inkeep/agents-mcp Patch
@inkeep/agents-sdk Patch
@inkeep/agents-work-apps Patch
@inkeep/ai-sdk-provider Patch
@inkeep/create-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog Bot commented Mar 2, 2026

Fixes a stale playgroundConversationId bug — when the playground was closed or the user navigated between agents, the conversation ID wasn't reset, so re-opening the playground could resume (or conflict with) a previous session.

  • agents-manage-ui/src/components/agent/playground/playground.tsx — adds a cleanup useEffect that calls resetPlaygroundConversationId() when the Playground component unmounts
  • agents-manage-ui/src/features/agent/state/use-agent-store.ts — generates a fresh playgroundConversationId (via generateId()) inside the agent-reset action instead of falling back to stale initial state
  • .changeset/wet-eyes-change.md — patch changeset for @inkeep/agents-manage-ui

Pullfrog  | View workflow run | Using Claude Code | Triggered by Pullfrogpullfrog.com𝕏

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

Clean, well-targeted fix. The two changes cover both scenarios correctly: unmount cleanup handles playground close, and the generateId() in resetAgentState handles agent navigation. No issues found.

Pullfrog  | View workflow runpullfrog.com𝕏

Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(0) Total Issues | Risk: Low

💭 Consider (1) 💭

Inline Comments:

  • 💭 Consider: playground.tsx:54 Missing resetPlaygroundConversationId dependency in useEffect

✅ APPROVE

Summary: Clean, focused bug fix that correctly addresses the conversation ID persistence issue across playground close/agent navigation. The implementation follows established zustand patterns in the codebase. The useEffect cleanup approach is appropriate for component unmount handling.

Nice work! 🎉

Reviewers (2)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
pr-review-standards 0 0 0 0 0 0 0
pr-review-frontend 1 0 0 0 1 0 0
Total 1 0 0 0 1 0 0

useEffect(() => {
// when the playground is closed the chat widget is unmounted so we need to reset the conversation id
return () => resetPlaygroundConversationId();
}, []);
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.

💭 Consider Missing dependency in useEffect

Issue: The resetPlaygroundConversationId function is referenced in the cleanup but not listed in the dependency array.

Why: While this works correctly in practice (zustand actions are stable references, as noted in the store's TKDodo pattern comments), adding the dependency is cleaner and satisfies exhaustive-deps expectations. The file already uses biome-ignore directives for similar patterns (line 74), so either approach is acceptable.

Fix: (1-click apply)

Suggested change
}, []);
}, [resetPlaygroundConversationId]);

Refs:

@github-actions github-actions Bot deleted a comment from claude Bot Mar 2, 2026
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

PR Review Summary

(0) Total Issues | Risk: Low

This is a delta re-review triggered by a merge from main (f51d8ec46). The actual bug fix code (c834801bd) has not changed since the prior review.

🕐 Pending Recommendations (1)

  • 💭 playground.tsx:54 Missing resetPlaygroundConversationId dependency in useEffect

✅ APPROVE

Summary: No new code changes in this PR's scope since the prior review. The merge from main only brought in version bumps and unrelated changes. The original fix remains clean and well-targeted. The prior Consider item about the missing dependency is noted but non-blocking (zustand actions are stable references per the TKDodo pattern).

Ship it! 🚀

Reviewers (0)
Reviewer Returned Main Findings Consider While You're Here Inline Comments Pending Recs Discarded
Total 0 0 0 0 0 1 0

Note: No reviewers dispatched for this delta re-review — only a merge commit was added since the prior review.

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