Skip to content

[dev] [carhartlewis] lewis/comp-company-tasks#2128

Merged
carhartlewis merged 21 commits into
mainfrom
lewis/comp-company-tasks
Feb 17, 2026
Merged

[dev] [carhartlewis] lewis/comp-company-tasks#2128
carhartlewis merged 21 commits into
mainfrom
lewis/comp-company-tasks

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

This is an automated pull request to merge lewis/comp-company-tasks into dev.
It was created by the [Auto Pull Request] action.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 12, 2026

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

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Feb 17, 2026 11:34am
portal Ready Ready Preview, Comment Feb 17, 2026 11:34am

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Feb 12, 2026

PR Summary

Medium Risk
Introduces new authenticated APIs that write evidenceSubmission records, upload files to S3, and expands findings/notifications to target either tasks or evidence submissions; mistakes could impact authorization, data integrity, or expose downloads.

Overview
Adds a new Evidence Forms feature end-to-end. The API now exposes v1/evidence-forms endpoints to list form definitions, submit and review organization-scoped submissions, upload form files (base64→S3 with size checks), and export submissions to CSV with presigned file URLs.

Extends the Findings domain to attach findings to either a taskId or an evidenceSubmissionId, including new query support, creation validation, shared include shape, audit log fields, and notifications/URLs that switch between task and document-submission context.

Updates the app to introduce a new Documents section (sidebar + search) with pages/components for form overview, submission wizard, submission detail (including review for access requests), CSV export, and integration with the new API. Also adds org setting update actions/schemas for whistleblowerReportEnabled and accessRequestFormEnabled, and wires in shared @comp/company definitions (deps + Next transpilePackages).

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

Comment thread apps/api/src/evidence-forms/evidence-forms.service.ts
Comment thread apps/api/src/evidence-forms/evidence-forms.service.ts Outdated
Comment thread apps/api/src/evidence-forms/evidence-forms.service.ts
Comment thread apps/api/src/evidence-forms/evidence-forms.service.ts
Comment thread apps/app/src/app/(app)/[orgId]/company/components/CompanySubmissionWizard.tsx Outdated
Comment thread apps/api/src/evidence-forms/evidence-forms.controller.ts
Comment thread apps/api/src/evidence-forms/evidence-forms.service.ts
Comment thread apps/app/src/app/(app)/[orgId]/documents/components/CompanyFormPageClient.tsx Outdated
Comment thread apps/app/src/app/(app)/[orgId]/documents/components/CompanySubmissionWizard.tsx Outdated
@vercel vercel Bot temporarily deployed to Preview – app February 13, 2026 13:08 Inactive
github-actions Bot and others added 2 commits February 13, 2026 13:09
…es (#2129)

Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
…2130)

* fix(api): fix policy version content stored as empty arrays via API

class-transformer with enableImplicitConversion was converting TipTap node
objects to empty arrays when processing content: unknown[] DTO fields.
Added @Transform decorator to preserve raw values.

Also:
- Block content updates on published policies via PATCH /policies/:id
- Align updateVersionContent guard with UI (only block current version when published)
- Sync content to current version when updating via PATCH /policies/:id
- Add GET /policies/:id/versions/:versionId endpoint
- Add Swagger docs for new endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(app): allow PDF upload/delete on draft policy versions and fix false success toast

The upload and delete PDF guards blocked all operations on the current version
regardless of policy status. Now only blocks when policy is actually published
(matching the pattern used everywhere else).

Also fixed PdfViewer onSuccess handlers to check result.data.success before
showing the success toast — previously showed "PDF uploaded successfully"
even when the server action returned { success: false }.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(api,app): protect current version during needs_review status and fix stale pointer

Change version mutation guards from `status === 'published'` to `status !== 'draft'`
so that the current version is also protected when the policy is in needs_review state.
Fix stale currentVersionId in updateById by reading it inside the transaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(api): move status guard inside transaction to prevent concurrent publish bypass

The draft-only content guard was reading policy status before the
transaction, allowing a concurrent publish to bypass the check. Now
the existence check and status guard both run inside the transaction.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@vercel vercel Bot temporarily deployed to Preview – app February 13, 2026 13:27 Inactive
Merge origin/main into lewis/comp-company-tasks and resolve conflicts.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread apps/api/src/findings/findings.service.ts
Copy link
Copy Markdown

@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 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Comment thread apps/api/package.json
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.83.2 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants