Skip to content

Commit 61c5555

Browse files
authored
Merge pull request #2778 from trycompai/main
[comp] Production Deploy
2 parents 4256dbe + a196339 commit 61c5555

28 files changed

Lines changed: 1069 additions & 1081 deletions

‎apps/api/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"version": "0.0.1",
55
"author": "",
66
"dependencies": {
7-
"@ai-sdk/anthropic": "^2.0.53",
8-
"@ai-sdk/groq": "^2.0.32",
9-
"@ai-sdk/openai": "^2.0.65",
7+
"@ai-sdk/anthropic": "^3.0.75",
8+
"@ai-sdk/groq": "^3.0.38",
9+
"@ai-sdk/openai": "^3.0.62",
1010
"@aws-sdk/client-acm": "^3.948.0",
1111
"@aws-sdk/client-api-gateway": "^3.948.0",
1212
"@aws-sdk/client-apigatewayv2": "^3.948.0",
@@ -88,7 +88,7 @@
8888
"@upstash/redis": "^1.34.2",
8989
"@upstash/vector": "^1.2.2",
9090
"adm-zip": "^0.5.16",
91-
"ai": "^5.0.60",
91+
"ai": "^6.0.175",
9292
"archiver": "^7.0.1",
9393
"axios": "^1.12.2",
9494
"better-auth": "^1.4.22",

‎apps/api/src/assistant-chat/assistant-chat.controller.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Important:
127127
const result = streamText({
128128
model: openai('gpt-5'),
129129
system: systemPrompt,
130-
messages: convertToModelMessages(messages),
130+
messages: await convertToModelMessages(messages),
131131
tools,
132132
stopWhen: stepCountIs(5),
133133
});

‎apps/api/src/frameworks/frameworks-scores.helper.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export async function getOverviewScores(organizationId: string) {
2929
}),
3030
db.onboarding.findUnique({
3131
where: { organizationId },
32-
select: { triggerJobId: true },
32+
select: { triggerJobId: true, triggerJobCompleted: true },
3333
}),
3434
db.organization.findUnique({
3535
where: { id: organizationId },
@@ -90,7 +90,7 @@ export async function getOverviewScores(organizationId: string) {
9090
incompleteTasks,
9191
},
9292
people,
93-
onboardingTriggerJobId: onboarding?.triggerJobId ?? null,
93+
onboardingTriggerJobId: onboarding?.triggerJobCompleted ? null : (onboarding?.triggerJobId ?? null),
9494
documents: await computeDocumentsScore(organizationId),
9595
findings: await getOrganizationFindings(organizationId),
9696
};

‎apps/api/src/policies/policies.controller.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ Keep responses helpful and focused on the policy editing task.`;
13211321
const result = streamText({
13221322
model: openai('gpt-5.5'),
13231323
system: systemPrompt,
1324-
messages: convertToModelMessages(messages),
1324+
messages: await convertToModelMessages(messages),
13251325
});
13261326

13271327
return result.pipeTextStreamToResponse(res);

‎apps/app/next.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export default withSentryConfig(withBotId(config), {
140140
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
141141

142142
// Upload a larger set of source maps for prettier stack traces (increases build time)
143-
widenClientFileUpload: true,
143+
widenClientFileUpload: false,
144144

145145
// Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
146146
// This can increase your server load as well as your hosting bill.

‎apps/app/package.json‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
"version": "0.1.0",
44
"type": "module",
55
"dependencies": {
6-
"@ai-sdk/anthropic": "^3.0.0",
7-
"@ai-sdk/groq": "^3.0.0",
8-
"@ai-sdk/openai": "^3.0.0",
9-
"@ai-sdk/provider": "^3.0.0",
10-
"@ai-sdk/react": "^3.0.0",
11-
"@ai-sdk/rsc": "^2.0.0",
6+
"@ai-sdk/anthropic": "^3.0.75",
7+
"@ai-sdk/gateway": "^3.0.110",
8+
"@ai-sdk/google": "^3.0.68",
9+
"@ai-sdk/groq": "^3.0.38",
10+
"@ai-sdk/openai": "^3.0.62",
11+
"@ai-sdk/provider": "^3.0.10",
12+
"@ai-sdk/react": "^3.0.177",
13+
"@ai-sdk/rsc": "^2.0.175",
1214
"@aws-sdk/client-ec2": "^3.948.0",
1315
"@aws-sdk/client-lambda": "^3.948.0",
1416
"@aws-sdk/client-s3": "3.1013.0",
@@ -84,7 +86,7 @@
8486
"@vercel/sandbox": "^0.0.21",
8587
"@vercel/sdk": "^1.7.1",
8688
"@xyflow/react": "^12.10.0",
87-
"ai": "^6.0.116",
89+
"ai": "^6.0.175",
8890
"ai-elements": "^1.6.1",
8991
"axios": "^1.9.0",
9092
"better-auth": "^1.4.22",

‎apps/app/src/app/(app)/[orgId]/components/OnboardingTracker.tsx‎

Lines changed: 137 additions & 322 deletions
Large diffs are not rendered by default.

‎apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/components/FrameworkDetailContent.tsx‎

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export function FrameworkDetailContent({
5353
const pathname = usePathname();
5454
const searchParams = useSearchParams();
5555
const { hasPermission, permissions } = usePermissions();
56-
const versioningEnabled = useFeatureFlag('is-framework-versioning-enabled');
5756
const complianceTimelineEnabled = useFeatureFlag('is-timeline-enabled');
5857
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
5958
const [dropdownOpen, setDropdownOpen] = useState(false);
@@ -82,7 +81,7 @@ export function FrameworkDetailContent({
8281
const validTabsList: string[] = [];
8382
if (complianceTimelineEnabled) validTabsList.push('progress');
8483
validTabsList.push('requirements');
85-
if (versioningEnabled) validTabsList.push('history');
84+
validTabsList.push('history');
8685
const validTabs = new Set(validTabsList);
8786
const activeTab = tabParam && validTabs.has(tabParam) ? tabParam : DEFAULT_TAB;
8887

@@ -158,7 +157,7 @@ export function FrameworkDetailContent({
158157
<TabsTrigger value="requirements">
159158
Requirements <TabBadge>{requirementsCount}</TabBadge>
160159
</TabsTrigger>
161-
{versioningEnabled && <TabsTrigger value="history">History</TabsTrigger>}
160+
<TabsTrigger value="history">History</TabsTrigger>
162161
</TabsList>
163162
}
164163
>
@@ -197,14 +196,12 @@ export function FrameworkDetailContent({
197196
/>
198197
</TabsContent>
199198

200-
{versioningEnabled && (
201-
<TabsContent value="history">
202-
<SyncHistorySection
203-
frameworkInstanceId={frameworkInstanceId}
204-
permissions={permissions}
205-
/>
206-
</TabsContent>
207-
)}
199+
<TabsContent value="history">
200+
<SyncHistorySection
201+
frameworkInstanceId={frameworkInstanceId}
202+
permissions={permissions}
203+
/>
204+
</TabsContent>
208205
</PageLayout>
209206

210207
<FrameworkDeleteDialog

‎apps/app/src/app/(app)/[orgId]/frameworks/[frameworkInstanceId]/components/FrameworkVersioningSection.tsx‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
import { useFeatureFlag } from '@trycompai/analytics';
43
import { useParams, useRouter } from 'next/navigation';
54
import { useFrameworkUpdateStatus } from '@/hooks/use-framework-update-status';
65
import { usePermissions } from '@/hooks/use-permissions';
@@ -18,20 +17,13 @@ export function FrameworkVersioningSection({
1817
initialStatus,
1918
hasActiveAudit,
2019
}: FrameworkVersioningSectionProps) {
21-
const enabled = useFeatureFlag('is-framework-versioning-enabled');
22-
// Thread the flag into SWR so the update-status request doesn't fire for
23-
// orgs that don't have versioning enabled. Without this the request runs
24-
// every mount and we just throw the response away.
2520
const { data } = useFrameworkUpdateStatus(frameworkInstanceId, {
2621
fallbackData: initialStatus,
27-
enabled,
2822
});
2923
const { hasPermission } = usePermissions();
3024
const router = useRouter();
3125
const { orgId } = useParams<{ orgId: string }>();
3226

33-
if (!enabled) return null;
34-
3527
const canUpdate = hasPermission('framework', 'update');
3628

3729
return (

‎apps/app/src/app/(app)/[orgId]/overview/components/ToDoOverview.tsx‎

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Card, CardContent, CardHeader, CardTitle } from '@trycompai/ui/card';
55
import { ScrollArea } from '@trycompai/ui/scroll-area';
66
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@trycompai/ui/tabs';
77
import { Policy, Task } from '@db';
8-
import { useRealtimeRun } from '@trigger.dev/react-hooks';
98
import {
109
ArrowRight,
1110
CheckCircle2,
@@ -49,25 +48,7 @@ export function ToDoOverview({
4948
const [isConfirmDialogOpen, setIsConfirmDialogOpen] = useState(false);
5049
const [isLoading, setIsLoading] = useState(false);
5150

52-
const { run: onboardingRun } = useRealtimeRun(onboardingTriggerJobId || '', {
53-
enabled: !!onboardingTriggerJobId,
54-
});
55-
56-
const IN_PROGRESS_STATUSES = [
57-
'QUEUED',
58-
'EXECUTING',
59-
'WAITING_FOR_DEPLOY',
60-
'REATTEMPTING',
61-
'FROZEN',
62-
'DELAYED',
63-
'WAITING',
64-
'PENDING_VERSION',
65-
'DEQUEUED',
66-
];
67-
68-
const isOnboardingInProgress = onboardingRun
69-
? IN_PROGRESS_STATUSES.includes(onboardingRun.status)
70-
: false;
51+
const isOnboardingInProgress = !!onboardingTriggerJobId;
7152

7253
const formatStatus = (status: string) => {
7354
return status.replace('_', ' ').replace(/\b\w/g, (l) => l.toUpperCase());

0 commit comments

Comments
 (0)