Skip to content

Commit fb4efc5

Browse files
committed
chore: merge main into release for new releases
2 parents a22d564 + c2d3e0a commit fb4efc5

File tree

13 files changed

+128
-67
lines changed

13 files changed

+128
-67
lines changed

apps/api/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ WORKDIR /app
1010
COPY package.json ./
1111

1212
# Install bun and deps
13+
# Note: workspace:* dependencies will be skipped and copied manually below
1314
RUN curl -fsSL https://bun.sh/install | bash \
1415
&& export PATH="/root/.bun/bin:$PATH" \
15-
&& bun install --production --ignore-scripts
16+
&& bun install --production --ignore-scripts || true
17+
18+
# Copy pre-built workspace packages (must be before copying app contents)
19+
COPY node_modules/@trycompai ./node_modules/@trycompai
1620

1721
# Now copy the pre-built app contents (dist/, prisma/, etc.)
1822
COPY . .

apps/api/buildspec.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ phases:
3232
- echo "Installing API dependencies only..."
3333
- bun install --filter=@comp/api --frozen-lockfile || bun install --filter=@comp/api --ignore-scripts || bun install --ignore-scripts
3434

35+
# Build email package (required dependency for API)
36+
- echo "Building @trycompai/email package..."
37+
- cd packages/email
38+
- bun run build
39+
- cd ../..
40+
3541
# Build NestJS application (prebuild automatically handles Prisma)
3642
- echo "Building NestJS application..."
3743
- echo "APP_NAME is set to $APP_NAME"
@@ -69,6 +75,16 @@ phases:
6975
# Copy entire node_modules for runtime (includes @trycompai/db from npm)
7076
- echo "Skipping host node_modules copy; Dockerfile installs prod deps inside image"
7177

78+
# Copy built workspace packages (needed for runtime)
79+
# Only copy packages that are actually imported at runtime
80+
# Email package is already bundled, so only need its dist
81+
- echo "Copying built workspace packages..."
82+
- mkdir -p ../docker-build/node_modules/@trycompai
83+
# Email package - copy dist and package.json (needed at runtime)
84+
- mkdir -p ../docker-build/node_modules/@trycompai/email
85+
- cp -r ../../packages/email/dist ../docker-build/node_modules/@trycompai/email/
86+
- cp ../../packages/email/package.json ../docker-build/node_modules/@trycompai/email/
87+
7288
# Copy Dockerfile
7389
- echo "Copying Dockerfile..."
7490
- cp Dockerfile ../docker-build/

apps/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@nestjs/swagger": "^11.2.0",
1414
"@prisma/client": "^6.13.0",
1515
"@trycompai/db": "^1.3.17",
16+
"@trycompai/email": "workspace:*",
1617
"archiver": "^7.0.1",
1718
"axios": "^1.12.2",
1819
"better-auth": "^1.3.27",

apps/app/src/app/(app)/[orgId]/controls/[controlId]/components/table/ControlRequirementsTableColumns.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const ControlRequirementsTableColumns: ColumnDef<RequirementTableData>[]
4343
const isCompleted = requirement.policy
4444
? requirement.policy?.status === 'published'
4545
: requirement.task
46-
? requirement.task?.status === 'done'
46+
? requirement.task?.status === 'done' || requirement.task?.status === 'not_relevant'
4747
: false;
4848

