Draft
Conversation
- Add comprehensive template library for workflow templates - Support publishing workflows as templates with GitHub integration - Allow users to browse and use existing templates - Include template submission workflow with pull request generation - Add frontend UI for template discovery and usage - Add database schema for templates and submissions - Implement GitHub template service for fetching templates - Add workflow sanitization service to remove sensitive data - Include TypeScript type definitions and error handling Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
- Change Array<T> to T[] in templateStore.ts - Fix Select component props formatting in TemplateLibraryPage - Fix Button onClick callback formatting - Fix fetch call and .json() chaining formatting - Fix Publish as Template text wrapping in TopBar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
- Change Array<T> to T[] throughout template files - Fix import statement formatting - Fix query chain formatting in repository - Fix unused variables by prefixing with underscore - Fix object literal formatting and error logging Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
…lity issue The TemplatesModule causes a "function is not a constructor" error when loaded by NestJS in the Bun runtime. This is a known Bun+NestJS compatibility issue (see oven-sh/bun#4858). Changes: - Added forwardRef for WorkflowsModule import (good practice regardless) - Added comments documenting the temporary disable - Removed TemplatesModule from app.module.ts coreModules array The backend now starts successfully. The template library feature will be unavailable until this compatibility issue is resolved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
This commit refactors the Template Library to use GitHub's web flow for publishing instead of Octokit API, and fixes Bun+NestJS compatibility issues. Changes: - Frontend now generates GitHub URLs directly for template submission - Added GitHub sync service to fetch templates from repository - Made template listing endpoints public for browsing - Fixed Bun+NestJS constructor error by removing duplicate providers - Replaced RequireWorkflowRole with RolesGuard to avoid module dependencies - Added better PR creation instructions in the publish modal - Removed Octokit dependency and token from backend Users can now: 1. Publish workflows as templates via GitHub PR flow 2. Browse templates from the library (after sync from GitHub) 3. Sync templates from GitHub repo to database via admin endpoint Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
This is required for webhook signature verification. Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
The sync is now handled directly by GitHubSyncService in the controller. This removes confusing dead code that returned a "disabled" message. Also fixes ESLint errors for unused parameters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
- Remove webhook controller and token auth (repo is public) - Remove periodic sync interval to avoid GitHub rate limit exhaustion - Add graceful 403 rate limit handling in GitHub API calls - Fix findAll() query composition bug using and() pattern - Add tag filtering, ILIKE escaping, and proper sort ordering - Add ARCHITECTURE.md documenting the template library system Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
…b URL length limit Large workflow graphs were causing "URL is too long" errors on GitHub. Now copies template JSON to clipboard and instructs user to paste it in the GitHub editor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
Backend: Remove mandatory `manifest` field check - actual templates only have `_metadata`, `graph`, and `requiredSecrets`. Build manifest from `_metadata` for DB storage. Frontend: Strip viewport/position data from graph to reduce URL size. Embed template content in GitHub URL when it fits (<7.5KB), fall back to clipboard with paste instructions only for very large templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
- Implement useTemplate endpoint: creates a real workflow from template graph via WorkflowsService, increments popularity counter - Publish flow: use minified JSON + stripped layout data to always embed content in GitHub URL (no clipboard fallback) - Template cards: fix inconsistent button positioning with flex layout so buttons are always pinned to the bottom of each card Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
…oken support - Fix workflowId undefined in redirect by mapping backend response (workflow.id → workflowId) in templateStore - Restore pretty-printed JSON (2-space indent) in publish flow so GitHub renders syntax highlighting correctly - Add optional GITHUB_TEMPLATE_TOKEN env var for authenticated API requests (60 → 5000 req/hr) with startup log showing auth status Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
- Implement ETag-based caching in GitHub sync service: stores ETags per URL, sends If-None-Match on subsequent requests, returns cached data on 304 Not Modified (zero rate limit cost) - Fix Use Template 500 error caused by missing node positions: add default grid layout positions for nodes that lack them before WorkflowGraphSchema validation - Stop stripping node positions during publish (required by schema), only strip viewport which has a schema default - Sync response now includes unchanged[] and directoryCacheHit stats Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
- app.module.ts: Keep both StudioMcpModule (main) and TemplatesModule (ours) - TopBar.tsx: Keep Tooltip import + hasAnalyticsSink (main) and isInWorkflowBuilder + publish dropdown (ours) - bun.lock: Regenerated from main's lockfile Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Krishna Mohan <krishanmohank974@gmail.com>
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
Test plan