Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
16d7d99
chore: merge release v3.16.2 back to main [skip ci]
github-actions[bot] Apr 6, 2026
cb0e6af
fix(google-workspace): clarify that email filter variables apply to c…
tofikwest Apr 7, 2026
ecc04a6
Merge pull request #2469 from trycompai/fix/gws-variable-labels
tofikwest Apr 7, 2026
52bb3f6
fix(documents): allow CSV and Excel file uploads for evidence forms
tofikwest Apr 7, 2026
c440317
fix(documents): fix RBAC schema, matrix validation, and step 3 MIME m…
tofikwest Apr 7, 2026
5a90324
fix(notifications): dont send task reminders to employees
github-actions[bot] Apr 7, 2026
e1b29a5
fix(portal): sync activeOrganizationId when navigating between orgs (…
github-actions[bot] Apr 7, 2026
f06febb
fix(documents): use lenient row schema so file upload bypasses row va…
tofikwest Apr 7, 2026
edababd
Merge branch 'main' into worktree-fix+evidence-upload-csv-xlsx
tofikwest Apr 7, 2026
7ded778
fix(documents): use original row index for validation error paths
tofikwest Apr 7, 2026
da7d2d0
chore(deps): update tiptap, lucide-react, electron and remove unused …
github-actions[bot] Apr 7, 2026
6511fa1
Merge branch 'main' into worktree-fix+evidence-upload-csv-xlsx
tofikwest Apr 7, 2026
77d71bd
fix(documents): fix TS strict index access on matrix row
tofikwest Apr 7, 2026
68195a3
Merge pull request #2471 from trycompai/worktree-fix+evidence-upload-…
tofikwest Apr 7, 2026
b3d26e7
feat(trigger): add org tags to all trigger job runs (#2476)
Marfuen Apr 7, 2026
3574357
fix(ci): pin bun version in trigger workflows and regenerate lockfile…
github-actions[bot] Apr 7, 2026
4650bd9
fix(ci): pin bun version in trigger workflows and regenerate lockfile
github-actions[bot] Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/trigger-api-tasks-deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
node-version: "22.x" # Updated to match Node.js w/ Vercel
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.4"
- name: Clear cache
run: rm -rf node_modules .bun
- name: Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger-api-tasks-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.4"

- name: Install dependencies
run: bun install --frozen-lockfile || bun install --frozen-lockfile --ignore-scripts
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger-tasks-deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
node-version: "22.x" # Updated to match Node.js w/ Vercel
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.4"
- name: Clear cache
run: rm -rf node_modules .bun
- name: Install dependencies
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/trigger-tasks-deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.4"

- name: Install dependencies
run: bun install --frozen-lockfile || bun install --frozen-lockfile --ignore-scripts
Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@aws-sdk/client-securityhub": "^3.948.0",
"@aws-sdk/client-sts": "^3.948.0",
"@aws-sdk/s3-request-presigner": "^3.859.0",
"@browserbasehq/sdk": "^2.6.0",
"@browserbasehq/sdk": "2.6.0",
"@browserbasehq/stagehand": "^3.0.5",
"@mendable/firecrawl-js": "^4.9.3",
"@nestjs/common": "^11.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { db } from '@db';
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';
import { BrowserbaseService } from '../../browserbase/browserbase.service';
import { triggerEmail } from '../../email/trigger-email';
import { TaskStatusChangedEmail } from '../../email/templates/task-status-changed';
Expand Down Expand Up @@ -187,6 +187,8 @@ export const runBrowserAutomation = task({
}) => {
const { automationId, automationName, organizationId, taskId } = payload;

await tags.add([`org:${organizationId}`]);

logger.info(`Running browser automation "${automationName}"`, {
automationId,
organizationId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { db } from '@db';
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';

/**
* Trigger task that runs a cloud security scan for a single connection.
Expand All @@ -20,6 +20,8 @@ export const runCloudSecurityScan = task({
const { connectionId, organizationId, providerSlug, connectionName } =
payload;

await tags.add([`org:${organizationId}`]);

logger.info(
`Starting cloud security scan for connection: ${connectionName}`,
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getManifest, runAllChecks } from '@trycompai/integration-platform';
import { db } from '@db';
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';

/**
* Trigger task that runs all checks for a connection.
Expand All @@ -22,6 +22,8 @@ export const runConnectionChecks = task({
}) => {
const { connectionId, organizationId, providerSlug } = payload;

await tags.add([`org:${organizationId}`]);

logger.info(`Auto-running checks for connection ${connectionId}`, {
provider: providerSlug,
organizationId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getManifest, runAllChecks } from '@trycompai/integration-platform';
import { db } from '@db';
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';
import { triggerEmail } from '../../email/trigger-email';
import { TaskStatusChangedEmail } from '../../email/templates/task-status-changed';
import { isUserUnsubscribed } from '@trycompai/email';
Expand Down Expand Up @@ -185,6 +185,8 @@ export const runTaskIntegrationChecks = task({
checkIds,
} = payload;

await tags.add([`org:${organizationId}`]);

logger.info(`Running integration checks for task "${taskTitle}"`, {
taskId,
connectionId,
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/trigger/policies/update-policy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { logger, metadata, queue, schemaTask } from '@trigger.dev/sdk';
import { logger, metadata, queue, schemaTask, tags } from '@trigger.dev/sdk';
import { z } from 'zod';
import { processPolicyUpdate } from './update-policy-helpers';

Expand Down Expand Up @@ -29,6 +29,8 @@ export const updatePolicy = schemaTask({
memberId: z.string().optional(),
}),
run: async (params) => {
await tags.add([`org:${params.organizationId}`]);

try {
logger.info(`Starting policy update for policy ${params.policyId}`);

Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/trigger/questionnaire/answer-question.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { syncOrganizationEmbeddings } from '@/vector-store/lib';
import { logger, metadata, task } from '@trigger.dev/sdk';
import { logger, metadata, tags, task } from '@trigger.dev/sdk';
import { generateAnswerWithRAG } from './answer-question-helpers';

export interface AnswerQuestionPayload {
Expand Down Expand Up @@ -177,6 +177,8 @@ export const answerQuestionTask = task({
questionIndex: number;
totalQuestions: number;
}) => {
await tags.add([`org:${payload.organizationId}`]);

return await answerQuestion(payload);
},
});
4 changes: 3 additions & 1 deletion apps/api/src/trigger/questionnaire/parse-questionnaire.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { extractS3KeyFromUrl } from '@/app/s3';
import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3';
import { db } from '@db';
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';

// Import shared utilities
import {
Expand Down Expand Up @@ -253,6 +253,8 @@ export const parseQuestionnaireTask = task({
}) => {
const taskStartTime = Date.now();

await tags.add([`org:${payload.organizationId}`]);

logger.info('Starting parse questionnaire task', {
inputType: payload.inputType,
organizationId: payload.organizationId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { db, PolicyStatus, type Prisma } from '@db';
import { logger, schemaTask } from '@trigger.dev/sdk';
import { logger, schemaTask, tags } from '@trigger.dev/sdk';
import { z } from 'zod';

const POLICY_BATCH_SIZE = 50;
Expand All @@ -10,6 +10,8 @@ export const migratePoliciesForOrg = schemaTask({
organizationId: z.string(),
}),
run: async ({ organizationId }) => {
await tags.add([`org:${organizationId}`]);

// Find policies without any versions
const policiesWithoutVersions = await db.policy.findMany({
where: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { logger, metadata, task } from '@trigger.dev/sdk';
import { logger, metadata, tags, task } from '@trigger.dev/sdk';
import { db } from '@db';
import { deleteManualAnswerTask } from './delete-manual-answer';

Expand All @@ -17,6 +17,8 @@ export const deleteAllManualAnswersOrchestratorTask = task({
organizationId: string;
manualAnswerIds?: string[]; // Optional: IDs passed directly to avoid race condition
}) => {
await tags.add([`org:${payload.organizationId}`]);

logger.info('Starting delete all manual answers from vector DB', {
organizationId: payload.organizationId,
manualAnswerIdsProvided: !!payload.manualAnswerIds,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';
import { findEmbeddingsForSource } from '@/vector-store/lib/core/find-existing-embeddings';
import { vectorIndex } from '@/vector-store/lib/core/client';
import { db } from '@db';
Expand All @@ -12,6 +12,8 @@ export const deleteKnowledgeBaseDocumentTask = task({
maxAttempts: 3,
},
run: async (payload: { documentId: string; organizationId: string }) => {
await tags.add([`org:${payload.organizationId}`]);

logger.info('Deleting Knowledge Base document from vector DB', {
documentId: payload.documentId,
organizationId: payload.organizationId,
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/trigger/vector-store/delete-manual-answer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';
import { deleteManualAnswerFromVector } from '@/vector-store/lib/sync/sync-manual-answer';

/**
Expand All @@ -11,6 +11,8 @@ export const deleteManualAnswerTask = task({
maxAttempts: 3,
},
run: async (payload: { manualAnswerId: string; organizationId: string }) => {
await tags.add([`org:${payload.organizationId}`]);

logger.info('Deleting manual answer from vector DB', {
manualAnswerId: payload.manualAnswerId,
organizationId: payload.organizationId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { logger, task } from '@trigger.dev/sdk';
import { logger, tags, task } from '@trigger.dev/sdk';
import { GetObjectCommand, S3Client } from '@aws-sdk/client-s3';
import { db } from '@db';
import { batchUpsertEmbeddings } from '@/vector-store/lib/core/upsert-embedding';
Expand Down Expand Up @@ -86,6 +86,8 @@ export const processKnowledgeBaseDocumentTask = task({
},
maxDuration: 1000 * 60 * 30, // 30 minutes for large files
run: async (payload: { documentId: string; organizationId: string }) => {
await tags.add([`org:${payload.organizationId}`]);

logger.info('Processing Knowledge Base document', {
documentId: payload.documentId,
organizationId: payload.organizationId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { logger, metadata, task } from '@trigger.dev/sdk';
import { logger, metadata, tags, task } from '@trigger.dev/sdk';
import { processKnowledgeBaseDocumentTask } from './process-knowledge-base-document';

const BATCH_SIZE = 10; // Process 10 documents at a time
Expand All @@ -14,6 +14,8 @@ export const processKnowledgeBaseDocumentsOrchestratorTask = task({
},
maxDuration: 60 * 60, // 1 hour (in seconds) for large document batches
run: async (payload: { documentIds: string[]; organizationId: string }) => {
await tags.add([`org:${payload.organizationId}`]);

logger.info('Starting Knowledge Base documents processing orchestrator', {
organizationId: payload.organizationId,
documentCount: payload.documentIds.length,
Expand Down
4 changes: 3 additions & 1 deletion apps/api/src/trigger/vendor/vendor-risk-assessment-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { openai } from '@ai-sdk/openai';
import type { Prisma } from '@db';
import type { Task } from '@trigger.dev/sdk';
import { logger, metadata, queue, schemaTask } from '@trigger.dev/sdk';
import { logger, metadata, queue, schemaTask, tags } from '@trigger.dev/sdk';
import { generateObject } from 'ai';
import { z } from 'zod';

Expand Down Expand Up @@ -478,6 +478,8 @@ export const vendorRiskAssessmentTask: Task<
},
maxDuration: 1000 * 60 * 10,
run: async (payload) => {
await tags.add([`org:${payload.organizationId}`]);

const vendor = await db.vendor.findFirst({
where: {
id: payload.vendorId,
Expand Down
10 changes: 5 additions & 5 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@aws-sdk/client-sts": "^3.808.0",
"@aws-sdk/s3-request-presigner": "^3.859.0",
"@azure/core-rest-pipeline": "^1.21.0",
"@browserbasehq/sdk": "^2.5.0",
"@browserbasehq/sdk": "2.6.0",
"@browserbasehq/stagehand": "^3.0.5",
"@calcom/atoms": "^1.0.102-framer",
"@calcom/embed-react": "^1.5.3",
Expand Down Expand Up @@ -60,9 +60,9 @@
"@tanstack/react-form": "^1.23.8",
"@tanstack/react-query": "^5.90.7",
"@tanstack/react-table": "^8.21.3",
"@tiptap/extension-mention": "3.16.0",
"@tiptap/extension-table": "3.16.0",
"@tiptap/react": "3.16.0",
"@tiptap/extension-mention": "3.22.1",
"@tiptap/extension-table": "3.22.1",
"@tiptap/react": "3.22.1",
"@trigger.dev/react-hooks": "4.4.3",
"@trigger.dev/sdk": "4.4.3",
"@trycompai/auth": "workspace:*",
Expand Down Expand Up @@ -96,7 +96,7 @@
"framer-motion": "^12.18.1",
"geist": "^1.3.1",
"jspdf": "^4.2.0",
"lucide-react": "^0.577.0",
"lucide-react": "^1.7.0",
"mammoth": "^1.11.0",
"motion": "^12.35.0",
"nanoid": "^5.1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ export function CompanySubmissionWizard({

const validateRequiredMatrixCells = () => {
for (const field of matrixFields) {
// Skip matrix validation when a companion file has been uploaded
// (e.g. RBAC matrix allows uploading a spreadsheet instead of filling rows)
const companionFileKey = `${field.key.replace('Rows', '')}File`;
const companionFile = getValues(companionFileKey as never);
if (companionFile && typeof companionFile === 'object' && 'fileKey' in companionFile) {
continue;
}

const rows = normalizeMatrixRows(getValues(field.key as never));
const rowValues = rows.length > 0 ? rows : [createEmptyMatrixRow(field.columns)];

Expand Down Expand Up @@ -672,6 +680,15 @@ export function CompanySubmissionWizard({
if (trimmed === '.svg') return ['image/svg+xml', []];
if (trimmed === '.vsdx')
return ['application/vnd.visio', []];
if (trimmed === '.csv') return ['text/csv', []];
if (trimmed === '.xlsx') {
return [
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
[],
];
}
if (trimmed === '.xls')
return ['application/vnd.ms-excel', []];
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 file-type MIME mapping logic across two locations

Low Severity

The new .csv, .xlsx, and .xls extension-to-MIME-type mapping blocks are copy-pasted identically at two separate locations within the same component. This extends an already-duplicated pattern (the existing PDF/PNG/JPG/TXT/SVG/VSDX mappings were also duplicated). Extracting this mapping into a shared helper function would reduce the risk of the two blocks drifting out of sync if future file types are added to only one location.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 68195a3. Configure here.

return null;
})
.filter(
Expand Down Expand Up @@ -830,6 +847,15 @@ export function CompanySubmissionWizard({
if (trimmed === '.txt') return ['text/plain', []];
if (trimmed === '.svg') return ['image/svg+xml', []];
if (trimmed === '.vsdx') return ['application/vnd.visio', []];
if (trimmed === '.csv') return ['text/csv', []];
if (trimmed === '.xlsx') {
return [
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
[],
];
}
if (trimmed === '.xls')
return ['application/vnd.ms-excel', []];
return null;
})
.filter((entry): entry is [string, string[]] => entry !== null),
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/components/ai-elements/reasoning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ export const ReasoningContent = memo(
)}
{...props}
>
<Streamdown plugins={streamdownPlugins} {...props}>
<Streamdown plugins={streamdownPlugins}>
{children}
</Streamdown>
</CollapsibleContent>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getOrganizationContext } from '@/trigger/tasks/onboarding/onboard-organization-helpers';
import { openai } from '@ai-sdk/openai';
import { db } from '@db/server';
import { logger, metadata, schemaTask } from '@trigger.dev/sdk';
import { logger, metadata, schemaTask, tags } from '@trigger.dev/sdk';
import { generateText } from 'ai';
import { z } from 'zod';

Expand Down Expand Up @@ -299,6 +299,7 @@ export const generateAuditorContentTask = schemaTask({
},
run: async (payload) => {
const { organizationId } = payload;
await tags.add([`org:${organizationId}`]);

logger.info(`Starting auditor content generation for org ${organizationId}`);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getFleetInstance } from '@/lib/fleet';
import { db } from '@db/server';

import { logger, queue, task } from '@trigger.dev/sdk';
import { logger, queue, tags, task } from '@trigger.dev/sdk';
import { AxiosError } from 'axios';
// Optional: define a queue if we want to control concurrency in v4
const fleetQueue = queue({ name: 'create-fleet-label-for-org', concurrencyLimit: 10 });
Expand All @@ -13,6 +13,8 @@ export const createFleetLabelForOrg = task({
maxAttempts: 3,
},
run: async ({ organizationId }: { organizationId: string }) => {
await tags.add([`org:${organizationId}`]);

const organization = await db.organization.findUnique({
where: {
id: organizationId,
Expand Down
Loading
Loading