fix: 保留工作流列表返回状态

- 记录页码、分类和搜索条件并同步到路由

- 从工作流设计页返回时恢复原列表位置
This commit is contained in:
2026-07-31 09:51:21 +08:00
parent 615092f4f7
commit c2ed5a24a3
8 changed files with 386 additions and 9 deletions

View File

@@ -31,6 +31,20 @@ describe('detail return navigation', () => {
expect(listSource).toContain('tab: activeTab.value');
});
it('returns workflow design to the originating list page and filters', () => {
const detailSource = readViewSource('ai/workflow/WorkflowDesign.vue');
const listSource = readViewSource('ai/workflow/WorkflowList.vue');
expect(detailSource).toContain(
'parseWorkflowDesignReturnState(route.query)',
);
expect(detailSource).toContain(
'query: buildWorkflowListRouteQuery(listState)',
);
expect(listSource).toContain('buildWorkflowDesignReturnQuery');
expect(listSource).toContain('getPageState');
});
it('returns plugin tool editing to its plugin tool list with a safe fallback', () => {
const editSource = readViewSource('ai/plugin/PluginToolEdit.vue');
const listSource = readViewSource('ai/plugin/PluginToolTable.vue');