Skip to content

Commit a5f59a7

Browse files
authored
Merge branch 'main' into fix/integrations-setup-cta
2 parents fdfc5eb + 8785c18 commit a5f59a7

11 files changed

Lines changed: 463 additions & 59 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { PageLayout } from '@trycompai/design-system';
2+
3+
export default function Loading() {
4+
return <PageLayout loading />;
5+
}

apps/app/src/app/(app)/[orgId]/documents/[formType]/page.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { CompanyFormPageClient } from '@/app/(app)/[orgId]/documents/components/
22
import { Breadcrumb, PageLayout } from '@trycompai/design-system';
33
import Link from 'next/link';
44
import { notFound } from 'next/navigation';
5-
import { Suspense } from 'react';
65
import { evidenceFormDefinitions, evidenceFormTypeSchema } from '../forms';
76
import { auth } from '@/utils/auth';
87
import { headers } from 'next/headers';
@@ -43,13 +42,11 @@ export default async function CompanyFormDetailPage({
4342
{ label: formDefinition.title, isCurrent: true },
4443
]}
4544
/>
46-
<Suspense>
47-
<CompanyFormPageClient
48-
organizationId={orgId}
49-
formType={parsedType.data}
50-
isPlatformAdmin={isPlatformAdmin}
51-
/>
52-
</Suspense>
45+
<CompanyFormPageClient
46+
organizationId={orgId}
47+
formType={parsedType.data}
48+
isPlatformAdmin={isPlatformAdmin}
49+
/>
5350
</PageLayout>
5451
);
5552
}

