feat(web): #126 Frontend Replay UI 整合
All checks were successful
E2E Health Check / e2e-health (push) Successful in 18s

- 新增 useUXAudit hook (5 分鐘自動刷新)
- 新增 UXAuditCard 組件 (健康度 + Replay 連結)
- 整合到錯誤追蹤頁面
- i18n: zh-TW + en 翻譯

功能:
- UX 健康度評分 (good/moderate/poor)
- 有錯誤的 Replay 連結
- 憤怒點擊/死亡點擊統計
- Replay Dashboard 快捷連結

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-03-31 16:04:44 +08:00
parent d03668669b
commit 2f02f1523a
9 changed files with 530 additions and 3 deletions

View File

@@ -24,10 +24,12 @@
import { useTranslations } from 'next-intl'
import { AppLayout } from '@/components/layout'
import { useErrors } from '@/hooks/useErrors'
import { useUXAudit } from '@/hooks/useUXAudit'
import {
ErrorOverviewCard,
RecentIssuesList,
ErrorTrendChart,
UXAuditCard,
} from '@/components/errors'
import { Bug, RefreshCw } from 'lucide-react'
import type { SentryIssue } from '@/lib/api-client'
@@ -53,6 +55,13 @@ export default function ErrorsPage({
setPeriod,
} = useErrors()
// #126: UX Audit / Session Replay 數據
const {
data: uxAuditData,
loading: uxAuditLoading,
error: uxAuditError,
} = useUXAudit()
const handleIssueClick = (issue: SentryIssue) => {
// Open in new tab if permalink available
if (issue.permalink) {
@@ -124,6 +133,13 @@ export default function ErrorsPage({
activePeriod={activePeriod}
onPeriodChange={setPeriod}
/>
{/* #126: UX Audit / Session Replay */}
<UXAuditCard
data={uxAuditData}
loading={uxAuditLoading}
error={uxAuditError}
/>
</div>
{/* Right Column - Issues List */}