feat: add new autofill environment section on automatic issues

This commit is contained in:
Benebo7 2026-07-24 19:24:53 -03:00
parent 389337da0b
commit 3f361dbd45
3 changed files with 22 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import "./globals.css";
import posthog from "posthog-js";
import { useEffect, useMemo } from "react";
import { Button } from "@/components/ui/button";
import { detectEnvironment } from "@/lib/env-config";
const ISSUES_URL = "https://github.com/MODSetter/SurfSense/issues/new";
@ -19,6 +20,7 @@ function buildBasicIssueUrl(error: Error & { digest?: string }) {
"",
`- **Error:** ${error.message}`,
...(error.digest ? [`- **Digest:** \`${error.digest}\``] : []),
`- **Environment:** ${detectEnvironment()}`,
`- **Timestamp:** ${new Date().toISOString()}`,
`- **Page:** \`${typeof window !== "undefined" ? window.location.pathname : "unknown"}\``,
`- **User Agent:** \`${typeof navigator !== "undefined" ? navigator.userAgent : "unknown"}\``,