feat(frontend,backend): add custom workflow sources to session creation#1550
Draft
quay-devel wants to merge 3 commits into
Draft
feat(frontend,backend): add custom workflow sources to session creation#1550quay-devel wants to merge 3 commits into
quay-devel wants to merge 3 commits into
Conversation
- Add WorkflowSource types and API client functions - Add workflow sources React Query hooks with cache invalidation - Update port/adapter layer for workflow sources CRUD - Add Workflow Sources settings section in workspace settings - Update session creation dialog to group workflows by source - Add SelectLabel and SelectSeparator UI components Addresses: ambient-code#1549 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extend ProjectSettings CRD with workflowSources array field - Add GET/PUT /api/projects/:projectName/workflow-sources endpoints - Extend ListOOTBWorkflows to aggregate workflows from custom sources - Add per-source caching with 5-min TTL - Tag workflows with source name for frontend grouping Addresses: ambient-code#1549
…w sources - Include project namespace in custom source cache keys to prevent cross-tenant workflow leakage in multi-tenant deployments - Add server-side validation: max 20 sources, required name/gitUrl, git URL format check (https://, http://, git@) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ Deploy Preview for cheerful-kitten-f556a0 failed.
|
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
Implements #1549 — Custom Workflow Sources for session creation.
Teams that invest heavily in custom workflows currently have to manually fill out git repo URL, branch, and path every time they want to start a session with a custom workflow. This PR allows users to configure "workflow sources" (git repos containing workflow definitions) at the workspace level, so those workflows appear in the session creation dropdown alongside built-in OOTB workflows.
What Changed
Backend (Go)
projectsettings-crd.yaml): AddedworkflowSourcesarray to the ProjectSettings spec withname,gitUrl,branch, andpathfieldsproject_workflow_sources.go):GET/PUT /api/projects/:projectName/workflow-sourcesfor managing workflow sources, following the existingproject_mcp.gopatternListOOTBWorkflows(sessions.go): Aggregates workflows from both the OOTB repo and project-level custom sources, with per-source 5-min caching, graceful failure handling, and namespace-scoped cache keysroutes.go): New routes insideprojectGroupfor auth middleware coverageFrontend (Next.js/React)
workflow.ts):WorkflowSource,WorkflowSourcesConfigtypes; added optionalsourcefield toOOTBWorkflowworkflows.ts):getWorkflowSources()andupdateWorkflowSources()client functionsuse-workflows.ts):useWorkflowSourcesanduseUpdateWorkflowSourceswith cache invalidationsettings-section.tsx): New "Workflow Sources" card with add/edit/remove source entries (name, git URL, branch, path)create-session-dialog.tsx): Workflows grouped by source usingSelectLabelandSelectSeparator— built-in workflows separated from custom source groupsTesting Performed
go build ./...andgo vet ./...— no errorsnpm run build— 0 errors, 0 warningsGetK8sClientsForRequest()for user-scoped authanytypes in TypeScriptpanic()in Go codeScreenshots
N/A — UI changes follow existing Shadcn design patterns (Card, Input, Button, Select with groups). The workflow selector now shows grouped items with section labels.
Breaking Changes
None. The CRD extension is additive (new optional field). Existing sessions and workflows are unaffected. Workflow sources default to empty (no change in behavior without configuration).
Relates to #1549