Skip to content

[comp] Production Deploy#2356

Merged
carhartlewis merged 3 commits intoreleasefrom
main
Mar 21, 2026
Merged

[comp] Production Deploy#2356
carhartlewis merged 3 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.

github-actions bot and others added 2 commits March 20, 2026 22:46
* feat(framework-editor): add control, policy, and requirement templates with CRUD operations

- Implemented ControlTemplate, PolicyTemplate, and Requirement modules, controllers, and services.
- Added DTOs for creating and updating control and policy templates.
- Integrated permission checks for all CRUD operations using @RequirePermission decorator.
- Enhanced the framework editor with new endpoints for managing templates and requirements.

* fix(control): drop documentTypes column from FrameworkEditorControlTemplate table

- Added migration to remove the documentTypes column, which will result in data loss.
- Updated Control model to include controlDocumentTypes relation.

* feat(framework-editor): add documentTypes field to FrameworkEditorControlTemplate model

- Introduced documentTypes field to the FrameworkEditorControlTemplate model to support evidence form types.
- This addition enhances the framework editor's capability to manage document types associated with control templates.

* feat(framework-editor): add Prisma schema and initial migration for Framework Editor

- Introduced a new Prisma schema for the Framework Editor, defining models such as User, Attachment, and Session.
- Added a migration to create the necessary database structure for the new schema.
- This setup enhances the framework editor's capabilities for managing user sessions and attachments.

* feat(framework-editor): enhance services with conflict handling and new validation

- Added ConflictException handling in delete methods for ControlTemplateService, FrameworkEditorFrameworkService, and PolicyTemplateService to prevent deletion of referenced templates.
- Updated data update logic in FrameworkEditorFrameworkService and PolicyTemplateService to conditionally include fields.
- Introduced MaxJsonSize validator for policy content to enforce size limits on JSON input.
- Enhanced UpdateTaskTemplateDto to include automationStatus field with validation.
- Removed deprecated NuqsWrapper component and cleaned up unused search query parameters in DataTable component.

* refactor(framework-editor): update controllers to use PlatformAdminGuard and remove RequirePermission decorators

- Replaced HybridAuthGuard and PermissionGuard with PlatformAdminGuard in ControlTemplate, Framework, PolicyTemplate, Requirement, and TaskTemplate controllers.
- Removed @RequirePermission decorators from various endpoints to streamline permission handling.
- Updated session validation logic in layout and auth pages to check for admin role.
- Adjusted authorization utility to enforce admin role requirement alongside internal user check.

* feat(framework-editor): enhance templates with frameworkId support in CRUD operations

- Updated ControlTemplate, PolicyTemplate, and TaskTemplate controllers and services to accept frameworkId as a query parameter for create and findAll methods.
- Modified service logic to conditionally include requirements and control templates based on the provided frameworkId.
- Enhanced CreateTaskTemplateDto to allow optional fields for better flexibility.
- Updated API documentation to reflect the new frameworkId parameter in relevant endpoints.

* feat(framework-editor): add linking functionality for controls, tasks, and policies

- Implemented new endpoints in FrameworkEditorFrameworkController to link controls, tasks, and policies to frameworks.
- Added corresponding service methods in FrameworkEditorFrameworkService for linking operations.
- Introduced a new AddExistingItemDialog component for selecting and linking existing items in the UI.
- Updated ControlTemplate, TaskTemplate, and PolicyTemplate services to include linked items in their data fetching logic.
- Enhanced API documentation to reflect the new linking endpoints and their parameters.

---------

Co-authored-by: Lewis Carhart <lewis@trycomp.ai>
@vercel
Copy link

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comp-framework-editor Ready Ready Preview, Comment Mar 21, 2026 4:29pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app (staging) Skipped Skipped Mar 21, 2026 4:29pm
portal (staging) Skipped Skipped Mar 21, 2026 4:29pm

Request Review

@cursor
Copy link

cursor bot commented Mar 21, 2026

PR Summary

Medium Risk
Adds new platform-admin–gated CRUD endpoints and relationship-linking flows for framework editor data, plus a new standalone framework-editor UI that mutates production data. Also expands auth trusted origins and adjusts policy template content handling, which can impact login/CORS and policy initialization correctness if misconfigured.

Overview
Introduces a Framework Editor management surface end-to-end: new NestJS modules/controllers/services for framework, requirement, control-template, and policy-template (CRUD + linking and framework-scoped queries), and extends task-template to support create, framework filtering, and automationStatus, while tightening access to PlatformAdminGuard.

Expands auth configuration by adding additional trusted origins (including framework-editor.trycomp.ai) and a typed cast for ac, and fixes org initialization to correctly translate policy template TipTap JSON into the array-backed Policy.content/PolicyVersion.content shapes.

Adds a new apps/framework-editor UI with internal-admin auth gating plus pages to create/edit/delete frameworks, inline-edit requirements and controls (with link/unlink relations and document-type mapping), manage policy templates (including TipTap content editing with size validation), and manage tasks with commit/cancel change tracking. Also includes a small app UI addition (DocumentsTable) and minor control-creation sheet styling tweaks.

Written by Cursor Bugbot for commit eac8a20. This will update automatically on new commits. Configure here.

…ditorPolicyTemplate type (#2357)

- Replaced instances of PolicyTemplateItem and PolicyTemplate with FrameworkEditorPolicyTemplate in the policies page and related components.
- Updated type definitions in PoliciesClientPage and PolicyDetailsClientPage to ensure consistency across the framework editor.
- Enhanced type safety for policy handling in the framework editor.

Co-authored-by: Lewis Carhart <lewis@trycomp.ai>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@carhartlewis carhartlewis merged commit 615f09d into release Mar 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant