Merge branch 'master' into codex/sse-stream-architecture
# Conflicts: # .hermes/shared-memory/decision-log.md # docs/【玩法创作】平台入口与玩法链路-2026-05-15.md # src/components/platform-entry/PlatformEntryFlowShellImpl.tsx
This commit is contained in:
@@ -414,6 +414,7 @@ import {
|
||||
buildPlatformTaskCompletionDialogDismissKey,
|
||||
formatPlatformDialogSource,
|
||||
isBackgroundGenerationStillRunningMessage,
|
||||
normalizePlatformDialogMessage,
|
||||
PLATFORM_TASK_COMPLETION_MESSAGE,
|
||||
type PlatformDialogCandidate,
|
||||
type PlatformErrorDialogState,
|
||||
@@ -561,6 +562,7 @@ import {
|
||||
buildPlatformPublicGalleryFeeds,
|
||||
getPlatformPublicGalleryEntryKey,
|
||||
getPlatformRecommendRuntimeKind,
|
||||
isPlatformRecommendRuntimeReadyForEntry,
|
||||
isSamePlatformPublicGalleryEntry,
|
||||
type RecommendRuntimeKind,
|
||||
resolvePlatformRecommendRuntimeAutoStartDecision,
|
||||
@@ -744,6 +746,19 @@ const PUZZLE_DRAFT_GENERATION_POINT_COST = 2;
|
||||
const MATCH3D_DRAFT_GENERATION_POINT_COST = 10;
|
||||
const BARK_BATTLE_DRAFT_GENERATION_POINT_COST = 3;
|
||||
|
||||
/** 中文注释:首页公开数据降级时,入口关闭错误不弹窗;真实创作动作仍由对应工作台提示。 */
|
||||
function isCreationEntryDisabledErrorMessage(
|
||||
message: string | null | undefined,
|
||||
) {
|
||||
const normalized = normalizePlatformDialogMessage(message);
|
||||
return Boolean(
|
||||
normalized &&
|
||||
(normalized.includes('creation_entry_disabled') ||
|
||||
normalized.includes('该玩法入口暂不可用') ||
|
||||
normalized.includes('创作入口已关闭')),
|
||||
);
|
||||
}
|
||||
|
||||
const PUZZLE_ONBOARDING_FIRST_VISIT_STORAGE_KEY =
|
||||
'genarrative.puzzle-onboarding.first-visit.v1';
|
||||
const PUZZLE_ONBOARDING_COPY = '待定待定待定';
|
||||
@@ -4185,6 +4200,11 @@ export function PlatformEntryFlowShellImpl({
|
||||
isMiniGameDraftGenerating(
|
||||
activePuzzleBackgroundCompileTask?.generationState ?? null,
|
||||
);
|
||||
const platformBootstrapErrorForDisplay = isCreationEntryDisabledErrorMessage(
|
||||
platformBootstrap.platformError,
|
||||
)
|
||||
? null
|
||||
: platformBootstrap.platformError;
|
||||
const [dismissedPlatformErrorDialogKey, setDismissedPlatformErrorDialogKey] =
|
||||
useState<string | null>(null);
|
||||
const [
|
||||
@@ -4207,7 +4227,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
{
|
||||
key: 'platform-bootstrap',
|
||||
source: '平台首页',
|
||||
message: platformBootstrap.platformError,
|
||||
message: platformBootstrapErrorForDisplay,
|
||||
},
|
||||
{
|
||||
key: 'rpg-creation-type',
|
||||
@@ -4378,7 +4398,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
match3dRun?.runId,
|
||||
match3dSession?.sessionId,
|
||||
pendingPlatformTaskFailureDialog,
|
||||
platformBootstrap.platformError,
|
||||
platformBootstrapErrorForDisplay,
|
||||
publicWorkDetailError,
|
||||
puzzleCreationError,
|
||||
puzzleError,
|
||||
@@ -12011,6 +12031,29 @@ export function PlatformEntryFlowShellImpl({
|
||||
isDesktopLayout,
|
||||
]);
|
||||
|
||||
const activeRecommendEntry =
|
||||
activeRecommendEntryKey && !isDesktopLayout
|
||||
? (recommendRuntimeEntries.find(
|
||||
(entry) =>
|
||||
getPlatformPublicGalleryEntryKey(entry) ===
|
||||
activeRecommendEntryKey,
|
||||
) ?? null)
|
||||
: null;
|
||||
const isActiveRecommendRuntimeReady =
|
||||
activeRecommendEntry !== null &&
|
||||
isPlatformRecommendRuntimeReadyForEntry(activeRecommendEntry, {
|
||||
activeKind: activeRecommendRuntimeKind,
|
||||
hasBabyObjectMatchDraft: Boolean(babyObjectMatchDraft),
|
||||
hasBigFishRun: Boolean(bigFishRun),
|
||||
hasJumpHopRun: Boolean(jumpHopRun),
|
||||
hasMatch3DRun: Boolean(match3dRun),
|
||||
hasSquareHoleRun: Boolean(squareHoleRun),
|
||||
hasVisualNovelRun: Boolean(visualNovelRun),
|
||||
hasWoodenFishRun: Boolean(woodenFishRun),
|
||||
puzzleRunEntryProfileId: puzzleRun?.entryProfileId ?? null,
|
||||
puzzleRunCurrentLevelProfileId: puzzleRun?.currentLevel?.profileId ?? null,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
const decision = resolvePlatformRecommendRuntimeAutoStartDecision({
|
||||
isDesktopLayout,
|
||||
@@ -12972,7 +13015,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
(isVisualNovelCreationOpen && isVisualNovelLoadingLibrary) ||
|
||||
isBabyObjectMatchBusy
|
||||
? null
|
||||
: (platformBootstrap.platformError ??
|
||||
: (platformBootstrapErrorForDisplay ??
|
||||
sessionController.agentWorkspaceRestoreError ??
|
||||
bigFishError ??
|
||||
match3dError ??
|
||||
@@ -13093,7 +13136,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
platformError={
|
||||
platformBootstrap.isLoadingPlatform
|
||||
? null
|
||||
: (platformBootstrap.platformError ??
|
||||
: (platformBootstrapErrorForDisplay ??
|
||||
sessionController.agentWorkspaceRestoreError)
|
||||
}
|
||||
dashboardError={
|
||||
@@ -13122,6 +13165,7 @@ export function PlatformEntryFlowShellImpl({
|
||||
onOpenRecommendGalleryDetail={openRecommendGalleryDetail}
|
||||
recommendRuntimeContent={recommendRuntimeContent}
|
||||
activeRecommendEntryKey={activeRecommendEntryKey}
|
||||
isRecommendRuntimeReady={isActiveRecommendRuntimeReady}
|
||||
isStartingRecommendEntry={
|
||||
isStartingRecommendEntry ||
|
||||
isBigFishBusy ||
|
||||
|
||||
Reference in New Issue
Block a user