Skip to content

[comp] Production Deploy#2393

Merged
Marfuen merged 3 commits intoreleasefrom
main
Mar 30, 2026
Merged

[comp] Production Deploy#2393
Marfuen merged 3 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
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 30, 2026 18:23
@cursor
Copy link
Copy Markdown

cursor bot commented Mar 30, 2026

PR Summary

Medium Risk
Moderate risk: adds a new permission-gated API endpoint and changes employee removal to call People APIs (affecting deactivation/session revocation flows). Also disables audit logging on assistant chat history mutations, which could impact compliance visibility if misused.

Overview
Adds a new Tasks API for templates. Introduces GET /v1/tasks/templates (with optional frameworkId filter) and wires it to a new TasksService.getTaskTemplates query.

Shifts frontend behavior to use API-backed people/task operations. The app’s remove-employee server action now deactivates members and updates roles via serverApi calls to /v1/people/:id instead of direct DB deletes/updates, and the useTaskTemplates hook switches from /v1/framework-editor/task-template to the new /v1/tasks/templates endpoint.

Reduces audit noise for assistant chat history. Marks assistant chat PUT /history and DELETE /history with @SkipAuditLog(), and clarifies in PeopleService.deleteById why sessions are deleted directly from the DB during member deactivation.

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

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

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

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Mar 30, 2026 8:08pm
comp-framework-editor Ready Ready Preview, Comment Mar 30, 2026 8:08pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal (staging) Skipped Skipped Mar 30, 2026 8:08pm

Request Review

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.

Fix All in Cursor

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

});

return templates;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicated task template query logic across services

Low Severity

TasksService.getTaskTemplates() duplicates the query logic from TaskTemplateService.findAll() — same table, same orderBy, same where clause structure filtering by frameworkId. The only difference is findAll additionally includes controlTemplates. Rather than duplicating, the controller could reuse TaskTemplateService (or extract a shared query method) to avoid the two implementations drifting apart over time.

Fix in Cursor Fix in Web

* fix(auth): use better-auth APIs instead of direct DB session operations

- remove-employee.ts: Replace direct db.member.delete + db.session.deleteMany
  with API calls (DELETE /v1/people/:id and PATCH /v1/people/:id). The API
  handles session cleanup, assignment clearing, and notifications properly.

- people.service.ts: Replace db.session.deleteMany with
  auth.api.revokeUserSessions to go through better-auth's session management
  instead of bypassing it with direct DB writes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(auth): revert people.service session deletion to direct DB call

auth.api.revokeUserSessions requires admin middleware with an authenticated
session context, which isn't available in a NestJS service. Since the API
server IS the auth server, and better-auth's own revokeUserSessions
internally just calls deleteSessions (same as db.session.deleteMany),
direct DB access is the correct approach here.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Mariano Fuentes <marfuen98@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel vercel bot temporarily deployed to staging – portal March 30, 2026 19:22 Inactive
@Marfuen Marfuen merged commit 2163071 into release Mar 30, 2026
13 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.12.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.

2 participants