Fix missing ClickUp artifact tab in conversation - #754
Draft
adriandemian wants to merge 3 commits into
Draft
Conversation
…c0c77a5 # Conflicts: # frontend/src/components/agents/AgentsArtifactPane.test.tsx # frontend/src/components/agents/AgentsArtifactPane.tsx
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
User Impact
Technical Context
AgentsClickUpTicketPanelrendering the linked task summary, state, assignees, tags, description, and external-link actions.AgentsChatHeaderto route linked tickets by their actual provider and teaches the start-conversation flow to recognize ClickUp references, invalidate the ClickUp conversation-ticket query, and select the ClickUp tab after a ClickUp-started conversation is created.linkTicketToConversationto the frontend ticketing API and uses it from the dashboard when binding an existing conversation to a ClickUp ticket.ClickUpIntegrationServiceis available in chat processing, ClickUp references can be expanded into prompt context, and the ticketing command surface exposes the ClickUp conversation-linking path.Risks / Follow-Ups
View full plan
ClickUp Conversation Context And Artifact Tab Fix
Goal
User report: "I started conversation from the clickup ticket and got sent in the top of conversation but the artifact was not created tab on right with the clickup ticket details and conversation can’t read .. most likely a bug"
Interpretation: starting an Agent conversation from a ClickUp ticket should behave like Jira/Linear starts. The created conversation must keep a durable ticket association, the agent runtime must receive enough ClickUp task context to reason about the issue, and the right-side artifact pane/header must expose the ClickUp ticket details for the user.
Assumptions:
Plantab is not itself the ClickUp ticket surface. Ticket details should appear in a provider-specific or provider-neutral ticket tab, while plan artifacts remain implementation plans.Evidence
frontend/src/components/ticketing/TicketingDashboardView.tsxcurrently createscomposerIntegrationReferencesfrom the selected ticket, so the ClickUp ticket reference can reach conversation start.supportsConversationBinding = activeProvider !== "clickup", which explains why durable linkage is missing.src-tauri/src/application/chat_service/mod.rsresolves Jira and Linear references into runtime prompt context, but does not expand ClickUp references into full ticket details.src-tauri/src/commands/ticketing_commands/mod.rsreturns linked Jira/Linear tickets fromget_conversation_ticket()and persists Jira/Linear links inlink_started_ticket_to_conversation(), while ClickUp is explicitly deferred.frontend/src/stores/agentSessionStore.ts,frontend/src/components/agents/AgentsArtifactPane.tsx,frontend/src/components/agents/useStartAgentConversation.ts, andfrontend/src/components/agents/AgentsChatHeader.tsxmodel right-pane ticket tabs as Jira/Linear-only.Affected Files
src-tauri/src/domain/...: add or extend domain models for a durable ClickUp conversation-ticket association, preferably through the smallest provider-neutral shape compatible with existing Jira/Linear code.src-tauri/src/infrastructure/...: add SQLite and memory repository support plus migrations for ClickUp conversation links or a shared ticket-link table.src-tauri/src/application/chat_service/mod.rs: expand ClickUp composer references into full agent prompt context on interactive and queued conversation starts.src-tauri/src/commands/ticketing_commands/mod.rs: wire ClickUp intoget_conversation_ticket, link creation, association queries, and invalidation-friendly response payloads.src-tauri/src/application/clickup...or existing ClickUp integration service files: expose a focused task-detail fetch/render method for prompt hydration.frontend/src/stores/agentSessionStore.ts: addclickupas a valid artifact tab or introduce a provider-neutral ticket tab if the local pattern supports it cleanly.frontend/src/components/agents/AgentsArtifactPane.tsx: lazy-load and render the ClickUp ticket panel with a first-paint shell.frontend/src/components/agents/useStartAgentConversation.ts: allow ClickUp-started conversations to open/invalidate the ticket tab.frontend/src/components/agents/AgentsChatHeader.tsx: replace binary Jira/Linear mapping with explicit provider handling.frontend/src/components/ticketing/...: remove ClickUp binding exclusion once backend persistence exists.frontend/src/**/*.test.*andsrc-tauri/src/**/*test*: add focused regressions before production changes.Data / State
The implementation should persist a conversation-to-ticket link with enough fields to refetch and display the ticket later:
clickupPreferred direction: add a provider-neutral
conversation_ticket_linksmodel/table only if it can coexist cleanly with the existing Jira/Linear repositories. If that causes a broad rewrite, add a ClickUp-specific repository matching current Jira/Linear patterns and track provider-neutral consolidation as follow-up debt.Migration requirements:
Agent And MCP Surface
Agent runtime context should include a concise structured ClickUp task block when a conversation is started from or linked to a ClickUp task:
The agent should not be asked to fetch ClickUp details itself. The backend should hydrate the prompt before spawning/resuming the provider process, matching Jira/Linear behavior.
UI / UX
The right-side pane should expose ClickUp ticket details after a ClickUp-started conversation is created or reopened.
Expected behavior:
Implementation preference: reuse shared ticket-detail primitives where possible. Avoid three independent copies of the same panel logic if a small provider-neutral panel can render the existing normalized ticket shape.
Progression Scenarios
Constraints
Planartifact. The plan artifact is for implementation planning; the ticket detail belongs to a ticket/integration tab.Avoid
Decisions
clickupor a provider-neutral ticket tab, not the existingplantab.Implementation Steps
composer_reference_runtime_message().link_started_ticket_to_conversation(),get_conversation_ticket(), and association queries handle ClickUp.Proof Obligations
Testing Strategy
Backend:
get_conversation_ticket()returning ClickUp links.Frontend:
Manual smoke:
Generated by RalphX
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.