合并最新 origin/master

补合 master 最新小程序分享、开发脚本与 server-manager-panel 更新

保留外部生成 worker 分支已有改动,继续本地合并不推送
This commit is contained in:
2026-06-11 23:13:43 +08:00
48 changed files with 5640 additions and 263 deletions

View File

@@ -353,6 +353,7 @@ import {
updateVisualNovelWork,
} from '../../services/visual-novel-works';
import { requestGenerationResultSubscribePermission } from '../../services/wechatMiniProgramSubscribe';
import { postWechatMiniProgramShareTarget } from '../../services/wechatMiniProgramShareTarget';
import {
woodenFishClient,
type WoodenFishGalleryCardResponse,
@@ -378,6 +379,7 @@ import {
selectAdjacentPlatformRecommendEntry,
} from '../rpg-entry/rpgEntryPublicGalleryViewModel';
import {
describePublicGalleryCardKind,
isBigFishGalleryEntry,
isEdutainmentGalleryEntry,
isJumpHopGalleryEntry,
@@ -387,6 +389,8 @@ import {
mapPuzzleWorkToPlatformGalleryCard,
type PlatformPublicGalleryCard,
resolvePlatformPublicWorkCode,
resolvePlatformWorldCoverImage,
resolvePlatformWorldFallbackCoverImage,
} from '../rpg-entry/rpgEntryWorldPresentation';
import { useRpgCreationAgentOperationPolling } from '../rpg-entry/useRpgCreationAgentOperationPolling';
import { useRpgCreationEnterWorld } from '../rpg-entry/useRpgCreationEnterWorld';
@@ -844,6 +848,25 @@ function resolveRecommendEntryShareStage(
return 'work-detail';
}
function postRecommendEntryMiniProgramShareTarget(
entry: PlatformPublicGalleryCard | null | undefined,
) {
if (!entry) {
return false;
}
const publicWorkCode = resolvePlatformPublicWorkCode(entry)?.trim();
if (!publicWorkCode) {
return false;
}
return postWechatMiniProgramShareTarget({
targetPath: '/works/detail',
work: publicWorkCode,
title: entry.worldName,
});
}
function pushPuzzleResultHistoryEntry(
session: PuzzleAgentSessionSnapshot | null,
) {
@@ -2994,10 +3017,14 @@ export function PlatformEntryFlowShellImpl({
return;
}
postRecommendEntryMiniProgramShareTarget(entry);
openPublishShareModal({
title: entry.worldName,
publicWorkCode,
stage: resolveRecommendEntryShareStage(entry),
workTypeLabel: describePublicGalleryCardKind(entry),
coverImageSrc: resolvePlatformWorldCoverImage(entry),
fallbackCoverImageSrc: resolvePlatformWorldFallbackCoverImage(entry),
});
},
[openPublishShareModal],
@@ -13734,6 +13761,22 @@ export function PlatformEntryFlowShellImpl({
puzzleRun?.currentLevel?.profileId ?? null,
});
useEffect(() => {
if (
selectionStage !== 'platform' ||
platformBootstrap.platformTab !== 'home' ||
!activeRecommendEntry
) {
return;
}
postRecommendEntryMiniProgramShareTarget(activeRecommendEntry);
}, [
activeRecommendEntry,
platformBootstrap.platformTab,
selectionStage,
]);
useEffect(() => {
const decision = resolvePlatformRecommendRuntimeAutoStartDecision({
isDesktopLayout,

View File

@@ -0,0 +1,30 @@
import type {
MiniGameDraftGenerationKind,
MiniGameDraftGenerationState,
} from '../../services/miniGameDraftGenerationProgress';
import type { SelectionStage } from './platformEntryTypes';
type MiniGameGenerationProgressTickStateMap = Partial<
Record<MiniGameDraftGenerationKind, MiniGameDraftGenerationState | null>
>;
export function resolveMiniGameGenerationProgressTickState(
selectionStage: SelectionStage,
states: MiniGameGenerationProgressTickStateMap,
) {
const stageKindMap: Partial<
Record<SelectionStage, MiniGameDraftGenerationKind>
> = {
'puzzle-generating': 'puzzle',
'big-fish-generating': 'big-fish',
'square-hole-generating': 'square-hole',
'match3d-generating': 'match3d',
'baby-object-match-generating': 'baby-object-match',
'jump-hop-generating': 'jump-hop',
'puzzle-clear-generating': 'puzzle-clear',
'wooden-fish-generating': 'wooden-fish',
};
const kind = stageKindMap[selectionStage];
return kind ? (states[kind] ?? null) : null;
}