feat(assets): 任务测试资产支持 DSL 搜索

任务详情「测试资产」接口/服务多时不好找。复用资产管理页的 DSL
搜索(字段自动补全 + 分页),搜索始终限定在当前任务范围内。

- 抽出共享组件 asset-dsl-search.tsx,资产页与任务页复用,UI/交互一致
- QueryDSL/CountDSL 增加 taskID 参数,taskID>0 时强制 AND $N = ANY(task_ids)
  并补 task 来源信息;即便 DSL 内写 task_id 也无法越出当前任务
- 任务资产 tab 接入搜索框:有 DSL 走 searchTaskAssets,否则走 taskAssets

Closes #107
This commit is contained in:
Autumn-27 committed 2026-09-11 11:59:46 -04:00
1 parent 1f258837f5
commit 557317491b
8 files changed
+491 -393

No files matched your search

+1 -1
View File
@@ -943,7 +943,7 @@ func TestAssetPaginationUsesStableIDTieBreaker(t *testing.T) {
t.Fatalf("task pagination order=%v want=%v", got, want)
}
if got := collect(func(limit, offset int) ([]*Asset, error) {
return assets.QueryDSL(marker, "root_domain", limit, offset)
return assets.QueryDSL(marker, "root_domain", 0, limit, offset)
}); !slices.Equal(got, want) {
t.Fatalf("DSL pagination order=%v want=%v", got, want)
}