feat: add MCP apps sidebar to task threads#2220
Draft
fercgomes wants to merge 1 commit into
Draft
Conversation
Add a collapsible right-side sidebar in the task conversation view that lists every MCP-app (UI-rendering) tool call in the thread. Clicking an entry scrolls the chat to that exact item using the existing VirtualizedList.scrollToIndex mechanism. A toggle button lives in the task header next to ExternalAppsOpener. A single global tRPC subscription to mcpApps.onDiscoveryComplete keeps a Set of tool keys with registered UI, so the sidebar can filter to true "apps" without firing N hasUiForTool queries. Generated-By: PostHog Code Task-Id: 4204eb27-ab56-4c84-b2c2-f832b4a34f06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VirtualizedList.scrollToIndexmechanism (same as conversation search).ExternalAppsOpener.mcpApps.onDiscoveryCompletemaintains aSetof tool keys with registered UI, so the sidebar filters to true "apps" without firing NhasUiForToolqueries.Files
New
mcp-apps/stores/mcpUiToolsStore.ts— runtime registry of MCP tool keys with UImcp-apps/hooks/useMcpUiToolsSubscription.ts— single global subscription that populates the registrysessions/stores/mcpAppsSidebarStore.ts— persisted open/width viacreateSidebarStoresessions/components/McpAppsSidebar.tsx— the panel with resize handle and clickable rowstask-detail/components/McpAppsToggleButton.tsx— header icon buttonModified
App.tsx— mounts the subscription onceConversationView.tsx— single pass derives bothmcpAppIndices(forkeepMounted) andmcpEntries; root wrapped in a Flex to host the sidebarTaskDetail.tsx— toggle button next toExternalAppsOpenerin the headerTest plan
pnpm --filter code typecheckpassespnpm dev— open a task, generate a couple of PostHog MCP apps (insights / dashboard)