合并最新主分支
Project CI / Repository checks (pull_request) Successful in 1m15s
Project CI / Frontend tests (pull_request) Failing after 2m3s
Project CI / Backend tests (pull_request) Successful in 3m52s
Project CI / Native shell tests (pull_request) Successful in 13m14s

同步主线持续集成修复、历史 UI 规范兼容与进程会话终止清理
This commit is contained in:
2026-08-08 23:56:43 +08:00
4 changed files with 59 additions and 6 deletions
@@ -1435,11 +1435,13 @@ fn finalize_live_process_session(
output.needs_reconciliation = true;
}
let needs_reconciliation = output.needs_reconciliation;
live.output_changed.notify_all();
drop(output);
// 只有 live registry 已收束后才能发布可信终态。等待 `output_changed` 的调用方
// 可能立即执行 run 级取消清理,而 registry 中的任何 live 条目都会被视为未完成会话。
if record_persisted && !needs_reconciliation {
if let Ok(mut registry) = process_session_registry().lock() {
registry.sessions.remove(&live.process_id);
}
}
live.output_changed.notify_all();
drop(output);
}
@@ -6650,6 +6650,7 @@ async fn resolve_editor_pixel_art_source_for_owner(
)?;
let generation_input_reference = if let Some(source_resource) = source_resource {
Some(json!({
"id": "source",
"title": "原图",
"label": source_resource
.label
@@ -2241,9 +2241,20 @@ describe('ImageCanvasEditorView generation integration', () => {
projectId: 'editor-project-default',
assetFolderId: 'project',
generationInputs: {
version: 2,
action: 'spec.generate',
fields: [
{ title: '玩法设定', value: '消除类派对玩法' },
{ title: '美术风格', value: '糖果玻璃拟物' },
{ id: 'specType', title: '规范类型', value: 'icon' },
{
id: 'playSetting',
title: '玩法设定',
value: '消除类派对玩法',
},
{
id: 'artStyle',
title: '美术风格',
value: '糖果玻璃拟物',
},
],
references: [],
},
@@ -3165,9 +3176,16 @@ describe('ImageCanvasEditorView generation integration', () => {
projectId: 'editor-project-default',
assetFolderId: 'project',
generationInputs: {
version: 2,
action: 'spec.generate',
fields: [
{ title: '玩法设定', value: '背包整理玩法' },
{ title: '美术风格', value: '清爽卡通' },
{ id: 'specType', title: '规范类型', value: 'icon' },
{
id: 'playSetting',
title: '玩法设定',
value: '背包整理玩法',
},
{ id: 'artStyle', title: '美术风格', value: '清爽卡通' },
],
references: [],
},
@@ -1206,6 +1206,38 @@ describe('ImageCanvasGenerationDialogModel', () => {
});
});
it('maps legacy ui spec.generate inputs to the unified icon spec composer', () => {
expect(
createSameSourceGenerationDialogDraft({
sourceLayer: createLayer({
sourceType: 'generated',
assetKind: 'icon-spec',
generationInputs: {
version: 2,
action: 'spec.generate',
fields: [
{ id: 'specType', title: '规范类型', value: 'ui' },
{ id: 'playSetting', title: '玩法设定', value: '消除玩法' },
{ id: 'artStyle', title: '美术风格', value: '糖果玻璃' },
],
references: [],
},
}),
availableLayers: [],
canvasSize: { width: 960, height: 720 },
viewport: { x: 0, y: 0, scale: 1 },
mode: 'redraw',
}),
).toMatchObject({
mode: 'spec',
specType: 'icon',
specValues: {
playSetting: '消除玩法',
artStyle: '糖果玻璃',
},
});
});
it('restores the narrowly scoped legacy scene recipe into the scene composer', () => {
expect(
createSameSourceGenerationDialogDraft({