CS-277 [Improvement] Statement of applicability changes#2648
CS-277 [Improvement] Statement of applicability changes#2648
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
3 issues found across 24 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/page.tsx">
<violation number="1" location="apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/page.tsx:120">
P2: Pending-approval state can remain stuck because `isPendingApproval` is computed once on the server and then OR’ed into live client status.</violation>
</file>
<file name="apps/app/src/app/(app)/[orgId]/documents/components/CompanyOverviewCards.tsx">
<violation number="1" location="apps/app/src/app/(app)/[orgId]/documents/components/CompanyOverviewCards.tsx:124">
P2: Scope the frameworks SWR cache key by `organizationId` to avoid cross-org stale framework state.</violation>
<violation number="2" location="apps/app/src/app/(app)/[orgId]/documents/components/CompanyOverviewCards.tsx:181">
P2: Gate SOA card rendering behind the same `ai-vendor-questionnaire` feature flag used by the SOA page.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
…ve-statement-of-applicability
There was a problem hiding this comment.
1 issue found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/api/src/soa/utils/export-generator.ts">
<violation number="1" location="apps/api/src/soa/utils/export-generator.ts:163">
P2: Long question blocks can overflow off the page because pagination is only checked once per block, not while writing each line.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
|
@cubic-dev-ai review it |
@chasprowebdev I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
2 issues found across 36 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/components/SOAFrameworkTable.tsx">
<violation number="1" location="apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/components/SOAFrameworkTable.tsx:110">
P2: Guard the answers sync effect so partial SWR document payloads without `answers` do not clear `answersMap` and revert table values.</violation>
</file>
<file name="apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/page.tsx">
<violation number="1" location="apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/page.tsx:155">
P2: Handle `/v1/frameworks` fetch errors before showing the "ISO 27001 framework not found" message.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
…al data in SOA page
|
@cubic-dev-ai review it |
@tofikwest I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 36 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/api/src/soa/dto/export-soa-document.dto.ts">
<violation number="1" location="apps/api/src/soa/dto/export-soa-document.dto.ts:4">
P2: Add non-empty validation for required ID fields; `@IsString()` alone allows empty identifiers.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
@cubic-dev-ai review it |
@tofikwest I have started the AI code review. It will take a few minutes to complete. |
|
🎉 This PR is included in version 3.34.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This is an automated pull request to merge chas/move-statement-of-applicability into dev.
It was created by the [Auto Pull Request] action.
Summary by cubic
Moves the ISO 27001 Statement of Applicability into Documents with a dedicated page, a dashboard card showing live approval status, and one‑click PDF export. Adds SOA to the Documents score and framework editor; tracks declines with
declinedAt, improves approval handling (including declined), and redirects the old questionnaire tab (CS‑277).New Features
StatementOfApplicabilitypage at/{orgId}/documents/statement-of-applicabilityand anSOAOverviewCardthat shows live status (Approved/Pending/Declined/Not approved) with precise owner/admin checks and safe loading states.POST /v1/soa/exportto download SOA as a PDF with progress metrics and approval metadata (approver,approvedAt,declinedAt); sets filename/headers, paginates long content, and shows correct approval text and labels for approved/declined/pending.approvedAtset).declinedAttoSOADocument; service clears/setsapprovedAt/declinedAt/approverIdon approve/submit/decline and on edits; UI/PDF show accurate approval text.statement_of_applicabilitydocument type and disabled control linking for SOA.Bug Fixes
/v1/frameworksand SOA setup errors on the SOA page and overview card to avoid infinite loading, false “not found,” or incorrect status; key SWR by org to prevent cross‑org leaks.organizationId/documentIdfor/v1/soa/export.Written for commit bfd1f5f. Summary will update on new commits. Review in cubic