Added copilot actions support#8
Merged
Merged
Conversation
Contributor
yusufaytas
commented
Jan 8, 2026
- Added Copilot-suggested runbooks with one-sentence justifications.
- Updated PlanBrowser and filters to support URL-based filtering (query, scope) for deep-linking.
- Mapped orchestration tool calls (query plans/runs) to their corresponding frontend routes in referenceBuilder.
- Updated core types and ResponseDetails to render the new actions array in Copilot answers.
There was a problem hiding this comment.
Greptile Overview
Greptile Summary
This PR adds Copilot-suggested orchestration actions and deep-linking support for orchestration plans. The implementation allows Copilot to recommend specific runbooks with justifications, and enables URL-based filtering for direct navigation to filtered plan views.
Key Changes:
- Added
CopilotActiontype withid,name,reason, andtypefields for recommended actions - Created
ActionLinkscomponent to display action recommendations as clickable cards - Updated
PlanBrowserandPlanFiltersto support URL query parameters (query,scope) for deep-linking - Extended
referenceBuilderto map 6 orchestration tool calls to frontend routes - Added
orchestrationPlansto reference types for Copilot-generated plan links - Comprehensive test coverage for all new orchestration tool mappings
Issue Found:
- The
loadChatfunction doesn't preserveactionsfrom historical chat turns, so previously recommended actions won't display when viewing chat history
Confidence Score: 4/5
- This PR is safe to merge with one minor fix needed for chat history
- The implementation is well-structured with comprehensive test coverage. However, the
loadChatfunction has a bug where it doesn't preserve actions from historical chat turns, which will cause action recommendations to disappear when viewing chat history. This is a minor functional issue that should be fixed but doesn't affect new chat sessions. - Pay attention to
app/components/(enterprise)/CopilotPanel.tsx- the loadChat function needs to preserve actions from historical turns
Important Files Changed
File Analysis
| Filename | Score | Overview |
|---|---|---|
| app/lib/types.ts | 5/5 | Added CopilotAction type and orchestrationPlans to CopilotReferences, well-typed |
| app/components/(enterprise)/copilot/ActionLinks.tsx | 5/5 | New component to render recommended orchestration actions with proper styling |
| app/components/(enterprise)/CopilotPanel.tsx | 4/5 | Added actions extraction in normalizeAnswer, but loadChat doesn't preserve actions from history |
| app/components/PlanBrowser.tsx | 5/5 | Added URL param parsing for deep-linking with query and scope filters |
| app/lib/referenceBuilder.ts | 5/5 | Added comprehensive orchestration tool mappings to frontend routes |
Sequence Diagram
sequenceDiagram
participant User
participant CopilotPanel
participant API as /api/copilot
participant ResponseDetails
participant ActionLinks
participant PlanBrowser
participant referenceBuilder
User->>CopilotPanel: Ask question
CopilotPanel->>API: POST message
API-->>CopilotPanel: CopilotAnswer with actions[]
CopilotPanel->>CopilotPanel: normalizeAnswer() extracts actions
CopilotPanel->>ResponseDetails: Render answer with actions
ResponseDetails->>ActionLinks: Pass actions array
ActionLinks->>ActionLinks: Build href for each action
ActionLinks-->>User: Display action cards with links
User->>ActionLinks: Click action link
ActionLinks->>PlanBrowser: Navigate to /orchestration/plans/{id} or /orchestration/plans?query=...
PlanBrowser->>PlanBrowser: Parse URL params (query, scope)
PlanBrowser->>PlanBrowser: Set initialFilters from params
PlanBrowser->>PlanBrowser: Load plans with filters
PlanBrowser-->>User: Display filtered plans
Note over referenceBuilder: Tool execution hrefs
API->>referenceBuilder: buildToolExecutionHref(toolName, args)
referenceBuilder->>referenceBuilder: Map orchestration tools to routes
referenceBuilder-->>API: Return href with query params
Additional Comments (1)
|
- Added Copilot-suggested runbooks with one-sentence justifications. - Updated PlanBrowser and filters to support URL-based filtering (query, scope) for deep-linking. - Mapped orchestration tool calls (query plans/runs) to their corresponding frontend routes in referenceBuilder. - Updated core types and ResponseDetails to render the new actions array in Copilot answers.
f307597 to
980d325
Compare
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.