feat(web): Herkunft der Fehlermeldung — Cookie tessera_desktop_client und Client-Felder in der Nutzlast
Die Middleware liest jetzt zusaetzlich dv/dc/dos aus der Anfrage und legt daraus das Cookie tessera_desktop_client an (bereinigt per Muster, nur wenn alle drei Werte gueltig sind); desktop-client.ts liest es zurueck. Der Fehler-melden-Dialog fuellt daraus vier neue Nutzlastfelder (clientKind/clientOs/clientVersion/clientCommit), damit die API die Herkunft der Meldung ausweisen kann. Ohne das zweite Cookie (alter Client) bleibt es bei "Desktop-App (unbekannt)". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016g2npLxzH5gZpg8s2S6vKh
This commit is contained in:
@@ -5,6 +5,7 @@ import { useTranslations } from 'next-intl';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { appVersion } from '@/lib/app-version';
|
||||
import { dataUrlToBlob, sendBugReport } from '@/lib/bug-report-api';
|
||||
import { getDesktopClientInfo, isDesktopClient } from '@/lib/desktop-client';
|
||||
import { formatErrorsForReport } from '@/lib/error-buffer';
|
||||
|
||||
/**
|
||||
@@ -54,6 +55,11 @@ export function BugReportDialog({ open, screenshot, isAdmin, onClose }: BugRepor
|
||||
|
||||
const handleSend = async () => {
|
||||
setStatus('sending');
|
||||
// Herkunft (quick-260918-gza): tessera_desktop entscheidet Desktop/
|
||||
// Browser, tessera_desktop_client liefert die Details dazu; fehlt es
|
||||
// (alter Client), bleibt es bei Desktop ohne Details.
|
||||
const desktop = isDesktopClient();
|
||||
const info = desktop ? getDesktopClientInfo() : null;
|
||||
const result = await sendBugReport({
|
||||
description: description.trim(),
|
||||
page: window.location.pathname + window.location.search,
|
||||
@@ -65,6 +71,10 @@ export function BugReportDialog({ open, screenshot, isAdmin, onClose }: BugRepor
|
||||
clientTime: new Date().toISOString(),
|
||||
errors: formatErrorsForReport(),
|
||||
screenshot: attach && screenshot ? dataUrlToBlob(screenshot) : null,
|
||||
clientKind: desktop ? 'desktop' : 'browser',
|
||||
clientOs: info?.os ?? '',
|
||||
clientVersion: info?.version ?? '',
|
||||
clientCommit: info?.commit ?? '',
|
||||
});
|
||||
if (result.ok) {
|
||||
setStatus('sent');
|
||||
|
||||
Reference in New Issue
Block a user