release: dev → main(对标语法批 §11–§14,116 笔,FF-only) #30

Merged
zhangxiang merged 116 commits from dev into main 2026-10-20 07:43:42 +08:00
2 changed files with 28 additions and 5 deletions
Showing only changes of commit c2f4beecbe - Show all commits

No files matched your search

@@ -140,4 +140,27 @@ describe('SolutionDetailContentV3 - L3 信任层三档策略', () => {
expect(screen.getByText('ISO 27001')).toBeInTheDocument();
});
/**
* 回归守卫(本仓真实踩到,2026-10-17):把「为什么这样改」的注释直接写在 JSX 子节点位置
* (`/* ... *\/` 而非 `{/* ... *\/}`)是**合法 JSX**,build 与 1746 例单测全绿,
* 但注释会作为文字节点渲染到页面上。ESLint 的 react/jsx-no-comment-textnodes 是唯一
* 静态防线,而它被判绿是因为 `npm run lint | tail` 把 EXIT=1 吞成了 0
* (管道吞退出码,见 docs/lessons-learned.md)。
*
* 因此这条断言配了**敏感性证明**:先确认两个曾被污染的区域真的渲染了,
* 否则「找不到注释」可能只是「那段 DOM 根本没出现」—— 空断言当守卫是假绿的一种。
*/
it('does not render source comments as page text (jsx-no-comment-textnodes regression)', () => {
const { container } = render(<SolutionDetailContentV3 solution={baseSolution} />);
// 敏感性证明:L164 SolutionsSection 的 eyebrow、L317 SuiteCombinationSection 的中心牌都在
expect(screen.getByText('Solutions')).toBeInTheDocument();
expect(screen.getByText('推荐产品组合')).toBeInTheDocument();
expect(screen.getByText('+')).toBeInTheDocument();
// 被验的那一维
expect(container.textContent).not.toMatch(/\/\*/);
expect(container.textContent).not.toMatch(/\*\//);
});
});
@@ -169,8 +169,8 @@ function SolutionsSection({ solutions }: SolutionsSectionProps) {
<SectionLabel className="justify-center">
<div className="flex items-center gap-5">
<div className="w-14 h-px bg-brand" />
/* tracking-[0.4em] 是记档外的裸字面量(--letter-spacing-widest = 0.12em);
近单色对标的按钮/eyebrow 实测 letterSpacing: normal。收到记档里。 */
{/* tracking-[0.4em] 是记档外的裸字面量(--letter-spacing-widest = 0.12em);
近单色对标的按钮/eyebrow 实测 letterSpacing: normal。收到记档里。 */}
<span className="text-xs tracking-widest uppercase font-bold text-brand-ink">
Solutions
</span>
@@ -315,9 +315,9 @@ function SuiteCombinationSection({ suiteCombination, products }: SuiteCombinatio
</StaggerReveal>
<ScrollReveal delay={0.2} className="flex items-center justify-center lg:col-span-1 bg-bg-elevated">
/* 装饰圆改方角牌:rounded-full 只留给功能性的圆(头像/开关钮/滑块),
这是套件组合图的中心节点装饰,两家对标实测都没有装饰性圆形 */
<div className="w-20 h-20 rounded-cta bg-brand-soft border border-border-rule flex items-center justify-center text-brand-ink font-bold text-xl">
{/* 装饰圆改方角牌:rounded-full 只留给功能性的圆(头像/开关钮/滑块),
这是套件组合图的中心节点装饰,两家对标实测都没有装饰性圆形 */}
<div className="w-20 h-20 rounded-cta bg-brand-soft border border-border-rule flex items-center justify-center text-brand-ink font-bold text-xl">
+
</div>
</ScrollReveal>