Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions apps/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Sentry Config File
.env.sentry-build-plugin
2 changes: 2 additions & 0 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@rocicorp/zero": "0.25.5",
"@sentry/react": "^10.35.0",
"@sentry/vite-plugin": "^4.7.0",
"@serwist/window": "^9.2.3",
"@tanstack/react-router": "1.139.14",
"@tanstack/react-router-devtools": "^1.139.14",
Expand Down
8 changes: 8 additions & 0 deletions apps/app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import { StrictMode } from "react";
import ReactDOM from "react-dom/client";
import { RouterProvider, createRouter } from "@tanstack/react-router";
import * as Sentry from "@sentry/react";
import "./index.css";

// Initialize Sentry for error tracking
Sentry.init({
dsn: "https://9d87ba0a2f4279c02f059509b276419d@o4510748532342784.ingest.us.sentry.io/4510748533194752",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: DSN is hardcoded and exposed in client-side code. While DSNs are considered public, consider moving to an environment variable for easier management across environments (dev/staging/prod).

Suggested change
dsn: "https://9d87ba0a2f4279c02f059509b276419d@o4510748532342784.ingest.us.sentry.io/4510748533194752",
dsn: import.meta.env.VITE_SENTRY_DSN,

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/app/src/main.tsx
Line: 9:9

Comment:
**style:** DSN is hardcoded and exposed in client-side code. While DSNs are considered public, consider moving to an environment variable for easier management across environments (dev/staging/prod).

```suggestion
  dsn: import.meta.env.VITE_SENTRY_DSN,
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

sendDefaultPii: true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: sendDefaultPii: true sends personally identifiable information (PII) to Sentry, including user IPs, usernames, and other identifying data. Verify this complies with your privacy policy and data regulations (GDPR, CCPA, etc).

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/app/src/main.tsx
Line: 10:10

Comment:
**style:** `sendDefaultPii: true` sends personally identifiable information (PII) to Sentry, including user IPs, usernames, and other identifying data. Verify this complies with your privacy policy and data regulations (GDPR, CCPA, etc).

How can I resolve this? If you propose a fix, please make it concise.

enableLogs: true,
});

// Import the generated route tree
import { routeTree } from "./routeTree.gen";

Expand Down
35 changes: 20 additions & 15 deletions apps/app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { sentryVitePlugin } from "@sentry/vite-plugin";
import { serwist } from "@serwist/vite";
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
Expand All @@ -6,23 +7,27 @@ import path from "path";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [
tanstackRouter({
target: "react",
autoCodeSplitting: true,
}),
react(),
serwist({
swSrc: "src/sw.ts",
swDest: "sw.js",
globDirectory: "dist",
injectionPoint: "self.__SW_MANIFEST",
rollupFormat: "iife",
}),
],
plugins: [tanstackRouter({
target: "react",
autoCodeSplitting: true,
}), react(), serwist({
swSrc: "src/sw.ts",
swDest: "sw.js",
globDirectory: "dist",
injectionPoint: "self.__SW_MANIFEST",
rollupFormat: "iife",
}), sentryVitePlugin({
org: "sixhuman-es",
project: "web-app"
})],
Comment on lines +19 to +22

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Missing authToken configuration. Check that SENTRY_AUTH_TOKEN is set in your CI/CD environment and local .env.sentry-build-plugin file for source map uploads to work.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/app/vite.config.ts
Line: 19:22

Comment:
**style:** Missing `authToken` configuration. Check that `SENTRY_AUTH_TOKEN` is set in your CI/CD environment and local `.env.sentry-build-plugin` file for source map uploads to work.

How can I resolve this? If you propose a fix, please make it concise.


resolve: {
alias: {
"@": path.resolve(__dirname, "."),
},
},
});

build: {
sourcemap: true
}
});
Loading