apps/app/src/app/(app)/[orgId]/documents/components/CompanyFormPageClient.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -426,19 +426,7 @@ export function CompanyFormPageClient({
426426
</InputGroup>
427427
</div>
428428

429-
{isLoading ? (
430-
<Empty>
431-
<EmptyMedia variant="icon">
432-
<Catalog />
433-
</EmptyMedia>
434-
<EmptyHeader>
435-
<EmptyTitle>No submissions yet</EmptyTitle>
436-
<EmptyDescription>
437-
Start by creating a new submission, click the New Submission button above.
438-
</EmptyDescription>
439-
</EmptyHeader>
440-
</Empty>
441-
) : !data || data.submissions.length === 0 ? (
429+
{!data || data.submissions.length === 0 ? (
442430
<Empty>
443431
<EmptyMedia variant="icon">
444432
<Catalog />

apps/app/src/app/(app)/[orgId]/documents/components/CompanySubmissionWizard.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { api } from '@/lib/api-client';
1616
import { meetingFields } from '@trycompai/company';
1717
import { zodResolver } from '@hookform/resolvers/zod';
1818
import {
19+
Alert,
1920
Button,
2021
Field,
2122
FieldError,
@@ -548,6 +549,13 @@ export function CompanySubmissionWizard({
548549
{textareaFields.length === 0 && (
549550
<Text variant="muted">No additional fields required for this step.</Text>
550551
)}
552+
{textareaFields.some((f) => f.placeholder) && (
553+
<Alert
554+
variant="warning"
555+
title="Reference only"
556+
description="The pre-filled content below is provided as a template. You must review and edit it to reflect your organization's actual information before submitting."
557+
/>
558+
)}
551559
{textareaFields.map((field) => (
552560
<Controller
553561
key={field.key}
@@ -618,6 +626,13 @@ export function CompanySubmissionWizard({
618626
)}
619627
/>
620628
))}
629+
{extendedFields.some((f) => f.type === 'textarea' && f.placeholder) && (
630+
<Alert
631+
variant="warning"
632+
title="Reference only"
633+
description="The pre-filled content below is provided as a template. You must review and edit it to reflect your organization's actual information before submitting."
634+
/>
635+
)}
621636
{extendedFields.map((field) => (
622637
<Controller
623638
key={field.key}

apps/app/src/app/(app)/[orgId]/documents/components/DocumentFindingsSection.tsx

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,21 @@
33
import { useFindingActions, useFormTypeFindings, type Finding } from '@/hooks/use-findings-api';
44
import { usePermissions } from '@/hooks/use-permissions';
55
import { useActiveMember } from '@/utils/auth-client';
6-
import { Button } from '@trycompai/design-system';
76
import { FindingStatus } from '@db';
8-
import { ChevronDown, ChevronUp, WarningAlt, WarningAltFilled } from '@trycompai/design-system/icons';
7+
import {
8+
Button,
9+
Empty,
10+
EmptyDescription,
11+
EmptyHeader,
12+
EmptyMedia,
13+
EmptyTitle,
14+
} from '@trycompai/design-system';
15+
import {
16+
ChevronDown,
17+
ChevronUp,
18+
WarningAlt,
19+
WarningAltFilled,
20+
} from '@trycompai/design-system/icons';
921
import { useCallback, useMemo, useState } from 'react';
1022
import { toast } from 'sonner';
1123
import { CreateFindingButton } from '../../tasks/[taskId]/components/findings/CreateFindingButton';
@@ -153,33 +165,38 @@ export function DocumentFindingsSection({
153165
finding.status === FindingStatus.open || finding.status === FindingStatus.needs_revision,
154166
).length;
155167

156-
if (allIsLoading) {
157-
return (
158-
<div className="flex items-center justify-center py-8">
159-
<div className="h-6 w-6 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent" />
160-
</div>
161-
);
162-
}
163-
164168
if (allError) {
165169
return (
166-
<div className="flex items-center justify-center py-8 text-destructive">
167-
<WarningAlt size={20} className="mr-2" />
168-
<span>Failed to load findings</span>
169-
</div>
170+
<Empty>
171+
<EmptyMedia variant="icon">
172+
<WarningAlt size={32} />
173+
</EmptyMedia>
174+
<EmptyHeader>
175+
<EmptyTitle>Failed to load findings</EmptyTitle>
176+
<EmptyDescription>
177+
Something went wrong. Please try refreshing the page.
178+
</EmptyDescription>
179+
</EmptyHeader>
180+
</Empty>
170181
);
171182
}
172183

173-
if (sortedFindings.length === 0) {
184+
if (allIsLoading || sortedFindings.length === 0) {
174185
return (
175-
<div className="flex flex-col items-center justify-center py-12 text-muted-foreground">
176-
<p className="text-sm">No findings for this document</p>
186+
<Empty>
187+
<EmptyMedia variant="icon">
188+
<WarningAlt size={32} />
189+
</EmptyMedia>
190+
<EmptyHeader>
191+
<EmptyTitle>No findings yet</EmptyTitle>
192+
<EmptyDescription>
193+
Findings will appear here when an auditor flags issues requiring attention.
194+
</EmptyDescription>
195+
</EmptyHeader>
177196
{canCreateFinding && (
178-
<div className="mt-3">
179-
<CreateFindingButton evidenceFormType={formType} onSuccess={mutateAll} />
180-
</div>
197+
<CreateFindingButton evidenceFormType={formType} onSuccess={mutateAll} />
181198
)}
182-
</div>
199+
</Empty>
183200
);
184201
}
185202

@@ -216,14 +233,7 @@ export function DocumentFindingsSection({
216233
</div>
217234

218235
<div className="p-5">
219-
{sortedFindings.length === 0 ? (
220-
<div className="flex flex-col items-center justify-center py-8 text-muted-foreground">
221-
<WarningAltFilled size={40} className="mb-3 opacity-50" />
222-
<p className="text-sm">No findings for this document</p>
223-
{canCreateFinding && <p className="text-xs mt-1">Create a finding to flag an issue</p>}
224-
</div>
225-
) : (
226-
<div className="space-y-2">
236+
<div className="space-y-2">
227237
{visibleFindings.map((finding: Finding) => (
228238
<FindingItem
229239
key={finding.id}
@@ -242,12 +252,7 @@ export function DocumentFindingsSection({
242252

243253
{sortedFindings.length > INITIAL_DISPLAY_COUNT && (
244254
<div className="mt-2 text-muted-foreground hover:text-foreground">
245-
<Button
246-
variant="ghost"
247-
size="sm"
248-
width="full"
249-
onClick={() => setShowAll(!showAll)}
250-
>
255+
<Button variant="ghost" size="sm" width="full" onClick={() => setShowAll(!showAll)}>
251256
{showAll ? (
252257
<>
253258
<ChevronUp size={16} className="mr-1.5" />
@@ -263,7 +268,6 @@ export function DocumentFindingsSection({
263268
</div>
264269
)}
265270
</div>
266-
)}
267271
</div>
268272
</div>
269273
);

apps/app/src/app/(app)/[orgId]/tasks/[taskId]/components/SingleTask.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ export function SingleTask({
172172
await updateTask({
173173
status: updates.status,
174174
assigneeId: updates.assigneeId,
175+
approverId: updates.approverId,
175176
frequency: updates.frequency,
176177
department: updates.department,
177178
reviewDate: updates.reviewDate ? String(updates.reviewDate) : undefined,

packages/device-agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"private": true,
88
"main": "dist/main/index.js",
99
"scripts": {
10-
"postinstall": "node node_modules/electron/install.js || true",
10+
"postinstall": "electron-builder install-app-deps",
1111
"dev": "electron-vite dev --watch",
1212
"build": "electron-vite build",
1313
"preview": "electron-vite preview",

packages/docs/openapi.json

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16511,6 +16511,62 @@
1651116511
]
1651216512
}
1651316513
},
16514+
"/v1/integrations/tasks/{taskId}/checks/disconnect": {
16515+
"post": {
16516+
"operationId": "TaskIntegrationsController_disconnectCheckFromTask_v1",
16517+
"parameters": [
16518+
{
16519+
"name": "taskId",
16520+
"required": true,
16521+
"in": "path",
16522+
"schema": {
16523+
"type": "string"
16524+
}
16525+
}
16526+
],
16527+
"responses": {
16528+
"201": {
16529+
"description": ""
16530+
}
16531+
},
16532+
"security": [
16533+
{
16534+
"apikey": []
16535+
}
16536+
],
16537+
"tags": [
16538+
"Integrations"
16539+
]
16540+
}
16541+
},
16542+
"/v1/integrations/tasks/{taskId}/checks/reconnect": {
16543+
"post": {
16544+
"operationId": "TaskIntegrationsController_reconnectCheckToTask_v1",
16545+
"parameters": [
16546+
{
16547+
"name": "taskId",
16548+
"required": true,
16549+
"in": "path",
16550+
"schema": {
16551+
"type": "string"
16552+
}
16553+
}
16554+
],
16555+
"responses": {
16556+
"201": {
16557+
"description": ""
16558+
}
16559+
},
16560+
"security": [
16561+
{
16562+
"apikey": []
16563+
}
16564+
],
16565+
"tags": [
16566+
"Integrations"
16567+
]
16568+
}
16569+
},
1651416570
"/v1/integrations/tasks/{taskId}/runs": {
1651516571
"get": {
1651616572
"operationId": "TaskIntegrationsController_getTaskCheckRuns_v1",
@@ -20018,6 +20074,38 @@
2001820074
]
2001920075
}
2002020076
},
20077+
"/v1/email/unsubscribe": {
20078+
"post": {
20079+
"operationId": "UnsubscribeController_unsubscribe_v1",
20080+
"parameters": [
20081+
{
20082+
"name": "email",
20083+
"required": true,
20084+
"in": "query",
20085+
"schema": {
20086+
"type": "string"
20087+
}
20088+
},
20089+
{
20090+
"name": "token",
20091+
"required": true,
20092+
"in": "query",
20093+
"schema": {
20094+
"type": "string"
20095+
}
20096+
}
20097+
],
20098+
"responses": {
20099+
"200": {
20100+
"description": ""
20101+
}
20102+
},
20103+
"summary": "One-click unsubscribe (RFC 8058)",
20104+
"tags": [
20105+
"Email - Unsubscribe"
20106+
]
20107+
}
20108+
},
2002120109
"/v1/secrets": {
2002220110
"get": {
2002320111
"operationId": "SecretsController_listSecrets_v1",
@@ -20649,6 +20737,65 @@
2064920737
]
2065020738
}
2065120739
},
20740+
"/v1/admin/organizations/activity": {
20741+
"get": {
20742+
"operationId": "AdminOrganizationsController_activity_v1",
20743+
"parameters": [
20744+
{
20745+
"name": "inactiveDays",
20746+
"required": false,
20747+
"in": "query",
20748+
"description": "Filter orgs with no session in N days (default: 90)",
20749+
"schema": {
20750+
"type": "string"
20751+
}
20752+
},
20753+
{
20754+
"name": "hasAccess",
20755+
"required": false,
20756+
"in": "query",
20757+
"description": "Filter by hasAccess (true/false)",
20758+
"schema": {
20759+
"type": "string"
20760+
}
20761+
},
20762+
{
20763+
"name": "onboarded",
20764+
"required": false,
20765+
"in": "query",
20766+
"description": "Filter by onboardingCompleted (true/false)",
20767+
"schema": {
20768+
"type": "string"
20769+
}
20770+
},
20771+
{
20772+
"name": "page",
20773+
"required": false,
20774+
"in": "query",
20775+
"schema": {
20776+
"type": "string"
20777+
}
20778+
},
20779+
{
20780+
"name": "limit",
20781+
"required": false,
20782+
"in": "query",
20783+
"schema": {
20784+
"type": "string"
20785+
}
20786+
}
20787+
],
20788+
"responses": {
20789+
"200": {
20790+
"description": ""
20791+
}
20792+
},
20793+
"summary": "Organization activity report - shows last session per org (platform admin)",
20794+
"tags": [
20795+
"Admin - Organizations"
20796+
]
20797+
}
20798+
},
2065220799
"/v1/admin/organizations/{id}": {
2065320800
"get": {
2065420801
"operationId": "AdminOrganizationsController_get_v1",

packages/integration-platform/src/manifests/github/checks/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
export { branchProtectionCheck } from './branch-protection';
77
export { dependabotCheck } from './dependabot';
88
export { sanitizedInputsCheck } from './sanitized-inputs';
9+
export { twoFactorAuthCheck } from './two-factor-auth';

0 commit comments

Comments
 (0)