Skip to content

[comp] Production Deploy#2125

Merged
tofikwest merged 8 commits intoreleasefrom
main
Feb 12, 2026
Merged

[comp] Production Deploy#2125
tofikwest merged 8 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 February 11, 2026 17:50
…2123)

Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com>
Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
@cursor
Copy link

cursor bot commented Feb 11, 2026

PR Summary

Medium Risk
Touches database schema and introduces new API endpoints with S3 file handling plus a large new UI surface for org-chart editing; also changes policy update/version immutability logic via transactions, which could impact existing editing flows if edge cases weren’t covered.

Overview
Adds a new Org Chart feature end-to-end: a Prisma OrganizationChart table, a NestJS OrgChartModule with GET/PUT/POST /v1/org-chart (interactive React Flow nodes/edges) plus image/PDF upload to S3 with signed URL retrieval and cleanup, and a new People page “Chart” tab with an interactive editor (via @xyflow/react) or uploaded-image viewer.

Extends Member with optional jobTitle, propagating it through API DTOs/queries and the People UI (including editing job title and automatically removing deactivated/removed members from the org chart).

Improves policy/version handling: adds GET /v1/policies/:id/versions/:versionId, adds DTO Transform passthroughs for JSON arrays, and enforces draft-only edits for current/published content (including PDF upload/delete) with transactional updates to prevent concurrent publish/edit bypass. Also adds portal support to remove Fleet policy evidence images (DB delete + best-effort S3 batch delete), switches DNS verification to Node’s built-in DNS resolver, and updates NEXT_PUBLIC_PORTAL_URL in .env.example.

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

@vercel
Copy link

vercel bot commented Feb 11, 2026

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

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Feb 12, 2026 9:53pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Feb 12, 2026 9:53pm

Request Review

#2102)

* feat(app): send onboarding email for new employee

* fix(app): update NEXT_PUBLIC_PORTAL_URL in .env.example

* fix(app): employee onboarding email failure after member created causes inconsistent state

* fix(app): rebuilt the invite link sent to the new employee

* fix(app): remove the unused variables in addEmployeeWithoutInvite.ts

* fix(app): failed employee additions silently counted as successful

---------

Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com>
Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
Co-authored-by: chasprowebdev <70908289+chasprowebdev@users.noreply.github.com>
@vercel vercel bot temporarily deployed to staging – portal February 11, 2026 18:16 Inactive
* feat(portal): add a way to remove screenshots on portal

* fix(portal): remove images from S3 when removing screenshots on portal

* fix(app): fix the limit issue of S3 delete request

* fix(app): return fail if S3 deletion fails

* fix(portal): policy image reset modal should not be closed  during deletion

* fix(portal): reverse the operation order - delete DB records first, then S3

---------

Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com>
Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
Co-authored-by: chasprowebdev <70908289+chasprowebdev@users.noreply.github.com>
…g external APIs (#2126)

Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com>
* feat(org-chart): add organization chart functionality and job title field

* feat(org-chart): implement upsert functionality and enhance org chart DTO

* feat(org-chart): enhance file upload validation and add org chart member type

* feat(org-chart): update org chart DTO structure and enhance upload handling

* refactor(org-chart): clean up imports and simplify code structure in OrgChartEditor

* feat(employee): add job title field and implement member reactivation functionality

* feat(people): add job title field to PeopleResponseDto and update queries

* refactor(people): simplify tab labels in PeoplePageTabs component

---------

Co-authored-by: Lewis Carhart <lewis@trycomp.ai>
Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
…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>
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 1 potential issue.

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

]);

// Remove the member from the org chart (if present)
await removeMemberFromOrgChart(ctx.session.activeOrganizationId, memberId);
Copy link

Choose a reason for hiding this comment

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

Org chart removal blocks critical member deactivation step

Medium Severity

removeMemberFromOrgChart is called before the critical db.member.update that deactivates the member, and the function has no internal error handling. If the org chart DB update throws (e.g., timeout), the member is never deactivated — yet all their task/policy/risk/vendor assignments are already cleared by the preceding Promise.all. This leaves the member active but stripped of all assignments. In contrast, update-employee.ts correctly calls removeMemberFromOrgChart after the member update transaction has committed.

Additional Locations (1)

Fix in Cursor Fix in Web

@tofikwest tofikwest merged commit a39a64a into release Feb 12, 2026
14 checks passed
@claudfuen
Copy link
Contributor

🎉 This PR is included in version 1.82.3 🎉

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.

2 participants