4949
return (

apps/app/src/app/(app)/[orgId]/controls/[controlId]/data/getOrganizationControlProgress.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export const getOrganizationControlProgress = async (controlId: string) => {
9696

9797
progress.byType[taskTypeKey].total++;
9898

99-
const isCompleted = task.status === 'done';
99+
const isCompleted = task.status === 'done' || task.status === 'not_relevant';
100100

101101
if (isCompleted) {
102102
progress.completed++;

apps/app/src/app/(app)/[orgId]/controls/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function getControlStatus(control: ControlWithRelations): StatusType {
66
const tasks = control.tasks || [];
77

88
const allPoliciesArePublished = policies.every((policy) => policy.status === 'published');
9-
const allTasksAreCompleted = tasks.every((task) => task.status === 'done');
9+
const allTasksAreCompleted = tasks.every((task) => task.status === 'done' || task.status === 'not_relevant');
1010

1111
if (!allPoliciesArePublished && !allTasksAreCompleted) {
1212
return 'not_started';

apps/app/src/app/(app)/[orgId]/frameworks/lib/compute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function computeFrameworkStats(
3434
for (const t of frameworkTasks) uniqueTaskMap.set(t.id, t);
3535
const uniqueTasks = Array.from(uniqueTaskMap.values());
3636
const totalTasks = uniqueTasks.length;
37-
const doneTasks = uniqueTasks.filter((t) => t.status === 'done').length;
37+
const doneTasks = uniqueTasks.filter((t) => t.status === 'done' || t.status === 'not_relevant').length;
3838
const taskRatio = totalTasks > 0 ? doneTasks / totalTasks : 1;
3939

4040
const complianceScore = Math.round(((policyRatio + taskRatio) / 2) * 100);

apps/app/src/app/(app)/[orgId]/frameworks/lib/getTasks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ export const getDoneTasks = cache(async (organizationId: string) => {
88
},
99
});
1010

11-
const doneTasks = tasks.filter((t) => t.status === 'done');
11+
const doneTasks = tasks.filter((t) => t.status === 'done' || t.status === 'not_relevant');
1212
const incompleteTasks = tasks.filter(
13-
(t) => t.status === 'todo' || t.status === 'in_progress' || t.status === 'not_relevant',
13+
(t) => t.status === 'todo' || t.status === 'in_progress',
1414
);
1515

1616
return {

apps/app/src/app/(app)/[orgId]/frameworks/lib/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function getControlStatus(
3434
(policy) => policy.status === 'published', // Simplified from artifact.policy.status
3535
);
3636
const allTasksDone =
37-
controlTasks.length > 0 && controlTasks.every((task) => task.status === 'done');
37+
controlTasks.length > 0 && controlTasks.every((task) => task.status === 'done' || task.status === 'not_relevant');
3838

3939
if (allPoliciesPublished && (controlTasks.length === 0 || allTasksDone)) return 'completed';
4040
if (allPoliciesDraft && allTasksTodo) return 'not_started';

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,24 @@ export function ModernTaskList({ tasks, members, statusFilter }: ModernTaskListP
113113
<div className="divide-y divide-slate-100 overflow-hidden rounded-lg border border-slate-200/60 bg-white">
114114
{statusTasks.map((task, index) => {
115115
const member = assignedMember(task);
116+
const isNotRelevant = task.status === 'not_relevant';
116117
return (
117118
<div
118119
key={task.id}
119-
className="group flex items-center gap-4 p-4 transition-colors hover:bg-slate-50/50 cursor-pointer"
120+
className={`group relative flex items-center gap-4 p-4 transition-colors cursor-pointer ${
121+
isNotRelevant
122+
? 'opacity-50 bg-slate-100/50 backdrop-blur-md hover:bg-slate-100/60'
123+
: 'hover:bg-slate-50/50'
124+
}`}
120125
onClick={() => handleTaskClick(task.id)}
121126
>
127+
{isNotRelevant && (
128+
<div className="pointer-events-none absolute inset-0 flex items-center justify-center">
129+
<span className="text-sm font-bold uppercase tracking-[0.15em] text-slate-600">
130+
NOT RELEVANT
131+
</span>
132+
</div>
133+
)}
122134
<div
123135
className="flex shrink-0 items-center"
124136
onClick={(e) => e.stopPropagation()}
@@ -128,14 +140,16 @@ export function ModernTaskList({ tasks, members, statusFilter }: ModernTaskListP
128140
<div className="flex min-w-0 flex-1 items-center gap-4">
129141
<div className="min-w-0 flex-1">
130142
<div className="flex items-center gap-2">
131-
<div className="text-sm font-semibold text-slate-900">{task.title}</div>
143+
<div className={`text-sm font-semibold ${isNotRelevant ? 'text-slate-500' : 'text-slate-900'}`}>
144+
{task.title}
145+
</div>
132146
<AutomationIndicator
133147
automations={task.evidenceAutomations}
134148
variant="inline"
135149
/>
136150
</div>
137151
{task.description && (
138-
<div className="text-slate-500 mt-0.5 line-clamp-1 text-xs">
152+
<div className={`mt-0.5 line-clamp-1 text-xs ${isNotRelevant ? 'text-slate-400' : 'text-slate-500'}`}>
139153
{task.description}
140154
</div>
141155
)}

0 commit comments

Comments
 (0)