Skip to content

feat(playground): tailor empty-state claim to selected agent#2245

Merged
samuv merged 1 commit into
mainfrom
feat/playground-per-agent-claim
May 14, 2026
Merged

feat(playground): tailor empty-state claim to selected agent#2245
samuv merged 1 commit into
mainfrom
feat/playground-per-agent-claim

Conversation

@samuv
Copy link
Copy Markdown
Collaborator

@samuv samuv commented May 13, 2026

Summary

  • The playground empty-state heading was hardcoded to "Test & evaluate your MCP Servers", which only describes the ToolHive Assistant use case. With Skill Engineer and custom agents now selectable per thread, that single tagline misrepresents the experience.
  • The heading and provider-config subtext now resolve from the selected agent via a small pure helper (renderer/src/features/chat/lib/empty-state-copy.ts):
    • ToolHive Assistant (default / fallback) → keeps the existing copy.
    • Skill Engineer → "Build & audit your Skills".
    • Custom agents → "Chat with {agent.name}".
  • chat-interface.tsx resolves the thread's agent with the same useThreadAgentId + useAgents pattern already used by AgentSelector.

Test plan

  • pnpm run test run renderer/src/features/chat/components/__tests__/chat-interface.test.tsx — 37/37 pass (3 new cases under empty state (no messages) › per-agent empty-state copy).
  • pnpm run type-check — clean.
  • eslint on the three changed files — clean.
  • Manual smoke (Docker running): pnpm run start
    • Land on /playground with no threads → empty state shows "Test & evaluate your MCP Servers".
    • Switch to Skill Engineer via the agent selector → heading reads "Build & audit your Skills".
    • Create a custom agent (e.g. "Reviewer"), switch to it → heading reads "Chat with Reviewer".
    • With no provider configured, confirm the subtext under each heading reads naturally and "Configure your providers" still opens the settings dialog.
    • Send a message → empty state disappears, normal chat layout renders.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 13, 2026 13:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the playground chat empty state so its heading and provider-configuration subtext reflect the currently selected agent instead of always using ToolHive Assistant copy.

Changes:

  • Added a pure helper for resolving empty-state copy from an agent.
  • Wired ChatInterface to load the thread’s selected agent and render agent-specific copy.
  • Added component tests for default, Skill Engineer, and custom-agent empty-state copy.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
renderer/src/features/chat/lib/empty-state-copy.ts Adds centralized empty-state copy resolution for built-in and custom agents.
renderer/src/features/chat/components/chat-interface.tsx Uses agent hooks to select and render the appropriate empty-state heading/subtext.
renderer/src/features/chat/components/__tests__/chat-interface.test.tsx Adds mocked agent data and tests for per-agent empty-state behavior.

@samuv samuv self-assigned this May 13, 2026
The empty-state heading was hardcoded to "Test & evaluate your MCP
Servers", which only describes the ToolHive Assistant use case. With
the Skill Engineer and custom agents now selectable per thread, the
heading and provider-config subtext now resolve from the selected
agent: ToolHive Assistant keeps the existing copy, Skill Engineer
shows "Build & audit your Skills", and custom agents show
"Chat with {agent.name}".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@samuv samuv force-pushed the feat/playground-per-agent-claim branch from 930c551 to acc30f1 Compare May 13, 2026 15:23
@samuv samuv enabled auto-merge (squash) May 13, 2026 16:26
@samuv samuv merged commit 45f1c13 into main May 14, 2026
16 checks passed
@samuv samuv deleted the feat/playground-per-agent-claim branch May 14, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants