GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — desktop: sentry integration (#15300) · huer0625/opencode@163290b

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .github/workflows
    • deploy.yml
    • publish.yml
  • bun.lock
  • package.json
  • packages
    • app
      • package.json
      • src
        • app.tsx
        • entry.tsx
        • env.d.ts
        • i18n
          • ar.ts
          • br.ts
          • bs.ts
          • da.ts
          • de.ts
          • en.ts
          • es.ts
          • fr.ts
          • ja.ts
          • ko.ts
          • no.ts
          • pl.ts
          • ru.ts
          • th.ts
          • tr.ts
          • zh.ts
          • zht.ts
        • pages
          • error.tsx
      • vite.config.ts
    • desktop-electron
      • electron.vite.config.ts
      • package.json
      • src/renderer
        • index.tsx
    • desktop
      • package.json
      • src
        • env.d.ts
        • index.tsx
      • vite.config.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.github/workflows/deploy.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/deploy.yml
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ jobs:
3636
PLANETSCALE_SERVICE_TOKEN_NAME: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_NAME }}
3737
PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
3838
STRIPE_SECRET_KEY: ${{ github.ref_name == 'production' && secrets.STRIPE_SECRET_KEY_PROD || secrets.STRIPE_SECRET_KEY_DEV }}
39+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
40+
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
41+
SENTRY_PROJECT: ${{ vars.WEB_SENTRY_PROJECT }}
42+
SENTRY_RELEASE: web@${{ github.sha }}
43+
VITE_SENTRY_DSN: ${{ vars.WEB_SENTRY_DSN }}
44+
VITE_SENTRY_RELEASE: web@${{ github.sha }}
Collapse file

‎.github/workflows/publish.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,13 @@ jobs:
494494
working-directory: packages/desktop-electron
495495
env:
496496
OPENCODE_CHANNEL: ${{ (github.ref_name == 'beta' && 'beta') || 'prod' }}
497+
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
498+
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
499+
SENTRY_PROJECT: ${{ vars.WEB_SENTRY_PROJECT }}
500+
SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }}
501+
VITE_SENTRY_DSN: ${{ vars.WEB_SENTRY_DSN }}
502+
VITE_SENTRY_ENVIRONMENT: ${{ (github.ref_name == 'beta' && 'beta') || 'production' }}
503+
VITE_SENTRY_RELEASE: desktop@${{ needs.version.outputs.version }}
497504

498505
- name: Package and publish
499506
if: needs.version.outputs.release
Collapse file

‎bun.lock‎

Copy file name to clipboardExpand all lines: bun.lock
+105-9Lines changed: 105 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎package.json‎

Copy file name to clipboardExpand all lines: package.json
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@
7777
"@solidjs/meta": "0.29.4",
7878
"@solidjs/router": "0.15.4",
7979
"@solidjs/start": "https://pkg.pr.new/@solidjs/start@dfb2020",
80+
"@sentry/solid": "10.36.0",
81+
"@sentry/vite-plugin": "4.6.0",
8082
"solid-js": "1.9.10",
8183
"vite-plugin-solid": "2.11.10",
8284
"@lydell/node-pty": "1.2.0-beta.10"
Collapse file

‎packages/app/package.json‎

