chore(qa): 验收台账与证据入库 + 构建/部署配置同步

- docs/acceptance/qa-tracker.md:跨周期缺陷单一真源台账(§7=第五轮)。
- 周期 1/2 + iPhone SE/axe 验收证据目录、ACCEPTANCE_REVIEW 快照入库。
- 同步 README/CONTEXT/CLAUDE/DESIGN/testing/deployment/lessons-learned 口径;
  next.config/Dockerfile/nginx/Jenkinsfile/docker-compose/sentry/prisma 对齐
  standalone 产物装配与部署形态。
This commit is contained in:
2026-09-28 10:48:09 +08:00
parent 6bb7c557ee
commit a0328a623f
128 changed files with 22455 additions and 504 deletions
+16 -77
View File
@@ -1,77 +1,16 @@
// @ts-nocheck
import * as Sentry from '@sentry/nextjs';
const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN || '';
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
environment: process.env.NODE_ENV || 'development',
enabled: process.env.NODE_ENV !== 'development',
tracesSampleRate: process.env.NODE_ENV === 'production' ? 0.2 : 0,
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
ignoreErrors: [
/_AutofillCallbackHandler/,
/NetworkError/,
/webkit\.messageHandlers/,
/Non-Error promise rejection captured/,
/^Loading CSS chunk.*failed/,
/^Loading chunk.*failed/,
/^Failed to fetch dynamically imported module/,
],
denyUrls: [
/extensions\//i,
/^chrome:\/\//i,
/webappstoolbars/i,
/safari-extension:/i,
/mypersonalassistant/i,
],
initialScope: {
tags: {
project: 'novalon-website',
version: process.env.npm_package_version || 'unknown',
deployment: process.env.NODE_ENV || 'unknown',
},
user: {
id: 'anonymous',
segment: 'visitor',
},
},
beforeSend(event) {
if (event.request?.url) {
event.request.url = event.request.url.replace(/\/[a-f0-9]{32}/gi, '/[hash]');
}
if (event.breadcrumbs) {
event.breadcrumbs = event.breadcrumbs.filter((breadcrumb) => {
return !(
breadcrumb.category === 'console' &&
breadcrumb.level === 'log'
);
});
}
return event;
},
integrations: [
Sentry.browserTracingIntegration(),
Sentry.replayIntegration({
maskAllText: true,
blockAllMedia: true,
}),
],
});
console.log('[Sentry] Client-side monitoring initialized');
} else {
console.warn('[Sentry] NEXT_PUBLIC_SENTRY_DSN not configured, error monitoring disabled');
}
export default Sentry;
// 已迁移(2026-09,Sentry 接线):本文件的初始化逻辑整体移入 src/instrumentation-client.ts。
//
// 为什么迁移而非保留:
// 1. Next 16 起 `next build` 默认使用 Turbopack
// (node_modules/next/dist/docs/01-app/02-guides/upgrading/version-16.md:128),
// Turbopack 下本文件不会被任何入口加载——SDK 源码中的弃用提示明说
// "When using Turbopack `sentry.client.config.ts` will no longer work"
// (node_modules/@sentry/nextjs/build/esm/config/webpack.js:207-213)。
// 2. 若本文件仍含 Sentry.init,webpack 回退路径(next build --webpack)会把它与
// instrumentation-client 一并注入 client entry,造成双重初始化
// (node_modules/@sentry/nextjs/build/esm/config/webpack.js:272-282 addSentryToClientEntryProperty)。
//
// 本文件仅保留为空模块:文件删除需另行审批;webpack 回退路径即使注入此文件也只是空模块,
// 不会与 instrumentation-client 双重初始化。
// 客户端配置的唯一事实来源(single source of truth)现为 src/instrumentation-client.ts。
export {};