Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
cf97f8d
feat: add context hub settings and onboarding components
carhartlewis Jun 1, 2025
09329f8
chore: update build script to use turbopack
carhartlewis Jun 1, 2025
509aa02
chore(deps): update next version to canary release and remove next-auth
carhartlewis Jun 1, 2025
b4ecfce
chore(deps): update next version to canary release and remove unused …
carhartlewis Jun 1, 2025
1684fa6
feat(new): trigger.dev job to onboard new users, added trigger.dev lo…
carhartlewis Jun 1, 2025
9d06b21
refactor: clean up bulk invite employees action and update Stripe API…
carhartlewis Jun 1, 2025
0e2d2c6
refactor: enhance UI components and improve code structure
carhartlewis Jun 1, 2025
a231c23
feat: update onboarding process to set default completion status
carhartlewis Jun 1, 2025
90d1ceb
feat: add isCollapsed prop to SidebarLogo component
carhartlewis Jun 1, 2025
c70db73
feat: implement policy update functionality with AI-generated prompts
carhartlewis Jun 1, 2025
570837b
feat: enhance settings layout and API key management
carhartlewis Jun 2, 2025
6bc4ac1
feat: enhance context entry forms with placeholders and descriptions
carhartlewis Jun 2, 2025
8a561f4
chore(deps): update workspace references in yarn.lock and package.json
carhartlewis Jun 2, 2025
7a441ad
feat: add migration to transfer onboarding data to context table
carhartlewis Jun 2, 2025
e7ec519
refactor: update context ID prefix in migration and schema
carhartlewis Jun 2, 2025
06e6ef5
feat: add conditional migration for onboarding data transfer
carhartlewis Jun 2, 2025
9f2e8ae
chore: remove onboarding data migration and clean up schema
carhartlewis Jun 2, 2025
0768ff5
chore: update dependencies and improve onboarding form
carhartlewis Jun 2, 2025
191551a
refactor: update onboarding form and clean up related components
carhartlewis Jun 2, 2025
45e569d
refactor: improve onboarding form structure and logic
carhartlewis Jun 2, 2025
760f7b5
fix: update placeholder text in OnboardingForm for clarity
carhartlewis Jun 2, 2025
0404840
refactor: update onboarding form and sidebar component
carhartlewis Jun 2, 2025
a784166
fix: remove minWidth style from OnboardingForm component
carhartlewis Jun 2, 2025
db2b59e
style: update OnboardingForm component layout
carhartlewis Jun 2, 2025
9298666
feat: add software selection to onboarding form
carhartlewis Jun 2, 2025
e9727d9
feat: enhance onboarding form with additional software options
carhartlewis Jun 2, 2025
94aabef
fix: enhance hydration handling in OnboardingForm component
carhartlewis Jun 2, 2025
c33f2b1
refactor: simplify getSignedUrl calls in comment and file actions
carhartlewis Jun 2, 2025
cfe63f2
refactor: remove redundant policy update logic in onboarding process
carhartlewis Jun 2, 2025
e3a36d1
Merge branch 'main' of github.com:trycompai/comp into lewis/comp-v2-o…
carhartlewis Jun 3, 2025
019ac0c
chore: update dependencies in bun.lock file
carhartlewis Jun 3, 2025
b756a6a
chore: update dependencies and fix package versions
carhartlewis Jun 3, 2025
eb53bc5
chore: update onboarding process and database schema
carhartlewis Jun 3, 2025
0ad8eaa
refactor: update policy control mapping actions and UI
carhartlewis Jun 3, 2025
8e05673
Merge branch 'main' into lewis/comp-v2-onboarding
carhartlewis Jun 3, 2025
552dc2c
fix(migration): correct foreign key constraint addition in Context table
carhartlewis Jun 3, 2025
f9c2eeb
Merge pull request #734 from trycompai/lewis/comp-v2-onboarding
claudfuen Jun 3, 2025
1145c98
chore: optimize Bun installation process in CI workflow
carhartlewis Jun 3, 2025
e094b52
chore: update Node.js version in CI workflow
carhartlewis Jun 3, 2025
162947a
Merge branch 'main' into lewis/comp-v2-onboarding-fixes
carhartlewis Jun 3, 2025
433bfd0
Merge pull request #744 from trycompai/lewis/comp-v2-onboarding-fixes
claudfuen Jun 3, 2025
677896d
chore: enhance Bun installation command in CI workflow
carhartlewis Jun 3, 2025
dfe6078
Merge branch 'main' of github.com:trycompai/comp into lewis/comp-easy…
carhartlewis Jun 3, 2025
6651f86
chore: update dependencies and add database migration workflow
claudfuen Jun 3, 2025
76458a2
chore: update React version in package files
claudfuen Jun 3, 2025
df232d7
chore: downgrade "next" dependency version across applications
claudfuen Jun 3, 2025
f4ab998
fix: enable nodeMiddleware in Next.js configuration for app and trust
claudfuen Jun 3, 2025
e4f1c2d
chore: update "next" dependency to version 15.4.0-canary.62 across al…
claudfuen Jun 3, 2025
4f2701b
chore: refine database migration workflow to target specific package
claudfuen Jun 3, 2025
4f27ae6
chore: remove dependency installation step from database migration wo…
claudfuen Jun 3, 2025
f4e61af
chore: update BUN_VERSION in database migration workflow
claudfuen Jun 3, 2025
748cb7f
chore: remove database migrations workflow for development
claudfuen Jun 3, 2025
da455e2
Merge pull request #746 from trycompai/claudio/comp-137-add-internalr…
claudfuen Jun 3, 2025
a7d53ad
fix(onboarding): add conditional check for policies before batch proc…
carhartlewis Jun 3, 2025
927d8f8
refactor(onboarding): streamline policy batch processing call
carhartlewis Jun 3, 2025
05f671b
feat: enhance framework templates and relationships
claudfuen Jun 3, 2025
1a9c875
fix(onboarding): update onboarding completion logic
carhartlewis Jun 3, 2025
cb16ffe
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
carhartlewis Jun 3, 2025
72f8280
Merge pull request #749 from trycompai/claudio/comp-170-update-seed-data
claudfuen Jun 3, 2025
0fce68b
Merge pull request #748 from trycompai/lewis/comp-onboarding-testjam-…
claudfuen Jun 3, 2025
864de65
fix(onboarding): simplify onboarding path checks in middleware
carhartlewis Jun 3, 2025
5eaf7ae
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
carhartlewis Jun 3, 2025
b3f353e
Merge pull request #750 from trycompai/lewis/comp-onboarding-testjam-…
claudfuen Jun 3, 2025
8b6600a
fix(vendor): map vendor categories to user-friendly labels in VendorC…
carhartlewis Jun 3, 2025
2ab5655
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
carhartlewis Jun 3, 2025
ba17ea8
Merge pull request #751 from trycompai/lewis/comp-onboarding-testjam-…
Marfuen Jun 3, 2025
33edd96
fix(middleware): remove unnecessary URL encoding for redirect in auth…
carhartlewis Jun 3, 2025
f6a4dd6
refactor(risk-matrix): restructure risk matrix chart logic and improv…
carhartlewis Jun 3, 2025
ffc9266
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
carhartlewis Jun 3, 2025
5a0aaad
Merge pull request #752 from trycompai/lewis/comp-onboarding-testjam-…
Marfuen Jun 4, 2025
bdb11d1
refactor(onboarding): update placeholder text and improve code clarity
carhartlewis Jun 4, 2025
9862bc7
Merge pull request #756 from trycompai/lewis/comp-onboarding-testjam-…
Marfuen Jun 4, 2025
94482b0
chore: update Next.js to version 15.4.0-canary.62 and add migrations …
Marfuen Jun 4, 2025
383aea2
refactor(risk-charts): streamline Inherent and Residual Risk Chart co…
carhartlewis Jun 4, 2025
ec1b4e7
refactor(risk-charts): replace forms with direct update actions in ri…
carhartlewis Jun 4, 2025
86075b1
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
carhartlewis Jun 4, 2025
61b48e9
feat: update dependencies and enhance task management features
claudfuen Jun 4, 2025
e2e6be6
refactor(tasks): simplify TextAreaCell component and update task desc…
claudfuen Jun 4, 2025
151f49a
Merge pull request #760 from trycompai/claudio/comp-172-add-dropdown-…
claudfuen Jun 4, 2025
bd8f0e3
feat: move onboarding loading to layout
Marfuen Jun 4, 2025
3d83ac5
chore: make sure layout height doesn't scroll
Marfuen Jun 4, 2025
788b437
Merge branch 'main' into mariano/comp-171-something-wrong-with-cert
carhartlewis Jun 4, 2025
6240f01
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
carhartlewis Jun 4, 2025
8e79875
chore: fix layout issues
Marfuen Jun 4, 2025
322d9cb
Merge branch 'mariano/comp-171-something-wrong-with-cert' of github.c…
Marfuen Jun 4, 2025
4194173
Merge pull request #761 from trycompai/mariano/comp-171-something-wro…
Marfuen Jun 4, 2025
1b600bf
Merge branch 'main' into lewis/comp-onboarding-testjam-fixes
Marfuen Jun 4, 2025
3a6559e
Merge pull request #758 from trycompai/lewis/comp-onboarding-testjam-…
Marfuen Jun 4, 2025
b26b21e
chore: fix spacing issues
Marfuen Jun 4, 2025
3b5eeba
Merge pull request #762 from trycompai/mariano/comp-11111-onboarding-…
Marfuen Jun 4, 2025
86e30a6
chore: fix all issues with spacing
Marfuen Jun 4, 2025
ca2e00b
Merge pull request #763 from trycompai/mariano/comp-1231231-moar-fixes
Marfuen Jun 4, 2025
21ffcfb
chore: fix dev env using better auth url for email invites
Marfuen Jun 4, 2025
107113e
Merge branch 'main' of github.com:trycompai/comp into mariano/comp-12…
Marfuen Jun 4, 2025
51ac213
Merge pull request #764 from trycompai/mariano/comp-123-fix-dev-email…
Marfuen Jun 4, 2025
332660a
Merge branch 'release' of github.com:trycompai/comp into mariano/comp…
Marfuen Jun 4, 2025
aaabf54
Merge pull request #765 from trycompai/mariano/comp-123123-fix-pkg-json
claudfuen Jun 4, 2025
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
14 changes: 12 additions & 2 deletions .cursor/rules/server-actions.mdc
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
description:
description:
globs: *.ts
alwaysApply: false
---
- Never use safe server actions, always use regular simple server actions.
- Always use safe-actions [safe-action.ts](mdc:apps/app/src/actions/safe-action.ts), here's an example:
[delete-integration-connection.ts](mdc:apps/app/src/actions/integrations/delete-integration-connection.ts)

- Always revalidate the path based on the header x-path-name:

const headersList = await headers();
let path =
headersList.get("x-pathname") || headersList.get("referer") || "";
path = path.replace(/\/[a-z]{2}\//, "/");

revalidatePath(path);
33 changes: 0 additions & 33 deletions .cursor/rules/translation-rules.mdc

This file was deleted.

4 changes: 1 addition & 3 deletions .github/workflows/database-migrations-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- main
workflow_dispatch: # Allows manual triggering
env:
BUN_VERSION: "1.0.26"
BUN_VERSION: "1.2.15"
jobs:
migrate:
name: Run Database Migrations
Expand All @@ -17,8 +17,6 @@ jobs:
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install
- name: Apply database migrations
env:
DATABASE_URL: ${{ secrets.DATABASE_URL_DEV }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/database-migrations-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- release
workflow_dispatch: # Allows manual triggering
env:
BUN_VERSION: "1.0.26"
BUN_VERSION: "1.2.15"
jobs:
migrate:
name: Run Database Migrations
Expand All @@ -17,8 +17,6 @@ jobs:
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Install dependencies
run: bun install
- name: Apply database migrations
env:
DATABASE_URL: ${{ secrets.DATABASE_URL_PROD }}
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/trigger-tasks-deploy-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ jobs:
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: "22.x" # Updated to match Node.js w/ Vercel
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Clear cache
run: rm -rf node_modules .bun
- name: Install dependencies
run: bun install
run: |
bun install --no-cache --force
- name: Generate Prisma client
working-directory: ./packages/db
run: bunx prisma generate
Expand Down
1 change: 1 addition & 0 deletions apps/app/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const config: NextConfig = {
serverActions: {
bodySizeLimit: "15mb",
},
nodeMiddleware: true,
authInterrupts: true,
},
async rewrites() {
Expand Down
14 changes: 8 additions & 6 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "bun install && bun run apply-migrations && bunx concurrently --kill-others --names \"next,trigger\" --prefix-colors \"yellow,blue\" \"next dev --turbo -p 3000\" \"bun run trigger:dev\"",
"dev": "bun i && bun run apply-migrations && bunx concurrently --kill-others --names \"next,trigger\" --prefix-colors \"yellow,blue\" \"next dev --turbo -p 3000\" \"bun run trigger:dev\"",
"trigger:dev": "npx trigger.dev@latest dev",
"build": "next build --turbopack",
"start": "next start",
Expand Down Expand Up @@ -40,6 +40,8 @@
"@novu/react": "^2.6.6",
"@number-flow/react": "^0.5.9",
"@prisma/instrumentation": "6.6.0",
"@react-email/components": "^0.0.41",
"@react-email/render": "^1.1.2",
"@tanstack/react-query": "^5.74.4",
"@tanstack/react-table": "^8.21.3",
"@tiptap/extension-table": "^2.11.7",
Expand Down Expand Up @@ -70,8 +72,7 @@
"languine": "^3.1.4",
"marked": "^15.0.11",
"motion": "^12.9.2",
"next": "^15.3.1",
"next-auth": "^5.0.0-beta.27",
"next": "^15.4.0-canary.62",
"next-international": "^1.3.1",
"next-intl": "^3.26.5",
"next-safe-action": "^7.10.6",
Expand All @@ -83,8 +84,8 @@
"posthog-js": "^1.236.6",
"posthog-node": "^4.14.0",
"puppeteer-core": "^24.7.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-email": "^4.0.15",
"react-hotkeys-hook": "^4.6.2",
"react-intersection-observer": "^9.16.0",
"react-markdown": "^9.1.0",
Expand All @@ -104,6 +105,7 @@
"zustand": "^5.0.3"
},
"devDependencies": {
"next": "15.4.0-canary.62",
"@comp/db": "workspace:*",
"@trigger.dev/build": "3.3.17",
"@types/node": "^22.15.2",
Expand All @@ -126,8 +128,8 @@
"./src/lib/encryption": "./src/lib/encryption.ts"
},
"peerDependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19",
"react-dom": "^19",
"react-hook-form": "^7.56.3"
}
}
4 changes: 1 addition & 3 deletions apps/app/src/actions/add-comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ export const addCommentAction = authActionClient
"";
path = path.replace(/\/[a-z]{2}\//, "/");

if (path) {
revalidatePath(path);
}
revalidatePath(path);

return { success: true, data: comment };
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,12 @@ export const createComment = async (
return comment;
});

if (pathToRevalidate) {
revalidatePath(pathToRevalidate);
}
const headersList = await headers();
let path =
headersList.get("x-pathname") || headersList.get("referer") || "";
path = path.replace(/\/[a-z]{2}\//, "/");

revalidatePath(path);

return {
success: true,
Expand Down
39 changes: 39 additions & 0 deletions apps/app/src/actions/context-hub/create-context-entry-action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"use server";

import { revalidatePath } from "next/cache";
import { headers } from "next/headers";
import { authActionClient } from "../safe-action";
import { createContextEntrySchema } from "../schema";
import { db } from "@comp/db";

export const createContextEntryAction = authActionClient
.schema(createContextEntrySchema)
.metadata({ name: "create-context-entry" })
.action(async ({ parsedInput, ctx }) => {
const { question, answer, tags } = parsedInput;
const organizationId = ctx.session.activeOrganizationId;
if (!organizationId) throw new Error("No active organization");

await db.context.create({
data: {
question,
answer,
tags: tags
? tags
.split(",")
.map((t) => t.trim())
.filter(Boolean)
: [],
organizationId,
},
});

const headersList = await headers();
let path =
headersList.get("x-pathname") || headersList.get("referer") || "";
path = path.replace(/\/[a-z]{2}\//, "/");

revalidatePath(path);

return { success: true };
});
28 changes: 28 additions & 0 deletions apps/app/src/actions/context-hub/delete-context-entry-action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"use server";

import { revalidatePath } from "next/cache";
import { headers } from "next/headers";
import { authActionClient } from "../safe-action";
import { deleteContextEntrySchema } from "../schema";
import { db } from "@comp/db";

export const deleteContextEntryAction = authActionClient
.schema(deleteContextEntrySchema)
.metadata({ name: "delete-context-entry" })
.action(async ({ parsedInput, ctx }) => {
const { id } = parsedInput;
const organizationId = ctx.session.activeOrganizationId;
if (!organizationId) throw new Error("No active organization");

await db.context.delete({
where: { id, organizationId },
});

const headersList = await headers();
let path =
headersList.get("x-pathname") || headersList.get("referer") || "";
path = path.replace(/\/[a-z]{2}\//, "/");

revalidatePath(path);
return { success: true };
});
39 changes: 39 additions & 0 deletions apps/app/src/actions/context-hub/update-context-entry-action.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"use server";

import { revalidatePath } from "next/cache";
import { headers } from "next/headers";
import { authActionClient } from "../safe-action";
import { updateContextEntrySchema } from "../schema";
import { db } from "@comp/db";

export const updateContextEntryAction = authActionClient
.schema(updateContextEntrySchema)
.metadata({ name: "update-context-entry" })
.action(async ({ parsedInput, ctx }) => {
const { id, question, answer, tags } = parsedInput;
const organizationId = ctx.session.activeOrganizationId;
if (!organizationId) throw new Error("No active organization");

await db.context.update({
where: { id, organizationId },
data: {
question,
answer,
tags: tags
? tags
.split(",")
.map((t) => t.trim())
.filter(Boolean)
: [],
},
});

const headersList = await headers();
let path =
headersList.get("x-pathname") || headersList.get("referer") || "";
path = path.replace(/\/[a-z]{2}\//, "/");

revalidatePath(path);

return { success: true };
});
Loading
Loading