Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(showcase): use supported heading weights

Dasha7f246c5dd7c
diff --git a/packages/maker-shared/src/__tests__/uiMockShowcase.test.ts b/packages/maker-shared/src/__tests__/uiMockShowcase.test.ts
index 4d1fcbb86c..27ef0d73e8 100644
--- a/packages/maker-shared/src/__tests__/uiMockShowcase.test.ts
+++ b/packages/maker-shared/src/__tests__/uiMockShowcase.test.ts
@@ -6,6 +6,7 @@ import {
richChart,
richLabel,
richResolvedValues,
+ richVisualStyle,
splitRichAnswer,
} from "../richAnswer";
@@ -66,6 +67,12 @@ describe("shared full-client showcase data", () => {
).toEqual(trend);
expect(richLabel(report.nodes.get("improvement")!, values)).toBe("+24");
const plan = documentFor(`ui-mock-showcase-plan-${locale}`);
+ for (const doc of [report, plan]) {
+ // Both clients consume normalized styles; unsupported weights lose emphasis.
+ expect(richVisualStyle(doc.nodes.get("heading")!).fontWeight).toBe(
+ "600",
+ );
+ }
const defaults = richResolvedValues(plan);
expect(defaults.hours).toBe(36);
expect(defaults.days).toBe(3);
diff --git a/packages/maker-shared/src/uiMockShowcase.ts b/packages/maker-shared/src/uiMockShowcase.ts
index db093bb472..7100e15735 100644
--- a/packages/maker-shared/src/uiMockShowcase.ts
+++ b/packages/maker-shared/src/uiMockShowcase.ts
@@ -61,7 +61,7 @@ function feedbackAnswer(locale: Locale): string {
parent: "report",
props: {
text: t("让开场十分钟,更好玩", "A better first ten minutes"),
- style: { fontSize: 25, fontWeight: 650, lineHeight: 1.25 },
+ style: { fontSize: 25, fontWeight: 600, lineHeight: 1.25 },
},
},
{
@@ -191,7 +191,7 @@ function planAnswer(locale: Locale): string {
parent: "plan",
props: {
text: t("下一轮试玩,怎么排?", "Shape the next playtest"),
- style: { fontSize: 25, fontWeight: 650 },
+ style: { fontSize: 25, fontWeight: 600 },
},
},
{