Copy file name to clipboardExpand all lines: packages/app/package.json
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"devDependencies": {
2828
"@happy-dom/global-registrator": "20.0.11",
2929
"@playwright/test": "catalog:",
30+
"@sentry/vite-plugin": "catalog:",
3031
"@tailwindcss/vite": "catalog:",
3132
"@tsconfig/bun": "1.0.9",
3233
"@types/bun": "catalog:",
@@ -40,6 +41,7 @@
4041
},
4142
"dependencies": {
4243
"@kobalte/core": "catalog:",
44+
"@sentry/solid": "catalog:",
4345
"@opencode-ai/sdk": "workspace:*",
4446
"@opencode-ai/ui": "workspace:*",
4547
"@opencode-ai/core": "workspace:*",
Collapse file

‎packages/app/src/app.tsx‎

Copy file name to clipboardExpand all lines: packages/app/src/app.tsx
+14-6Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import "@/index.css"
2+
import * as Sentry from "@sentry/solid"
23
import { I18nProvider } from "@opencode-ai/ui/context"
34
import { DialogProvider } from "@opencode-ai/ui/context/dialog"
45
import { FileComponentProvider } from "@opencode-ai/ui/context/file"
@@ -148,12 +149,19 @@ export function AppBaseProviders(props: ParentProps<{ locale?: Locale }>) {
148149
>
149150
<LanguageProvider locale={props.locale}>
150151
<UiI18nBridge>
151-
<ErrorBoundary fallback={(error) => <ErrorPage error={error} />}>
152-
<DialogProvider>
153-
<MarkedProvider>
154-
<FileComponentProvider component={File}>{props.children}</FileComponentProvider>
155-
</MarkedProvider>
156-
</DialogProvider>
152+
<ErrorBoundary
153+
fallback={(error) => {
154+
Sentry.captureException(error)
155+
return <ErrorPage error={error} />
156+
}}
157+
>
158+
<QueryProvider>
159+
<DialogProvider>
160+
<MarkedProvider>
161+
<FileComponentProvider component={File}>{props.children}</FileComponentProvider>
162+
</MarkedProvider>
163+
</DialogProvider>
164+
</QueryProvider>
157165
</ErrorBoundary>
158166
</UiI18nBridge>
159167
</LanguageProvider>
Collapse file

‎packages/app/src/entry.tsx‎

Copy file name to clipboardExpand all lines: packages/app/src/entry.tsx
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// @refresh reload
22

3+
import * as Sentry from "@sentry/solid"
34
import { render } from "solid-js/web"
45
import { AppBaseProviders, AppInterface } from "@/app"
56
import { type Platform, PlatformProvider } from "@/context/platform"
@@ -125,6 +126,25 @@ const platform: Platform = {
125126
setDefaultServer: writeDefaultServerUrl,
126127
}
127128

129+
if (import.meta.env.VITE_SENTRY_DSN) {
130+
Sentry.init({
131+
dsn: import.meta.env.VITE_SENTRY_DSN,
132+
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT ?? import.meta.env.MODE,
133+
release: import.meta.env.VITE_SENTRY_RELEASE ?? `web@${pkg.version}`,
134+
initialScope: {
135+
tags: {
136+
platform: "web",
137+
},
138+
},
139+
integrations: (integrations) => {
140+
return integrations.filter(
141+
(i) =>
142+
i.name !== "Breadcrumbs" && !(import.meta.env.OPENCODE_CHANNEL === "prod" && i.name === "GlobalHandlers"),
143+
)
144+
},
145+
})
146+
}
147+
128148
if (root instanceof HTMLElement) {
129149
const server: ServerConnection.Http = { type: "http", http: { url: getCurrentUrl() } }
130150
render(
Collapse file

‎packages/app/src/env.d.ts‎

Copy file name to clipboardExpand all lines: packages/app/src/env.d.ts
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ interface ImportMetaEnv {
22
readonly VITE_OPENCODE_SERVER_HOST: string
33
readonly VITE_OPENCODE_SERVER_PORT: string
44
readonly VITE_OPENCODE_CHANNEL?: "dev" | "beta" | "prod"
5+
6+
readonly VITE_SENTRY_DSN?: string
7+
readonly VITE_SENTRY_ENVIRONMENT?: string
8+
readonly VITE_SENTRY_RELEASE?: string
59
}
610

711
interface ImportMeta {
Collapse file

‎packages/app/src/i18n/ar.ts‎

Copy file name to clipboardExpand all lines: packages/app/src/i18n/ar.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,8 @@ export const dict = {
402402
"error.page.description": "حدث خطأ أثناء تحميل التطبيق.",
403403
"error.page.details.label": "تفاصيل الخطأ",
404404
"error.page.action.restart": "إعادة تشغيل",
405+
"error.page.action.report": "الإبلاغ عن الخطأ",
406+
"error.page.action.reported": "تم الإبلاغ عن الخطأ",
405407
"error.page.action.checking": "جارٍ التحقق...",
406408
"error.page.action.checkUpdates": "التحقق من وجود تحديثات",
407409
"error.page.action.updateTo": "تحديث إلى {{version}}",
Collapse file

‎packages/app/src/i18n/br.ts‎

Copy file name to clipboardExpand all lines: packages/app/src/i18n/br.ts
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,8 @@ export const dict = {
403403
"error.page.description": "Ocorreu um erro ao carregar a aplicação.",
404404
"error.page.details.label": "Detalhes do Erro",
405405
"error.page.action.restart": "Reiniciar",
406+
"error.page.action.report": "Reportar erro",
407+
"error.page.action.reported": "Erro reportado",
406408
"error.page.action.checking": "Verificando...",
407409
"error.page.action.checkUpdates": "Verificar atualizações",
408410
"error.page.action.updateTo": "Atualizar para {{version}}",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.