Files
novalon-website/src/components/detail/l3-empty-fallback.tsx
T
zhangxiang 82217576b9 feat(detail): Layer 3 信任层空数据兜底骨架(L3SignalsSlot + L3EmptyFallback + EarlyAccessNotice)
- 新增 L3SignalsSlot:4 类可验证替代信号卡(方法论/团队/历程/服务承诺),
  服务承诺卡 disabled 占位待业务确认;零编造约束下替代真实案例/认证
- 新增 EarlyAccessNotice:首批客户共创状态条(单一真源 company.ts EARLY_ACCESS)
- 新增 L3EmptyFallback:caseStudies/certifications/dataProofs 三者全空时渲染兜底,
  任一非空 return null 保留本地真实 section 视觉
- 接入 5 处详情页:solution v3 / service v4 / product v3 / erp-upgrade-v3 / standalone/[id]
- 修复 StaggerReveal 网格布局:grid 类须挂在 StaggerReveal 自身(否则卡片堆单列)
- 更新 solution 测试至新行为(空数据→兜底渲染)+ 补 lucide 图标 mock
- 修复 header.test.tsx 双 logo 断言(2593599 遗留)
- 新增 scripts/audit/l3-fallback-verify.mjs 运行时验证(浅/深双版 PASS)
  注:必须用 localhost 而非 127.0.0.1 —— Next dev allowedDevOrigins 默认白名单
  不含 127.0.0.1,chunk 请求带该 Origin 被 403 → hydration 不发生 → 动画全冻结

验证:type-check 0 错 · lint 0 错(127 既有 warnings) · 单测 129 套件/1628 通过 ·
L3 兜底浅深双版渲染截图 PASS
2026-09-20 11:50:58 +08:00

47 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
/**
* L3EmptyFallback — L3 信任层「数据空」兜底组件
*
* 设计意图:
* - 详情页 L3 由 3 类内容构成:caseStudies / certifications / dataProofs。
* 任一非空时由对应本地 section 渲染真实内容;**三者全空时整段 L3 消失** =
* 用户感受「这个详情页没有信任层」。
* - 零编造约束下,**禁止**伪造案例/认证/数据。本组件提供合规替代:
* 全空时渲染 L3SignalsSlot(4 类可验证信号卡)+ EarlyAccessNotice(共创占位),
* 既保持 L3 结构完整,又不违背「零虚构客户案例」原则。
*
* 与本地 CaseStudiesSection / CertificationsSection 的协作:
* - 三者全空 → 本组件渲染 signals + notice
* - 任一非空 → 本组件 return null,让真实 section 渲染(保留本地视觉细节)
*
* @see /Users/zhangxiang/Codes/Novalon/novalon-website/.workbuddy/memory/MEMORY.md
* "内容真实性约束" + "Layer 3 替代信号"
*/
import { L3SignalsSlot } from './l3-signals-slot';
import { EarlyAccessNotice } from './early-access-notice';
export function L3EmptyFallback({
caseStudies,
certifications,
dataProofs,
}: {
caseStudies?: readonly unknown[];
certifications?: readonly unknown[];
dataProofs?: readonly unknown[];
}) {
const hasContent =
(caseStudies?.length ?? 0) > 0 ||
(certifications?.length ?? 0) > 0 ||
(dataProofs?.length ?? 0) > 0;
if (hasContent) return null;
return (
<>
<L3SignalsSlot />
<EarlyAccessNotice />
</>
);
}