Update spacetime-client bindings and frontend

Large update across server and web clients: regenerated/added many spacetime-client module bindings and input types (including new delete/work_delete input types and numerous procedure/reducer files), updates to server-rs API modules (bark_battle, jump_hop, wooden_fish, auth, module-runtime and shared contracts), and fixes in module-runtime behavior and domain logic. Frontend changes include new/updated components and tests (creative audio helpers, bark-battle/jump-hop/wooden-fish clients and views, unified generation pages, RPG entry views, and runtime shells), plus CSS and service updates. Documentation and operational notes updated (.hermes pitfalls and multiple PRD/docs) to cover daily-task refresh, banner asset fallback, recommend-key bug, and other platform behaviors. Tests and verification steps added/updated alongside these changes.
This commit is contained in:
2026-06-04 22:44:19 +08:00
parent 2678954627
commit 27b30f974b
326 changed files with 4374 additions and 2539 deletions

View File

@@ -126,6 +126,7 @@ import {
} from '../../services/authService';
import {
createBarkBattleDraft,
deleteBarkBattleWork,
listBarkBattleGallery,
listBarkBattleWorks,
publishBarkBattleWork,
@@ -365,6 +366,7 @@ import {
resolvePuzzleWorkCoverImageSrc,
} from '../custom-world-home/creationWorkShelf';
import {
buildPlatformPublicGalleryCardKey,
isBarkBattleGalleryEntry,
isBigFishGalleryEntry,
isEdutainmentGalleryEntry,
@@ -632,26 +634,7 @@ function getPlatformPublicGalleryEntryTime(entry: PlatformPublicGalleryCard) {
}
function getPlatformPublicGalleryEntryKey(entry: PlatformPublicGalleryCard) {
const kind = isBigFishGalleryEntry(entry)
? 'big-fish'
: isPuzzleGalleryEntry(entry)
? 'puzzle'
: isJumpHopGalleryEntry(entry)
? 'jump-hop'
: isWoodenFishGalleryEntry(entry)
? 'wooden-fish'
: isMatch3DGalleryEntry(entry)
? 'match3d'
: isSquareHoleGalleryEntry(entry)
? 'square-hole'
: isVisualNovelGalleryEntry(entry)
? 'visual-novel'
: isBarkBattleGalleryEntry(entry)
? 'bark-battle'
: isEdutainmentGalleryEntry(entry)
? `edutainment:${entry.templateId}`
: 'rpg';
return `${kind}:${entry.ownerUserId}:${entry.profileId}`;
return buildPlatformPublicGalleryCardKey(entry);
}
function getPlatformRecommendRuntimeKind(
@@ -12141,6 +12124,154 @@ export function PlatformEntryFlowShellImpl({
],
);
const handleDeleteJumpHopWork = useCallback(
(work: JumpHopWorkSummaryResponse) => {
if (deletingCreationWorkId) {
return;
}
const noticeKeys = collectDraftNoticeKeys('jump-hop', [
work.workId,
work.profileId,
work.sourceSessionId,
]);
requestDeleteCreationWork({
id: work.workId,
title: work.workTitle || '未命名跳一跳',
detail:
work.publicationStatus === 'published'
? '删除后会从你的作品列表和公开广场中移除。'
: '删除后会从你的作品列表中移除。',
run: () => {
setDeletingCreationWorkId(work.workId);
setJumpHopError(null);
void jumpHopClient
.deleteWork(work.profileId)
.then((response) => {
markDraftNoticeSeen(noticeKeys);
setJumpHopWorks(response.items);
void refreshJumpHopGallery();
})
.catch((error) => {
setJumpHopError(
resolvePuzzleErrorMessage(error, '删除跳一跳作品失败。'),
);
})
.finally(() => {
setDeletingCreationWorkId(null);
});
},
});
},
[
deletingCreationWorkId,
markDraftNoticeSeen,
refreshJumpHopGallery,
requestDeleteCreationWork,
resolvePuzzleErrorMessage,
setJumpHopError,
],
);
const handleDeleteWoodenFishWork = useCallback(
(work: WoodenFishWorkSummaryResponse) => {
if (deletingCreationWorkId) {
return;
}
const noticeKeys = collectDraftNoticeKeys('wooden-fish', [
work.workId,
work.profileId,
work.sourceSessionId,
]);
requestDeleteCreationWork({
id: work.workId,
title: work.workTitle || '未命名敲木鱼',
detail:
work.publicationStatus === 'published'
? '删除后会从你的作品列表和公开广场中移除。'
: '删除后会从你的作品列表中移除。',
run: () => {
setDeletingCreationWorkId(work.workId);
setWoodenFishError(null);
void woodenFishClient
.deleteWork(work.profileId)
.then((response) => {
markDraftNoticeSeen(noticeKeys);
setWoodenFishWorks(response.items);
void refreshWoodenFishGallery();
})
.catch((error) => {
setWoodenFishError(
resolvePuzzleErrorMessage(error, '删除敲木鱼作品失败。'),
);
})
.finally(() => {
setDeletingCreationWorkId(null);
});
},
});
},
[
deletingCreationWorkId,
markDraftNoticeSeen,
refreshWoodenFishGallery,
requestDeleteCreationWork,
resolvePuzzleErrorMessage,
setWoodenFishError,
],
);
const handleDeleteBarkBattleWork = useCallback(
(work: BarkBattleWorkSummary) => {
if (deletingCreationWorkId) {
return;
}
const noticeKeys = collectDraftNoticeKeys('bark-battle', [
work.workId,
work.draftId,
]);
requestDeleteCreationWork({
id: work.workId,
title: work.title || '未命名汪汪声浪',
detail:
work.status === 'published'
? '删除后会从你的作品列表和公开广场中移除。'
: '删除后会从你的作品列表中移除。',
run: () => {
setDeletingCreationWorkId(work.workId);
setBarkBattleError(null);
void deleteBarkBattleWork(work.workId)
.then((response) => {
markDraftNoticeSeen(noticeKeys);
setBarkBattleWorks(mergeBarkBattleWorksByWorkId(response.items));
void refreshBarkBattleGallery();
})
.catch((error) => {
setBarkBattleError(
resolveBarkBattleErrorMessage(error, '删除汪汪声浪作品失败。'),
);
})
.finally(() => {
setDeletingCreationWorkId(null);
});
},
});
},
[
deletingCreationWorkId,
markDraftNoticeSeen,
refreshBarkBattleGallery,
requestDeleteCreationWork,
resolveBarkBattleErrorMessage,
setBarkBattleError,
],
);
const handleDeleteVisualNovelWork = useCallback(
(work: VisualNovelWorkSummary) => {
if (deletingCreationWorkId) {
@@ -16244,14 +16375,22 @@ export function PlatformEntryFlowShellImpl({
}
: null
}
onDeleteJumpHop={null}
onDeleteJumpHop={
isJumpHopCreationVisible
? (item) => {
handleDeleteJumpHopWork(item);
}
: null
}
onOpenWoodenFishDetail={(item) => {
runProtectedAction(() => {
markCreationFlowReturnToDraftShelf();
void openWoodenFishDraft(item);
});
}}
onDeleteWoodenFish={null}
onDeleteWoodenFish={(item) => {
handleDeleteWoodenFishWork(item);
}}
match3dItems={match3dShelfItems}
onOpenMatch3DDetail={(item) => {
runProtectedAction(() => {
@@ -16315,6 +16454,9 @@ export function PlatformEntryFlowShellImpl({
openBarkBattleDraft(item);
});
}}
onDeleteBarkBattle={(item) => {
handleDeleteBarkBattleWork(item);
}}
visualNovelItems={visualNovelShelfItems}
onOpenVisualNovelDetail={(item) => {
runProtectedAction(() => {
@@ -16757,7 +16899,6 @@ export function PlatformEntryFlowShellImpl({
backLabel="返回创作中心"
settingActionLabel={null}
retryLabel="重新生成草稿"
settingTitle="当前玩法信息"
settingDescription={null}
progressTitle="大鱼吃小鱼草稿生成进度"
activeBadgeLabel="草稿生成中"
@@ -17163,7 +17304,6 @@ export function PlatformEntryFlowShellImpl({
backLabel="返回创作中心"
settingActionLabel={null}
retryLabel="重新生成草稿"
settingTitle="当前宝贝识物信息"
settingDescription={null}
progressTitle="宝贝识物草稿生成进度"
activeBadgeLabel="草稿生成中"
@@ -17363,7 +17503,6 @@ export function PlatformEntryFlowShellImpl({
backLabel="返回创作中心"
settingActionLabel={null}
retryLabel="重新生成图片"
settingTitle="当前方洞挑战"
settingDescription={null}
progressTitle="方洞挑战图片生成进度"
activeBadgeLabel="图片生成中"
@@ -18021,7 +18160,6 @@ export function PlatformEntryFlowShellImpl({
backLabel="返回创作中心"
settingActionLabel={null}
retryLabel="重新生成草稿"
settingTitle="当前视觉小说信息"
settingDescription={null}
progressTitle="视觉小说草稿生成进度"
activeBadgeLabel="草稿生成中"
@@ -18272,7 +18410,6 @@ export function PlatformEntryFlowShellImpl({
backLabel="返回创作中心"
settingActionLabel={null}
retryLabel="继续生成草稿"
settingTitle="当前世界信息"
settingDescription={null}
progressTitle="世界草稿生成进度"
activeBadgeLabel="草稿编译中"