fix(experiments): 按决策返回值消费多组界面实验

- 用户端支持动态组别和未入组状态,不再固定使用B组判断新版界面
- 决策过期使用服务端返回的默认值,保留旧响应兼容
This commit is contained in:
湛兮
2026-10-27 15:15:21 +08:00
parent 4079397625
commit a963bec3f3
3 changed files with 12 additions and 3 deletions
+6 -1
View File
@@ -248,6 +248,7 @@ export function DigitalHome({
decision: {
...current.decision,
variant: current.decision.fallbackVariant,
value: current.decision.fallbackValue,
decisionId: null,
},
}
@@ -993,7 +994,11 @@ export function DigitalHome({
},
[],
);
const modern = boot?.decision.variant === "B";
// UI按消费者返回值决定,组名仅用于归因;C到Z同样可以返回新版UI。
// 缺少value时兼容尚未升级的服务响应。
const modern = boot?.decision.value !== undefined
? boot.decision.value === "new" || boot.decision.value === true
: boot?.decision.variant === "B";
return (
<div
className={`dh-app ${modern ? "dh-modern" : "dh-classic"} ${conversation ? "dh-in-chat" : ""}`}