修复推荐页切作品误报无法进入
区分推荐运行态启动 pending 与真实失败 切作品时保持封面遮罩等待自动重试 补充推荐页 pending 切换回归测试 更新玩法链路文档的失败态判断口径
This commit is contained in:
@@ -12794,6 +12794,54 @@ export function PlatformEntryFlowShellImpl({
|
||||
setPuzzleError(null);
|
||||
}
|
||||
}, [activeRecommendRuntimeKind, setPuzzleError]);
|
||||
const isRecommendRuntimeStartPending = useCallback(
|
||||
(runtimeKind: RecommendRuntimeKind) => {
|
||||
if (runtimeKind === 'big-fish') {
|
||||
return isBigFishBusy;
|
||||
}
|
||||
if (runtimeKind === 'match3d') {
|
||||
return isMatch3DBusy;
|
||||
}
|
||||
if (runtimeKind === 'puzzle') {
|
||||
return isPuzzleBusy || puzzleStartInFlightKeyRef.current !== null;
|
||||
}
|
||||
if (runtimeKind === 'jump-hop') {
|
||||
return isJumpHopBusy;
|
||||
}
|
||||
if (runtimeKind === 'puzzle-clear') {
|
||||
return isPuzzleClearBusy;
|
||||
}
|
||||
if (runtimeKind === 'wooden-fish') {
|
||||
return isWoodenFishBusy;
|
||||
}
|
||||
if (runtimeKind === 'square-hole') {
|
||||
return isSquareHoleBusy;
|
||||
}
|
||||
if (runtimeKind === 'visual-novel') {
|
||||
return isVisualNovelBusy;
|
||||
}
|
||||
if (runtimeKind === 'bark-battle') {
|
||||
return isBarkBattleBusy;
|
||||
}
|
||||
if (runtimeKind === 'edutainment') {
|
||||
return isBabyObjectMatchBusy;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
[
|
||||
isBabyObjectMatchBusy,
|
||||
isBarkBattleBusy,
|
||||
isBigFishBusy,
|
||||
isJumpHopBusy,
|
||||
isMatch3DBusy,
|
||||
isPuzzleBusy,
|
||||
isPuzzleClearBusy,
|
||||
isSquareHoleBusy,
|
||||
isVisualNovelBusy,
|
||||
isWoodenFishBusy,
|
||||
],
|
||||
);
|
||||
|
||||
const leaveAgentWorkspace = useCallback(() => {
|
||||
sessionController.resetSessionViewState();
|
||||
@@ -15843,6 +15891,11 @@ export function PlatformEntryFlowShellImpl({
|
||||
if (started) {
|
||||
setActiveRecommendRuntimeKind(runtimeKind);
|
||||
setActiveRecommendRuntimeError(null);
|
||||
} else if (isRecommendRuntimeStartPending(runtimeKind)) {
|
||||
// 中文注释:切换推荐作品时,旧作品启动请求或退出收口可能仍在进行;
|
||||
// 这类中间态继续保留封面遮罩,不能误报成作品不可进入。
|
||||
setActiveRecommendRuntimeKind(runtimeKind);
|
||||
setActiveRecommendRuntimeError(null);
|
||||
} else {
|
||||
setActiveRecommendRuntimeKind(null);
|
||||
setActiveRecommendRuntimeError('作品暂时无法进入,请稍后再试。');
|
||||
@@ -15863,6 +15916,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
[
|
||||
activeRecommendEntryKey,
|
||||
barkBattleGalleryEntries,
|
||||
isRecommendRuntimeStartPending,
|
||||
saveAndExitRecommendPuzzleRuntime,
|
||||
selectedPuzzleDetail,
|
||||
setBarkBattleError,
|
||||
@@ -16394,7 +16448,9 @@ export function PlatformEntryFlowShellImpl({
|
||||
|
||||
if (
|
||||
(activeRecommendEntry !== null && isActiveRecommendRuntimeReady) ||
|
||||
isStartingRecommendEntry
|
||||
isStartingRecommendEntry ||
|
||||
(activeRecommendRuntimeKind !== null &&
|
||||
isRecommendRuntimeStartPending(activeRecommendRuntimeKind))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
@@ -16413,6 +16469,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
bigFishRun,
|
||||
jumpHopRun,
|
||||
isActiveRecommendRuntimeReady,
|
||||
isRecommendRuntimeStartPending,
|
||||
isStartingRecommendEntry,
|
||||
match3dRun,
|
||||
platformBootstrap.isLoadingPlatform,
|
||||
|
||||
Reference in New Issue
Block a user