fix: route recommend puzzle next through feed

This commit is contained in:
2026-06-07 14:14:16 +08:00
parent e56a25243c
commit 8f460feb41
11 changed files with 84 additions and 126 deletions

View File

@@ -5808,10 +5808,10 @@ export function PlatformEntryFlowShellImpl({
setPuzzleRun(null);
setPuzzleRuntimeAuthMode('default');
setSelectedPuzzleDetail(null);
platformBootstrap.setPlatformTab(authUi?.user ? 'home' : 'category');
platformBootstrap.setPlatformTab('home');
setSelectionStage('platform');
clearPuzzleRuntimeUrlState();
}, [authUi?.user, platformBootstrap, setSelectionStage]);
}, [platformBootstrap, setSelectionStage]);
useEffect(() => {
if (
@@ -12566,10 +12566,6 @@ export function PlatformEntryFlowShellImpl({
? await buildRecommendRuntimeGuestOptions()
: {};
const targetProfileId = _target?.profileId?.trim() ?? '';
const preferSimilarWork =
activeRecommendRuntimeKind === 'puzzle' &&
puzzleRuntimeReturnStage === 'platform' &&
puzzleRun.nextLevelMode === 'sameWork';
if (puzzleRun.nextLevelMode === 'similarWorks' && targetProfileId) {
const itemPromise =
selectedPuzzleDetail?.profileId === targetProfileId
@@ -12609,13 +12605,10 @@ export function PlatformEntryFlowShellImpl({
puzzleRuntimeAuthMode === 'isolated'
? await advancePuzzleNextLevel(
puzzleRun.runId,
preferSimilarWork ? { preferSimilarWork: true } : {},
{},
runtimeGuestOptions,
)
: await advancePuzzleNextLevel(
puzzleRun.runId,
preferSimilarWork ? { preferSimilarWork: true } : {},
);
: await advancePuzzleNextLevel(puzzleRun.runId, {});
const nextProfileId = run.currentLevel?.profileId?.trim() ?? '';
if (
nextProfileId &&
@@ -16011,8 +16004,8 @@ export function PlatformEntryFlowShellImpl({
onDragPiece={(payload) => {
void dragPuzzlePiece(payload);
}}
onAdvanceNextLevel={(target) => {
void advancePuzzleLevel(target);
onAdvanceNextLevel={() => {
selectAdjacentRecommendRuntimeEntry(1, activeRecommendEntryKey);
}}
onRestartLevel={() => {
void restartPuzzleCurrentLevel();
@@ -16266,9 +16259,9 @@ export function PlatformEntryFlowShellImpl({
squareHoleRun,
submitBigFishInput,
submitVisualNovelRuntimeAction,
advancePuzzleLevel,
dragPuzzlePiece,
restartPuzzleCurrentLevel,
selectAdjacentRecommendRuntimeEntry,
setSquareHoleError,
swapPuzzlePiecesInRun,
syncPuzzleRuntimeTimeout,