@allbluecn/web-app 0.19.4 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/package.json +35 -37
- package/public/fonts/Trap-font/Trap-Black.otf +0 -0
- package/public/fonts/Trap-font/Trap-Bold.otf +0 -0
- package/public/fonts/Trap-font/Trap-ExtraBold.otf +0 -0
- package/public/fonts/Trap-font/Trap-Light.otf +0 -0
- package/public/fonts/Trap-font/Trap-Medium.otf +0 -0
- package/public/fonts/Trap-font/Trap-Regular.otf +0 -0
- package/public/fonts/Trap-font/Trap-SemiBold.otf +0 -0
- package/public/fonts/buttersans-Rounded.otf +0 -0
- package/src/components/bug/__tests__/board-subgroups.test.tsx +1 -1
- package/src/components/bug/__tests__/board-view.test.tsx +1 -1
- package/src/components/bug/__tests__/comment-reactions.test.tsx +1 -1
- package/src/components/bug/__tests__/create-bug-dialog.test.tsx +2 -2
- package/src/components/bug/__tests__/filters-compat.test.tsx +1 -1
- package/src/components/bug/__tests__/fix-request-race.test.tsx +1 -1
- package/src/components/bug/__tests__/peek-modes.test.tsx +1 -1
- package/src/components/bug/__tests__/use-paged-bug-groups.test.tsx +1 -1
- package/src/components/bug/__tests__/view-type.test.tsx +1 -1
- package/src/components/bug/bug-list-view.tsx +2 -2
- package/src/components/bug/bug-toolbar.tsx +1 -1
- package/src/components/bug/create-bug-dialog.tsx +3 -3
- package/src/components/bug/detail/__tests__/activity-timeline.test.tsx +1 -1
- package/src/components/bug/detail/__tests__/bug-detail-collab.test.tsx +1 -1
- package/src/components/bug/detail/__tests__/repro-report-card.test.tsx +1 -1
- package/src/components/bug/detail/activity-tabs.tsx +1 -1
- package/src/components/bug/detail/activity-timeline.tsx +1 -1
- package/src/components/bug/detail/bug-detail-body.tsx +3 -3
- package/src/components/bug/detail/comment-input.tsx +1 -1
- package/src/components/bug/detail/comment-item.tsx +1 -1
- package/src/components/bug/detail/comment-reactions.tsx +1 -1
- package/src/components/bug/detail/comment-thread.tsx +1 -1
- package/src/components/bug/detail/props-section.tsx +2 -2
- package/src/components/bug/detail/repro-report-card.tsx +1 -1
- package/src/components/bug/detail/reproduce-steps-view.tsx +1 -1
- package/src/components/bug/display/use-paged-bug-groups.ts +2 -2
- package/src/components/bug/filters/field-configs.tsx +1 -1
- package/src/components/bug/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/bug/peek-panel.tsx +2 -2
- package/src/components/bug/reproduce-steps-editor.tsx +1 -1
- package/src/components/bug/story-bugs-panel.tsx +2 -1
- package/src/components/bug/views/board-view.tsx +2 -2
- package/src/components/bug/views/bug-list/batch-toolbar.tsx +1 -1
- package/src/components/bug/views/bug-list/group.tsx +1 -1
- package/src/components/bug/views/bug-list/index.tsx +1 -1
- package/src/components/bug/views/bug-list/inline-bug-creator.tsx +1 -1
- package/src/components/bug/views/bug-list/row.tsx +2 -2
- package/src/components/bug/views/create-view-dialog.tsx +1 -1
- package/src/components/iteration/iteration-progress-bar.tsx +2 -2
- package/src/components/knowledge/public/legal-compliance-editor.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-knowledge.tsx +1 -1
- package/src/components/layout/sidebar-03/nav-workspace.tsx +1 -1
- package/src/components/shared-kit/list-kit/kanban/__tests__/instance-key.test.ts +1 -1
- package/src/components/story/__tests__/constants.test.ts +1 -1
- package/src/components/story/__tests__/dependency-type-badge.test.ts +1 -1
- package/src/components/story/__tests__/peek-panel-patch-sync.test.tsx +1 -1
- package/src/components/story/__tests__/story-list-view-peek-sync.test.tsx +1 -1
- package/src/components/story/ai/story-ai-panel.tsx +1 -1
- package/src/components/story/ai/story-ai-preview-list.tsx +2 -2
- package/src/components/story/columns.tsx +2 -2
- package/src/components/story/create-story-dialog.tsx +4 -4
- package/src/components/story/detail/__tests__/activity-timeline.test.tsx +1 -1
- package/src/components/story/detail/__tests__/associated-attachments-panel.test.tsx +1 -1
- package/src/components/story/detail/__tests__/story-collab.test.tsx +1 -1
- package/src/components/story/detail/activity-tabs.tsx +1 -1
- package/src/components/story/detail/activity-timeline.tsx +2 -2
- package/src/components/story/detail/comment-input.tsx +1 -1
- package/src/components/story/detail/comment-item.tsx +1 -1
- package/src/components/story/detail/comment-thread.tsx +1 -1
- package/src/components/story/detail/reaction-bar.tsx +1 -1
- package/src/components/story/detail/story-detail-body.tsx +4 -4
- package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +2 -2
- package/src/components/story/detail/story-detail-toolbar/children.tsx +1 -1
- package/src/components/story/detail/story-detail-toolbar/dependency-panel.tsx +3 -3
- package/src/components/story/detail/story-detail-toolbar/index.tsx +8 -8
- package/src/components/story/detail/story-detail-toolbar/related-test-cases.tsx +2 -2
- package/src/components/story/detail/story-properties.tsx +2 -2
- package/src/components/story/display/__tests__/flatten-story-groups.test.ts +1 -1
- package/src/components/story/display/__tests__/group-fields.test.ts +1 -1
- package/src/components/story/display/__tests__/group-resolver.test.ts +2 -2
- package/src/components/story/display/__tests__/order-resolver.test.ts +1 -1
- package/src/components/story/display/__tests__/use-grouped-stories.test.ts +1 -1
- package/src/components/story/display/__tests__/use-paged-story-groups.test.ts +1 -1
- package/src/components/story/display/flatten-story-groups.ts +1 -1
- package/src/components/story/display/group-fields.ts +2 -2
- package/src/components/story/display/group-resolver.tsx +2 -2
- package/src/components/story/display/order-resolver.ts +2 -2
- package/src/components/story/display/types.ts +1 -1
- package/src/components/story/display/use-grouped-stories.ts +1 -1
- package/src/components/story/display/use-paged-story-groups.ts +2 -2
- package/src/components/story/entity-overlay.ts +24 -0
- package/src/components/story/filters/field-configs.tsx +2 -2
- package/src/components/story/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/story/inline-editors/dependency-type-select.tsx +1 -1
- package/src/components/story/inline-editors/parent-story-editor.tsx +2 -2
- package/src/components/story/inline-editors/priority-editor.tsx +2 -2
- package/src/components/story/inline-editors/state-editor.tsx +2 -2
- package/src/components/story/inline-editors/story-select-dialog.tsx +2 -2
- package/src/components/story/peek-panel.tsx +3 -3
- package/src/components/story/priority-icon.tsx +2 -2
- package/src/components/story/relations/__tests__/attachment-manage-dialog.test.tsx +1 -1
- package/src/components/story/relations/__tests__/design-select-dialog.test.tsx +1 -1
- package/src/components/story/relations/__tests__/knowledge-select-dialog.test.tsx +1 -1
- package/src/components/story/relations/__tests__/link-manage-dialog.test.tsx +1 -1
- package/src/components/story/relations/attachment-manage-dialog.tsx +4 -4
- package/src/components/story/relations/design-select-dialog.tsx +2 -2
- package/src/components/story/relations/knowledge-select-dialog.tsx +2 -2
- package/src/components/story/relations/link-manage-dialog.tsx +2 -2
- package/src/components/story/relations/story-ref-row.tsx +3 -3
- package/src/components/story/story-list-table.tsx +1 -1
- package/src/components/story/story-list-view.tsx +1 -1
- package/src/components/story/story-toolbar.tsx +1 -1
- package/src/components/story/views/__tests__/calendar-view.test.tsx +1 -1
- package/src/components/story/views/__tests__/kanban-drop-subgroup.test.ts +1 -1
- package/src/components/story/views/__tests__/kanban-peek-sync.test.tsx +2 -2
- package/src/components/story/views/__tests__/kanban-view-membership-sync.test.tsx +1 -1
- package/src/components/story/views/__tests__/timeline-view.test.tsx +1 -1
- package/src/components/story/views/calendar/__tests__/mappers.test.ts +1 -1
- package/src/components/story/views/calendar/mappers.ts +1 -1
- package/src/components/story/views/calendar-view.tsx +1 -1
- package/src/components/story/views/create-view-dialog.tsx +1 -1
- package/src/components/story/views/kanban-view.tsx +2 -2
- package/src/components/story/views/story-list/batch-preview-dialog.tsx +2 -2
- package/src/components/story/views/story-list/batch-toolbar.tsx +2 -2
- package/src/components/story/views/story-list/group.tsx +2 -2
- package/src/components/story/views/story-list/index.tsx +2 -2
- package/src/components/story/views/story-list/inline-story-creator.tsx +2 -2
- package/src/components/story/views/story-list/row.tsx +2 -2
- package/src/components/story/views/story-list/use-flat-rows.ts +1 -1
- package/src/components/story/views/timeline/__tests__/mappers.test.ts +2 -2
- package/src/components/story/views/timeline/mappers.ts +2 -2
- package/src/components/story/views/timeline/use-date-commit.ts +1 -1
- package/src/components/story/views/timeline-view.tsx +2 -2
- package/src/components/testcase/__tests__/case-row.test.tsx +1 -1
- package/src/components/testcase/__tests__/create-dialog-scope.test.tsx +1 -1
- package/src/components/testcase/__tests__/display-options.test.tsx +1 -1
- package/src/components/testcase/__tests__/export-entry.test.tsx +1 -1
- package/src/components/testcase/__tests__/list-view.test.tsx +1 -1
- package/src/components/testcase/__tests__/step-editor.test.tsx +1 -1
- package/src/components/testcase/__tests__/toolbar.test.tsx +1 -1
- package/src/components/testcase/create-testcase-dialog.tsx +1 -1
- package/src/components/testcase/detail/case-detail-body.tsx +1 -1
- package/src/components/testcase/detail/properties.tsx +1 -1
- package/src/components/testcase/display/display-dropdown.tsx +2 -2
- package/src/components/testcase/display/use-testcase-display-options.ts +1 -1
- package/src/components/testcase/filters/field-configs.tsx +1 -1
- package/src/components/testcase/inline-editors/assignee-editor.tsx +1 -1
- package/src/components/testcase/list/case-row.tsx +1 -1
- package/src/components/testcase/list/grouped-list.tsx +1 -1
- package/src/components/testcase/list-view.tsx +2 -2
- package/src/components/testcase/runs/convert-bug-button.tsx +2 -2
- package/src/components/testcase/testcase-toolbar.tsx +2 -2
- package/src/components/testcase/views/batch-toolbar.tsx +1 -1
- package/src/components/testcase/views/board-view.tsx +2 -2
- package/src/lib/changelog/sdk-versions.ts +2 -2
- package/src/lib/collections/knowledge/knowledge-bases-collection.ts +2 -1
- package/src/lib/collections/query-keys.ts +18 -0
- package/src/lib/collections/reference/users-brief-collection.ts +2 -1
- package/src/lib/collections/reference/workspaces-collection.ts +2 -1
- package/src/lib/story/__tests__/activity-grouper.test.ts +1 -1
- package/src/lib/story/activity-grouper.ts +1 -1
- package/src/paraglide/.gitignore +3 -0
- package/src/paraglide/.prettierignore +3 -0
- package/src/paraglide/README.md +162 -0
- package/src/paraglide/messages/_index.js +88192 -0
- package/src/paraglide/messages/en.js +28230 -0
- package/src/paraglide/messages/zh.js +28228 -0
- package/src/paraglide/messages.js +4 -0
- package/src/paraglide/registry.js +46 -0
- package/src/paraglide/runtime.js +2311 -0
- package/src/paraglide/server.js +294 -0
- package/src/routes/_nav/bugs/$bugId/route.lazy.tsx +2 -2
- package/src/routes/_nav/projects/$projectId/iterations/$iterationId/route.lazy.tsx +1 -1
- package/src/routes/_nav/route.tsx +1 -2
- package/src/routes/_nav/stories/$storyId/route.lazy.tsx +2 -2
- package/src/routes/_nav/stories/$storyId/route.tsx +1 -1
- package/src/routes/api/design/prototype/__tests__/route.test.ts +4 -1
- package/src/server/__tests__/task-executor.test.ts +7 -0
- package/src/server/serverFns/__tests__/legal-code-canonical.test.ts +169 -0
- package/src/server/serverFns/__tests__/story-tree.test.ts +0 -1
- package/src/server/serverFns/__tests__/update-bug-guard.test.ts +1 -1
- package/src/server/serverFns/bug/__tests__/bug-comments.test.ts +1 -1
- package/src/server/serverFns/bug/__tests__/bug-groups.test.ts +1 -1
- package/src/server/serverFns/bug/bug-activities.ts +2 -2
- package/src/server/serverFns/bug/bug-comments.ts +3 -3
- package/src/server/serverFns/bug/bug-crud/detail-select.ts +1 -1
- package/src/server/serverFns/bug/bug-crud/detail.ts +2 -2
- package/src/server/serverFns/bug/bug-crud.ts +1 -1
- package/src/server/serverFns/bug/bug-group-query.ts +1 -1
- package/src/server/serverFns/bug/bug-groups.ts +2 -2
- package/src/server/serverFns/bug/bug-story-utils.ts +1 -1
- package/src/server/serverFns/iteration/iteration-crud.ts +1 -1
- package/src/server/serverFns/knowledge/public/legal/create.ts +3 -0
- package/src/server/serverFns/knowledge/public/legal/update.ts +8 -8
- package/src/server/serverFns/story/link-preview.ts +3 -2
- package/src/server/serverFns/story/story-children.ts +1 -1
- package/src/server/serverFns/story/story-comments.ts +1 -1
- package/src/server/serverFns/story/story-crud/bulk.ts +1 -1
- package/src/server/serverFns/story/story-crud.ts +1 -1
- package/src/server/serverFns/story/story-dependencies.ts +1 -1
- package/src/server/serverFns/story/story-groups.ts +1 -1
- package/src/server/serverFns/testcase/__tests__/testcase-groups.test.ts +1 -1
- package/src/server/serverFns/testcase/testcase-board.ts +1 -1
- package/src/server/serverFns/testcase/testcase-crud.ts +1 -1
- package/src/server/serverFns/testcase/testcase-display-options.ts +1 -1
- package/src/server/serverFns/testcase/testcase-filter-views.ts +1 -1
- package/src/server/serverFns/testcase/types.ts +1 -1
- package/src/server/story/types.ts +2 -2
- package/src/shared/bug/__tests__/constants.test.ts +1 -1
- package/src/{components → shared}/bug/types.ts +4 -3
- package/src/{components → shared}/story/constants.ts +1 -1
- package/src/{components → shared}/story/types.ts +1 -7
- /package/src/{components/testcase/display → shared/testcase}/field-configs.ts +0 -0
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
type BugSeverity,
|
|
32
32
|
type BugSource,
|
|
33
33
|
} from "@/shared/bug/constants";
|
|
34
|
-
import { BUG_LIST_SELECT, BUG_USER_BRIEF_SELECT, castBugUsers } from "@/
|
|
34
|
+
import { BUG_LIST_SELECT, BUG_USER_BRIEF_SELECT, castBugUsers } from "@/shared/bug/types";
|
|
35
35
|
import { buildListWhere } from "./bug-list-query";
|
|
36
36
|
import type { AvatarConfig } from "@allbluecn/kernel";
|
|
37
37
|
import type { Prisma } from "@allbluecn/database";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
type BugGroupKey,
|
|
26
26
|
type BugOrderKey,
|
|
27
27
|
} from "@/shared/bug/display-types";
|
|
28
|
-
import { BUG_LIST_SELECT, type BugListRow } from "@/
|
|
28
|
+
import { BUG_LIST_SELECT, type BugListRow } from "@/shared/bug/types";
|
|
29
29
|
|
|
30
30
|
/** prisma.groupBy 的 by 字段映射(assignee/createdBy 用外键列分组计数) */
|
|
31
31
|
export const BUG_GROUP_BY_FIELD: Record<Exclude<BugGroupKey, "none">, Prisma.BugScalarFieldEnum> = {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
BUG_ORDER_DIRECTIONS,
|
|
32
32
|
type BugGroupKey,
|
|
33
33
|
} from "@/shared/bug/display-types";
|
|
34
|
-
import { BUG_LIST_SELECT, castBugUsers } from "@/
|
|
34
|
+
import { BUG_LIST_SELECT, castBugUsers } from "@/shared/bug/types";
|
|
35
35
|
import { buildListWhere } from "./bug-list-query";
|
|
36
36
|
import {
|
|
37
37
|
BUG_GROUP_BY_FIELD,
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
fetchBugsInSeverityRankOrder,
|
|
45
45
|
sortBugGroupKeys,
|
|
46
46
|
} from "./bug-group-query";
|
|
47
|
-
import type { BugListItem } from "@/
|
|
47
|
+
import type { BugListItem } from "@/shared/bug/types";
|
|
48
48
|
import type { Prisma } from "@allbluecn/database";
|
|
49
49
|
|
|
50
50
|
const baseFilterSchema = {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// (历史数据可能是裸 HTML/markdown,见 lib/story/description-diff.ts 的兼容口径)。
|
|
21
21
|
// 转需求时把 Bug.reproduceSteps 序列化为「## 复现步骤」节追加到描述尾部,避免信息丢失
|
|
22
22
|
// (规格 §7:附件不复制,复现步骤必须随描述带走)。
|
|
23
|
-
import type { ReproduceSteps } from "@/
|
|
23
|
+
import type { ReproduceSteps } from "@/shared/bug/types";
|
|
24
24
|
|
|
25
25
|
function escapeHtml(text: string): string {
|
|
26
26
|
return text
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
iterationIdSchema,
|
|
29
29
|
type IterationSummary,
|
|
30
30
|
} from "./schemas";
|
|
31
|
-
import type { StoryState } from "@/
|
|
31
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
32
32
|
import { ensureUpcomingIterations, ensureAutoRollover } from "@/server/iteration/auto-schedule-internal";
|
|
33
33
|
import { resolveStoryScopeProjectId, resolveStoryScopeProjectIds } from "@/server/builtin-project";
|
|
34
34
|
import { assertIterationProjectMember, assertIterationProjectMembership as assertProjectMembership } from "@/server/iteration/permissions";
|
|
@@ -48,6 +48,9 @@ export const createLegalFn = createServerFn({ method: 'POST' })
|
|
|
48
48
|
data: {
|
|
49
49
|
canonicalId: legalCanonicalId({ title: data.title, code: data.code }),
|
|
50
50
|
title: data.title,
|
|
51
|
+
// S7:code 持久化(此前仅参与 canonicalId 计算)。空串归一 null,
|
|
52
|
+
// 与 update 侧口径一致,避免空串短路与 canonicalId 维度回退语义混淆
|
|
53
|
+
code: data.code?.trim() || null,
|
|
51
54
|
jurisdiction: data.jurisdiction,
|
|
52
55
|
region: data.region || null,
|
|
53
56
|
country: data.country || null,
|
|
@@ -54,16 +54,16 @@ export const updateLegalFn = createServerFn({ method: 'POST' })
|
|
|
54
54
|
if (!isOwner && !isAdmin) throw new Error('无权限')
|
|
55
55
|
|
|
56
56
|
const updateData: Prisma.LegalRegulationUncheckedUpdateInput = { ...rest }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
// S7(审计 2026-10-25):code 已持久化(迁移 20261028130000,存量行按
|
|
58
|
+
// canonicalId <> title 回填)。重算口径与 compliance 同款裁定——仅显式传
|
|
59
|
+
// code 时重算并落库:有 code 行身份=code,改标题不再从「code 维度」漂移到
|
|
60
|
+
// 「title 维度」;无 code 存量行保持创建时 key,分享/收藏关联(按
|
|
61
|
+
// canonicalId 匹配)一律不失联。
|
|
62
|
+
if (code !== undefined) {
|
|
63
|
+
updateData.code = code.trim() || null
|
|
64
64
|
updateData.canonicalId = legalCanonicalId({
|
|
65
65
|
title: data.title ?? existing.title,
|
|
66
|
-
code
|
|
66
|
+
code,
|
|
67
67
|
})
|
|
68
68
|
}
|
|
69
69
|
return prisma.legalRegulation.update({ where: { id }, data: updateData, select: { id: true } })
|
|
@@ -21,10 +21,11 @@ import { z } from "zod";
|
|
|
21
21
|
import { requireAuth } from "@/server/auth-helpers";
|
|
22
22
|
import { checkUserActionRateLimit } from "@/server/lib/rate-limit";
|
|
23
23
|
import { assertFetchableUrl } from "@/server/fetch-guard";
|
|
24
|
-
import { httpUrl } from "@/server/lib/validators";
|
|
25
24
|
|
|
26
25
|
const checkSchema = z.object({
|
|
27
|
-
|
|
26
|
+
// 语义校验由 handler 的 assertFetchableUrl 完成(非 http(s) 返回 embeddable:false,
|
|
27
|
+
// 与既有客户端契约一致);此处仅做语法校验
|
|
28
|
+
url: z.string().url(),
|
|
28
29
|
origin: z.string().url().optional(),
|
|
29
30
|
});
|
|
30
31
|
|
|
@@ -23,7 +23,7 @@ import { requireAuth } from "@/server/auth-helpers";
|
|
|
23
23
|
import { assertStoryProjectMember } from "@/server/story/permissions";
|
|
24
24
|
import { STORY_LIST_SELECT, castStoryUsers } from "@/server/story/types";
|
|
25
25
|
|
|
26
|
-
import type { StoryListItem } from "@/
|
|
26
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
27
27
|
|
|
28
28
|
const childrenSchema = z.object({ parentId: z.string() });
|
|
29
29
|
|
|
@@ -20,7 +20,7 @@ import { createServerFn } from "@tanstack/react-start";
|
|
|
20
20
|
import { getRequest } from "@tanstack/react-start/server";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
import { requireAuth } from "@/server/auth-helpers";
|
|
23
|
-
import type { CommentWithReplies, ReactionGroup } from "@/
|
|
23
|
+
import type { CommentWithReplies, ReactionGroup } from "@/shared/story/types";
|
|
24
24
|
import { USER_BRIEF_SELECT, castUserBrief, aggregateReactions } from "@/server/story/types";
|
|
25
25
|
import { assertStoryProjectMember, assertStoryProjectMembership as assertProjectMembership } from "@/server/story/permissions";
|
|
26
26
|
|
|
@@ -20,7 +20,7 @@ import { createServerFn } from "@tanstack/react-start";
|
|
|
20
20
|
import { getRequest } from "@tanstack/react-start/server";
|
|
21
21
|
import { z } from "zod";
|
|
22
22
|
import { requireAuth } from "@/server/auth-helpers";
|
|
23
|
-
import { STORY_STATES, STORY_PRIORITIES, type StoryState, type StoryPriority } from "@/
|
|
23
|
+
import { STORY_STATES, STORY_PRIORITIES, type StoryState, type StoryPriority } from "@/shared/story/constants";
|
|
24
24
|
import { toDateKeyUtc } from "@/server/story/date-key";
|
|
25
25
|
import type { Prisma } from "@allbluecn/database";
|
|
26
26
|
import { buildRoomName } from "@allbluecn/collab-core/rooms";
|
|
@@ -25,7 +25,7 @@ import { ensureBuiltinIndependentProject, resolveStoryScopeProjectIds } from "@/
|
|
|
25
25
|
import { validateAssignee } from "@/server/lib/validate-assignee";
|
|
26
26
|
import { withCollabGuard } from "@/server/collab/write-guard";
|
|
27
27
|
import { touchCollabSnapshot } from "@/server/collab/touch-snapshot";
|
|
28
|
-
import type { ActivityItem } from "@/
|
|
28
|
+
import type { ActivityItem } from "@/shared/story/types";
|
|
29
29
|
import { diffDescriptionBlocks } from "@/lib/story/description-diff";
|
|
30
30
|
import { USER_BRIEF_SELECT, STORY_LIST_SELECT, castStoryUsers, castUserBrief } from "@/server/story/types";
|
|
31
31
|
import { toDateKeyUtc } from "@/server/story/date-key";
|
|
@@ -22,7 +22,7 @@ import { z } from "zod";
|
|
|
22
22
|
import { requireAuth } from "@/server/auth-helpers";
|
|
23
23
|
import { resolveStoryScopeProjectIds } from "@/server/builtin-project";
|
|
24
24
|
import { STORY_LIST_SELECT, castStoryUsers, ACTIVITY_SELECT, toActivityItem } from "@/server/story/types";
|
|
25
|
-
import type { DependencyRow } from "@/
|
|
25
|
+
import type { DependencyRow } from "@/shared/story/types";
|
|
26
26
|
import { assertStoryProjectMember, assertStoriesProjectMember } from "@/server/story/permissions";
|
|
27
27
|
|
|
28
28
|
const edgeTypeSchema = z.enum(["BLOCKS", "STARTS_BEFORE", "FINISHES_BEFORE"]);
|
|
@@ -23,7 +23,7 @@ import { requireAuth } from "@/server/auth-helpers";
|
|
|
23
23
|
import { resolveStoryScopeProjectIds } from "@/server/builtin-project";
|
|
24
24
|
import { GROUP_KEYS, ORDER_KEYS, ORDER_DIRECTIONS, resolveOrderDir } from "@/shared/list-kit/display-values";
|
|
25
25
|
import type { GroupKey, OrderKey } from "@/shared/list-kit/display-types";
|
|
26
|
-
import { STORY_STATES, STORY_PRIORITIES, type StoryState, type StoryPriority } from "@/
|
|
26
|
+
import { STORY_STATES, STORY_PRIORITIES, type StoryState, type StoryPriority } from "@/shared/story/constants";
|
|
27
27
|
import { STORY_LIST_SELECT_LIGHT, castStoryUsersLight, type StoryListRowLight } from "@/server/story/types";
|
|
28
28
|
import { buildListWhere, buildGroupFilter } from "./story-list-query";
|
|
29
29
|
import type { Prisma } from "@allbluecn/database";
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
updateFilterViewFn,
|
|
95
95
|
deleteFilterViewFn,
|
|
96
96
|
} from "../testcase-filter-views";
|
|
97
|
-
import { TESTCASE_DISPLAY_OPTIONS_VIEW_NAME } from "@/
|
|
97
|
+
import { TESTCASE_DISPLAY_OPTIONS_VIEW_NAME } from "@/shared/testcase/field-configs";
|
|
98
98
|
|
|
99
99
|
const U = "u-1";
|
|
100
100
|
const P = "pr-1";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
TESTCASE_ORDER_DIRECTIONS,
|
|
36
36
|
TESTCASE_ORDER_FIELD_MAP,
|
|
37
37
|
TESTCASE_ORDER_KEYS,
|
|
38
|
-
} from "@/
|
|
38
|
+
} from "@/shared/testcase/field-configs";
|
|
39
39
|
import type { TestCaseSummary, TestCaseSteps } from "./types";
|
|
40
40
|
import type { TestCaseAutomation, TestCasePriority, TestCaseState, TestCaseType } from "./constants";
|
|
41
41
|
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
TESTCASE_ORDER_DIRECTIONS,
|
|
38
38
|
TESTCASE_ORDER_FIELD_MAP,
|
|
39
39
|
TESTCASE_ORDER_KEYS,
|
|
40
|
-
} from "@/
|
|
40
|
+
} from "@/shared/testcase/field-configs";
|
|
41
41
|
import { CreateTestCaseInputSchema, UpdateTestCaseInputSchema } from "./schemas";
|
|
42
42
|
import {
|
|
43
43
|
TEST_CASE_AUTOMATION_VALUES,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
type TestCaseOrderDirection,
|
|
42
42
|
type TestCaseOrderKey,
|
|
43
43
|
type TestCasePageSize,
|
|
44
|
-
} from "@/
|
|
44
|
+
} from "@/shared/testcase/field-configs";
|
|
45
45
|
import type { Prisma } from "@allbluecn/database";
|
|
46
46
|
|
|
47
47
|
function toJson<T>(value: T): Prisma.InputJsonValue {
|
|
@@ -28,7 +28,7 @@ import { getRequest } from "@tanstack/react-start/server";
|
|
|
28
28
|
import { z } from "zod";
|
|
29
29
|
import type { Prisma } from "@allbluecn/database";
|
|
30
30
|
import { requireAuth } from "@/server/auth-helpers";
|
|
31
|
-
import { TESTCASE_DISPLAY_OPTIONS_VIEW_NAME } from "@/
|
|
31
|
+
import { TESTCASE_DISPLAY_OPTIONS_VIEW_NAME } from "@/shared/testcase/field-configs";
|
|
32
32
|
|
|
33
33
|
// 显示选项保留行(任务 20,testcase-display-options.ts 落点)对视图清单
|
|
34
34
|
// 不可见、不可建/改(bug-views.ts NOT_RESERVED 同构收口)。
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
// 测试域共享 DTO 类型(纯类型模块,双端安全):列表/详情 serverFn 返回与客户端组件共用。
|
|
19
19
|
// 日期字段跨 JSON 边界一律 string(ISO),与 bug 列表 DTO castToISO 惯例一致。
|
|
20
|
-
import type { UserBrief } from "@/
|
|
20
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
21
21
|
import type { TestRunSummaryJson } from "@/server/testcase/run-summary";
|
|
22
22
|
import type {
|
|
23
23
|
TestCaseAutomation,
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
import type { Prisma } from "@allbluecn/database";
|
|
19
19
|
import { getPrisma } from "@allbluecn/database/get-prisma";
|
|
20
20
|
import type { AvatarConfig } from "@allbluecn/kernel";
|
|
21
|
-
import type { StoryState, StoryPriority } from "@/
|
|
21
|
+
import type { StoryState, StoryPriority } from "@/shared/story/constants";
|
|
22
22
|
import type {
|
|
23
23
|
UserBrief,
|
|
24
24
|
ReactionGroup,
|
|
25
25
|
ActivityItem,
|
|
26
|
-
} from "@/
|
|
26
|
+
} from "@/shared/story/types";
|
|
27
27
|
|
|
28
28
|
export const USER_BRIEF_SELECT = {
|
|
29
29
|
id: true,
|
|
@@ -15,12 +15,13 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
// BUG
|
|
19
|
-
//
|
|
18
|
+
// BUG 域类型 + Prisma select 常量(S45 服务端/UI 边界专项迁入 src/shared:
|
|
19
|
+
// serverFn 与 UI 共用 select 常量与 cast 函数)。Prisma 仅 type-only 导入
|
|
20
|
+
// (编译期擦除),运行时零依赖,客户端安全。
|
|
20
21
|
import type { Prisma } from "@allbluecn/database";
|
|
21
22
|
import type { AvatarConfig } from "@allbluecn/kernel";
|
|
22
23
|
import type { BugState, BugSeverity, BugSource } from "@/shared/bug/constants";
|
|
23
|
-
import type { ReactionGroup, UserBrief } from "@/
|
|
24
|
+
import type { ReactionGroup, UserBrief } from "@/shared/story/types";
|
|
24
25
|
|
|
25
26
|
/** 用户 brief select(与 serverFns/story USER_BRIEF_SELECT 字段一致,本地声明避免运行时依赖 server 层) */
|
|
26
27
|
export const BUG_USER_BRIEF_SELECT = {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { GitPullRequestArrow, CircleFadingArrowUp, Repeat, Repeat2, CalendarPlus2, Hash, MessageCircleCheck, RefreshCcwDot, CircleFadingPlus, CircleArrowUp, CircleArrowRight, CircleArrowDown, CircleSlash, CircleDashed, CircleCheckBig, LoaderCircle, CheckCircle2, XCircle, FilePenLine, FilePlus2, Flag, UserRound, CalendarCheck, Tags, TextInitial, ListTree, ArrowLeftRight, Link2, Paperclip, BookOpen, Unlink, Trash2, BookX, FileX, ArrowRightFromLine, ArrowLeftToLine, ArrowUpFromDot, ListChecks, Bug, type LucideIcon } from "lucide-react";
|
|
19
19
|
import { m } from '@/paraglide/messages.js';
|
|
20
|
-
import type { DependencyEdgeType, DependencyGroup } from "
|
|
20
|
+
import type { DependencyEdgeType, DependencyGroup } from "@/shared/story/types";
|
|
21
21
|
|
|
22
22
|
export type StoryState = "backlog" | "todo" | "in_progress" | "done" | "cancelled";
|
|
23
23
|
export type StoryPriority = "urgent" | "high" | "medium" | "low" | "none";
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
import type { StoryState, StoryPriority } from "
|
|
18
|
+
import type { StoryState, StoryPriority } from "@/shared/story/constants";
|
|
19
19
|
import type { AvatarConfig } from "@allbluecn/kernel";
|
|
20
20
|
|
|
21
21
|
export interface UserBrief {
|
|
@@ -212,9 +212,3 @@ export interface DependencyGroup {
|
|
|
212
212
|
dependents: DependencyRow[]; // 依赖此需求的(我领先,边 sourceId = 我)
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
// ====== Peek 面板内实体叠加层(用例/BUG 行的面板内打开) ======
|
|
216
|
-
// case 携带列表行数据 + 面板已加载的模块树(实体 peek 属性区解析用);
|
|
217
|
-
// bug 由实体 peek 面板按 id 自取详情。
|
|
218
|
-
export type StoryEntityOverlay =
|
|
219
|
-
| { kind: "case"; item: import("@/server/serverFns/testcase/types").TestCaseSummary; folders: import("@/components/testcase/folder-tree").FolderNodeDto[] }
|
|
220
|
-
| { kind: "bug"; id: string };
|
|
File without changes
|