Skip to content
Draft
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
10 changes: 10 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ jobs:
# Uses env from packages/frontend/.env.production
pnpm --filter ./packages/frontend run build

- name: Upload source maps to Sentry
if: github.event_name == 'release' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
run: |
pnpm dlx @sentry/cli sourcemaps upload \
--org topos-institute \
--project catcolab \
packages/frontend/dist
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

- name: Report cache status
run: |
if [ "${{ github.event_name }}" = "release" ]; then
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/.env.production
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
VITE_APP_TITLE="CatColab"
VITE_SENTRY_DSN="https://1591d07f34c82ac5ead23171188c0b25@o4507942686883840.ingest.us.sentry.io/4511055002599424"
VITE_SENTRY_ENVIRONMENT="production"

VITE_SERVER_URL=https://backend.catcolab.org
VITE_AUTOMERGE_REPO_URL=wss://backend.catcolab.org/repo-ws
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/.env.staging
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
VITE_APP_TITLE="CatColab [next]"
VITE_SENTRY_DSN="https://1591d07f34c82ac5ead23171188c0b25@o4507942686883840.ingest.us.sentry.io/4511055002599424"
VITE_SENTRY_ENVIRONMENT="staging"

VITE_SERVER_URL=https://backend-next.catcolab.org
VITE_AUTOMERGE_REPO_URL=wss://backend-next.catcolab.org/repo-ws
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@mdx-js/rollup": "^3.1.0",
"@modular-forms/solid": "^0.24.1",
"@qubit-rs/client": "^0.4.5",
"@sentry/solid": "^10.43.0",
"@solid-primitives/context": "^0.3.1",
"@solid-primitives/destructure": "^0.2.1",
"@solid-primitives/event-listener": "^2.4.3",
Expand Down
76 changes: 76 additions & 0 deletions packages/frontend/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/frontend/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* @refresh reload */

import * as Sentry from "@sentry/solid";
import { render } from "solid-js/web";

import * as catlog from "catlog-wasm";
Expand All @@ -11,6 +12,15 @@ import "katex/dist/katex.min.css";
// Set panic hook for nice tracebacks from Rust core.
catlog.set_panic_hook();

const sentryDsn = import.meta.env.VITE_SENTRY_DSN;
if (sentryDsn) {
Sentry.init({
dsn: sentryDsn,
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT,
tracesSampleRate: 1.0,
});
}

const root = document.getElementById("root");

render(() => <App />, root!);
Loading