Skip to content

[dev] [claudfuen] claudio/comp-121-enable-database-synced-frameworks#637

Merged
claudfuen merged 34 commits intomainfrom
claudio/comp-121-enable-database-synced-frameworks
May 19, 2025
Merged

[dev] [claudfuen] claudio/comp-121-enable-database-synced-frameworks#637
claudfuen merged 34 commits intomainfrom
claudio/comp-121-enable-database-synced-frameworks

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to merge claudio/comp-121-enable-database-synced-frameworks into dev.
It was created by the [Auto Pull Request] action.
Note: This should only be merged after the following checklist is complete:

  • Tested in local environment
  • Created relevant migrations (if any)

claudfuen added 4 commits May 15, 2025 11:34
…ed validation and type safety

- Removed FrameworkId enum and replaced it with a string type in organization schema.
- Updated getRelevantControls function to return a promise with TemplateControlNew type.
- Introduced new control types for better structure and validation.
- Refactored createFrameworkInstance and related functions to accommodate string-based framework IDs.
- Deleted unused Toolbar component from framework editor for cleaner codebase.
… creation

- Updated createOrganizationAction to connect or create requirements for the active organization.
- Refactored control data fetching to include framework details directly, removing the need for a separate getFrameworkDetails function.
- Enhanced UI components to utilize the new framework structure, improving data access and display.
- Added new database migrations to support the updated relationships between frameworks and instances.
- Cleaned up unused code related to framework details retrieval for better maintainability.
- Added a TODO comment in FrameworkInstance model to establish a relation with the FrameworkEditorFramework table.
- Included a TODO comment in RequirementMap model to update requirementId to reference the requirement table.
…ine organization initialization

- Updated organization schema to replace 'frameworks' with 'frameworkIds' for clarity.
- Refactored createOrganizationAction to utilize the new frameworkIds structure.
- Introduced initializeOrganization function to handle organization setup, including framework and requirement relations.
- Adjusted UI components to reflect the new naming convention for improved consistency.
@linear
Copy link

linear bot commented May 16, 2025

@vercel
Copy link

vercel bot commented May 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 9:33pm
comp-framework-editor ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 9:33pm
comp-trust ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 19, 2025 9:33pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
comp-portal ⬜️ Skipped (Inspect) May 19, 2025 9:33pm

…/comp-121-enable-database-synced-frameworks
- Replaced instances of the 'ky' HTTP client with 'axios' in multiple files for improved functionality.
- Added 'axios' version 1.9.0 to dependencies in package.json and bun.lock.
- Updated 'better-auth' and 'kysely' package versions in bun.lock and yarn.lock for compatibility.
- Changed FrameworkId type from keyof Frameworks to string for broader compatibility.
- Updated AllRequirements and TemplateRequirement types to remove specific mappings, enhancing flexibility in requirement handling.
- Ensured consistency across type definitions in various files to align with recent schema changes.
claudfuen added 2 commits May 19, 2025 10:22
…/comp-121-enable-database-synced-frameworks
…ions

- Updated RequirementRow component to directly access requirement details without optional chaining.
- Removed TypeScript error suppression in getRequirementDetails function.
- Simplified SingleFrameworkRequirements type definition by removing the generic parameter.
- Added foreign key constraint for RequirementMap in a new migration file.
- Deleted outdated migration files related to foreign key constraints and enum types.
…ion initialization

- Introduced new foreign key relationships for Control, Policy, and Task models to link them with their respective template models.
- Updated the organization initialization logic to remove outdated entity mapping for task templates.
- Added a new migration file to implement the changes in the database schema.
… management

- Replaced Artifact references with Policy in control-related components and data fetching functions, streamlining the data model.
- Updated the PoliciesTable component to display policies linked to controls, enhancing visibility and management.
- Refactored control progress calculations to utilize policies instead of artifacts, ensuring accurate compliance tracking.
- Removed obsolete artifact-related functions and data structures, simplifying the codebase and improving maintainability.
- Adjusted mapping functions to connect policies directly to controls, improving data integrity and relationships.
claudfuen added 2 commits May 19, 2025 17:06
…structure and retrieval

- Transitioned from direct control relationships to mapped requirements, improving data integrity and clarity in the framework instance structure.
- Refactored data fetching functions to include policies and requirements mapped under controls, ensuring accurate representation of relationships.
- Updated various components to reflect changes in data structure, including PoliciesTable and RequirementsTable, enhancing user experience and data management.
- Removed obsolete foreign key constraints and tables related to the previous control-framework relationships, streamlining the database schema.
- Enhanced logging for better debugging and tracking of framework and control data retrieval processes.
…/comp-121-enable-database-synced-frameworks
- Altered the data types of frameworkId and requirementId columns to TEXT in their respective tables.
- Dropped obsolete enum types for FrameworkId and RequirementId.
- Established foreign key constraints between FrameworkInstance and FrameworkEditorFramework, as well as between RequirementMap and FrameworkEditorRequirement, with cascading delete and update options for improved data integrity.
…rk and requirement mappings

- Added foreign key constraint for frameworkId in FrameworkInstance referencing FrameworkEditorFramework.
- Added foreign key constraint for requirementId in RequirementMap referencing FrameworkEditorRequirement.
- Ensured proper formatting in migration SQL files for consistency.
claudfuen added 2 commits May 19, 2025 17:22
…er column types

- Deleted foreign key constraints for frameworkId in FrameworkInstance and requirementId in RequirementMap.
- Added migrations to change the data types of frameworkId and requirementId columns to TEXT for better compatibility.
- Streamlined the database schema by removing obsolete migration files.
- Introduced a new column "visible" of type BOOLEAN to the FrameworkEditorFramework model, with a default value of true.
- Added corresponding migration SQL to alter the table structure, enabling visibility control for framework editors.
claudfuen added 2 commits May 19, 2025 17:27
- Added a new "visible" boolean field to the FrameworkBaseSchema with a default value of true.
- Updated FrameworkRequirementsClientPage and EditFrameworkDialog to display and manage the visibility status.
- Modified update-framework-action to handle the visibility field during updates.
- Introduced a new column in the framework table to represent the visibility status in the UI.
- Introduced a new 'visible' property to the FrameworkEditorFramework model in various components, including NoAccess, Setup, Header, Sidebar, MobileMenu, and CreateOrgModal.
- Updated relevant interfaces and filtering logic to utilize the 'visible' property, ensuring only visible frameworks are displayed in the UI.
@claudfuen
Copy link
Contributor

🎉 This PR is included in version 1.27.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant