@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.
Files changed (213) hide show
  1. package/LICENSE +661 -0
  2. package/package.json +35 -37
  3. package/public/fonts/Trap-font/Trap-Black.otf +0 -0
  4. package/public/fonts/Trap-font/Trap-Bold.otf +0 -0
  5. package/public/fonts/Trap-font/Trap-ExtraBold.otf +0 -0
  6. package/public/fonts/Trap-font/Trap-Light.otf +0 -0
  7. package/public/fonts/Trap-font/Trap-Medium.otf +0 -0
  8. package/public/fonts/Trap-font/Trap-Regular.otf +0 -0
  9. package/public/fonts/Trap-font/Trap-SemiBold.otf +0 -0
  10. package/public/fonts/buttersans-Rounded.otf +0 -0
  11. package/src/components/bug/__tests__/board-subgroups.test.tsx +1 -1
  12. package/src/components/bug/__tests__/board-view.test.tsx +1 -1
  13. package/src/components/bug/__tests__/comment-reactions.test.tsx +1 -1
  14. package/src/components/bug/__tests__/create-bug-dialog.test.tsx +2 -2
  15. package/src/components/bug/__tests__/filters-compat.test.tsx +1 -1
  16. package/src/components/bug/__tests__/fix-request-race.test.tsx +1 -1
  17. package/src/components/bug/__tests__/peek-modes.test.tsx +1 -1
  18. package/src/components/bug/__tests__/use-paged-bug-groups.test.tsx +1 -1
  19. package/src/components/bug/__tests__/view-type.test.tsx +1 -1
  20. package/src/components/bug/bug-list-view.tsx +2 -2
  21. package/src/components/bug/bug-toolbar.tsx +1 -1
  22. package/src/components/bug/create-bug-dialog.tsx +3 -3
  23. package/src/components/bug/detail/__tests__/activity-timeline.test.tsx +1 -1
  24. package/src/components/bug/detail/__tests__/bug-detail-collab.test.tsx +1 -1
  25. package/src/components/bug/detail/__tests__/repro-report-card.test.tsx +1 -1
  26. package/src/components/bug/detail/activity-tabs.tsx +1 -1
  27. package/src/components/bug/detail/activity-timeline.tsx +1 -1
  28. package/src/components/bug/detail/bug-detail-body.tsx +3 -3
  29. package/src/components/bug/detail/comment-input.tsx +1 -1
  30. package/src/components/bug/detail/comment-item.tsx +1 -1
  31. package/src/components/bug/detail/comment-reactions.tsx +1 -1
  32. package/src/components/bug/detail/comment-thread.tsx +1 -1
  33. package/src/components/bug/detail/props-section.tsx +2 -2
  34. package/src/components/bug/detail/repro-report-card.tsx +1 -1
  35. package/src/components/bug/detail/reproduce-steps-view.tsx +1 -1
  36. package/src/components/bug/display/use-paged-bug-groups.ts +2 -2
  37. package/src/components/bug/filters/field-configs.tsx +1 -1
  38. package/src/components/bug/inline-editors/assignee-editor.tsx +1 -1
  39. package/src/components/bug/peek-panel.tsx +2 -2
  40. package/src/components/bug/reproduce-steps-editor.tsx +1 -1
  41. package/src/components/bug/story-bugs-panel.tsx +2 -1
  42. package/src/components/bug/views/board-view.tsx +2 -2
  43. package/src/components/bug/views/bug-list/batch-toolbar.tsx +1 -1
  44. package/src/components/bug/views/bug-list/group.tsx +1 -1
  45. package/src/components/bug/views/bug-list/index.tsx +1 -1
  46. package/src/components/bug/views/bug-list/inline-bug-creator.tsx +1 -1
  47. package/src/components/bug/views/bug-list/row.tsx +2 -2
  48. package/src/components/bug/views/create-view-dialog.tsx +1 -1
  49. package/src/components/iteration/iteration-progress-bar.tsx +2 -2
  50. package/src/components/knowledge/public/legal-compliance-editor.tsx +1 -1
  51. package/src/components/layout/sidebar-03/nav-knowledge.tsx +1 -1
  52. package/src/components/layout/sidebar-03/nav-workspace.tsx +1 -1
  53. package/src/components/shared-kit/list-kit/kanban/__tests__/instance-key.test.ts +1 -1
  54. package/src/components/story/__tests__/constants.test.ts +1 -1
  55. package/src/components/story/__tests__/dependency-type-badge.test.ts +1 -1
  56. package/src/components/story/__tests__/peek-panel-patch-sync.test.tsx +1 -1
  57. package/src/components/story/__tests__/story-list-view-peek-sync.test.tsx +1 -1
  58. package/src/components/story/ai/story-ai-panel.tsx +1 -1
  59. package/src/components/story/ai/story-ai-preview-list.tsx +2 -2
  60. package/src/components/story/columns.tsx +2 -2
  61. package/src/components/story/create-story-dialog.tsx +4 -4
  62. package/src/components/story/detail/__tests__/activity-timeline.test.tsx +1 -1
  63. package/src/components/story/detail/__tests__/associated-attachments-panel.test.tsx +1 -1
  64. package/src/components/story/detail/__tests__/story-collab.test.tsx +1 -1
  65. package/src/components/story/detail/activity-tabs.tsx +1 -1
  66. package/src/components/story/detail/activity-timeline.tsx +2 -2
  67. package/src/components/story/detail/comment-input.tsx +1 -1
  68. package/src/components/story/detail/comment-item.tsx +1 -1
  69. package/src/components/story/detail/comment-thread.tsx +1 -1
  70. package/src/components/story/detail/reaction-bar.tsx +1 -1
  71. package/src/components/story/detail/story-detail-body.tsx +4 -4
  72. package/src/components/story/detail/story-detail-toolbar/associated-attachments-panel.tsx +2 -2
  73. package/src/components/story/detail/story-detail-toolbar/children.tsx +1 -1
  74. package/src/components/story/detail/story-detail-toolbar/dependency-panel.tsx +3 -3
  75. package/src/components/story/detail/story-detail-toolbar/index.tsx +8 -8
  76. package/src/components/story/detail/story-detail-toolbar/related-test-cases.tsx +2 -2
  77. package/src/components/story/detail/story-properties.tsx +2 -2
  78. package/src/components/story/display/__tests__/flatten-story-groups.test.ts +1 -1
  79. package/src/components/story/display/__tests__/group-fields.test.ts +1 -1
  80. package/src/components/story/display/__tests__/group-resolver.test.ts +2 -2
  81. package/src/components/story/display/__tests__/order-resolver.test.ts +1 -1
  82. package/src/components/story/display/__tests__/use-grouped-stories.test.ts +1 -1
  83. package/src/components/story/display/__tests__/use-paged-story-groups.test.ts +1 -1
  84. package/src/components/story/display/flatten-story-groups.ts +1 -1
  85. package/src/components/story/display/group-fields.ts +2 -2
  86. package/src/components/story/display/group-resolver.tsx +2 -2
  87. package/src/components/story/display/order-resolver.ts +2 -2
  88. package/src/components/story/display/types.ts +1 -1
  89. package/src/components/story/display/use-grouped-stories.ts +1 -1
  90. package/src/components/story/display/use-paged-story-groups.ts +2 -2
  91. package/src/components/story/entity-overlay.ts +24 -0
  92. package/src/components/story/filters/field-configs.tsx +2 -2
  93. package/src/components/story/inline-editors/assignee-editor.tsx +1 -1
  94. package/src/components/story/inline-editors/dependency-type-select.tsx +1 -1
  95. package/src/components/story/inline-editors/parent-story-editor.tsx +2 -2
  96. package/src/components/story/inline-editors/priority-editor.tsx +2 -2
  97. package/src/components/story/inline-editors/state-editor.tsx +2 -2
  98. package/src/components/story/inline-editors/story-select-dialog.tsx +2 -2
  99. package/src/components/story/peek-panel.tsx +3 -3
  100. package/src/components/story/priority-icon.tsx +2 -2
  101. package/src/components/story/relations/__tests__/attachment-manage-dialog.test.tsx +1 -1
  102. package/src/components/story/relations/__tests__/design-select-dialog.test.tsx +1 -1
  103. package/src/components/story/relations/__tests__/knowledge-select-dialog.test.tsx +1 -1
  104. package/src/components/story/relations/__tests__/link-manage-dialog.test.tsx +1 -1
  105. package/src/components/story/relations/attachment-manage-dialog.tsx +4 -4
  106. package/src/components/story/relations/design-select-dialog.tsx +2 -2
  107. package/src/components/story/relations/knowledge-select-dialog.tsx +2 -2
  108. package/src/components/story/relations/link-manage-dialog.tsx +2 -2
  109. package/src/components/story/relations/story-ref-row.tsx +3 -3
  110. package/src/components/story/story-list-table.tsx +1 -1
  111. package/src/components/story/story-list-view.tsx +1 -1
  112. package/src/components/story/story-toolbar.tsx +1 -1
  113. package/src/components/story/views/__tests__/calendar-view.test.tsx +1 -1
  114. package/src/components/story/views/__tests__/kanban-drop-subgroup.test.ts +1 -1
  115. package/src/components/story/views/__tests__/kanban-peek-sync.test.tsx +2 -2
  116. package/src/components/story/views/__tests__/kanban-view-membership-sync.test.tsx +1 -1
  117. package/src/components/story/views/__tests__/timeline-view.test.tsx +1 -1
  118. package/src/components/story/views/calendar/__tests__/mappers.test.ts +1 -1
  119. package/src/components/story/views/calendar/mappers.ts +1 -1
  120. package/src/components/story/views/calendar-view.tsx +1 -1
  121. package/src/components/story/views/create-view-dialog.tsx +1 -1
  122. package/src/components/story/views/kanban-view.tsx +2 -2
  123. package/src/components/story/views/story-list/batch-preview-dialog.tsx +2 -2
  124. package/src/components/story/views/story-list/batch-toolbar.tsx +2 -2
  125. package/src/components/story/views/story-list/group.tsx +2 -2
  126. package/src/components/story/views/story-list/index.tsx +2 -2
  127. package/src/components/story/views/story-list/inline-story-creator.tsx +2 -2
  128. package/src/components/story/views/story-list/row.tsx +2 -2
  129. package/src/components/story/views/story-list/use-flat-rows.ts +1 -1
  130. package/src/components/story/views/timeline/__tests__/mappers.test.ts +2 -2
  131. package/src/components/story/views/timeline/mappers.ts +2 -2
  132. package/src/components/story/views/timeline/use-date-commit.ts +1 -1
  133. package/src/components/story/views/timeline-view.tsx +2 -2
  134. package/src/components/testcase/__tests__/case-row.test.tsx +1 -1
  135. package/src/components/testcase/__tests__/create-dialog-scope.test.tsx +1 -1
  136. package/src/components/testcase/__tests__/display-options.test.tsx +1 -1
  137. package/src/components/testcase/__tests__/export-entry.test.tsx +1 -1
  138. package/src/components/testcase/__tests__/list-view.test.tsx +1 -1
  139. package/src/components/testcase/__tests__/step-editor.test.tsx +1 -1
  140. package/src/components/testcase/__tests__/toolbar.test.tsx +1 -1
  141. package/src/components/testcase/create-testcase-dialog.tsx +1 -1
  142. package/src/components/testcase/detail/case-detail-body.tsx +1 -1
  143. package/src/components/testcase/detail/properties.tsx +1 -1
  144. package/src/components/testcase/display/display-dropdown.tsx +2 -2
  145. package/src/components/testcase/display/use-testcase-display-options.ts +1 -1
  146. package/src/components/testcase/filters/field-configs.tsx +1 -1
  147. package/src/components/testcase/inline-editors/assignee-editor.tsx +1 -1
  148. package/src/components/testcase/list/case-row.tsx +1 -1
  149. package/src/components/testcase/list/grouped-list.tsx +1 -1
  150. package/src/components/testcase/list-view.tsx +2 -2
  151. package/src/components/testcase/runs/convert-bug-button.tsx +2 -2
  152. package/src/components/testcase/testcase-toolbar.tsx +2 -2
  153. package/src/components/testcase/views/batch-toolbar.tsx +1 -1
  154. package/src/components/testcase/views/board-view.tsx +2 -2
  155. package/src/lib/changelog/sdk-versions.ts +2 -2
  156. package/src/lib/collections/knowledge/knowledge-bases-collection.ts +2 -1
  157. package/src/lib/collections/query-keys.ts +18 -0
  158. package/src/lib/collections/reference/users-brief-collection.ts +2 -1
  159. package/src/lib/collections/reference/workspaces-collection.ts +2 -1
  160. package/src/lib/story/__tests__/activity-grouper.test.ts +1 -1
  161. package/src/lib/story/activity-grouper.ts +1 -1
  162. package/src/paraglide/.gitignore +3 -0
  163. package/src/paraglide/.prettierignore +3 -0
  164. package/src/paraglide/README.md +162 -0
  165. package/src/paraglide/messages/_index.js +88192 -0
  166. package/src/paraglide/messages/en.js +28230 -0
  167. package/src/paraglide/messages/zh.js +28228 -0
  168. package/src/paraglide/messages.js +4 -0
  169. package/src/paraglide/registry.js +46 -0
  170. package/src/paraglide/runtime.js +2311 -0
  171. package/src/paraglide/server.js +294 -0
  172. package/src/routes/_nav/bugs/$bugId/route.lazy.tsx +2 -2
  173. package/src/routes/_nav/projects/$projectId/iterations/$iterationId/route.lazy.tsx +1 -1
  174. package/src/routes/_nav/route.tsx +1 -2
  175. package/src/routes/_nav/stories/$storyId/route.lazy.tsx +2 -2
  176. package/src/routes/_nav/stories/$storyId/route.tsx +1 -1
  177. package/src/routes/api/design/prototype/__tests__/route.test.ts +4 -1
  178. package/src/server/__tests__/task-executor.test.ts +7 -0
  179. package/src/server/serverFns/__tests__/legal-code-canonical.test.ts +169 -0
  180. package/src/server/serverFns/__tests__/story-tree.test.ts +0 -1
  181. package/src/server/serverFns/__tests__/update-bug-guard.test.ts +1 -1
  182. package/src/server/serverFns/bug/__tests__/bug-comments.test.ts +1 -1
  183. package/src/server/serverFns/bug/__tests__/bug-groups.test.ts +1 -1
  184. package/src/server/serverFns/bug/bug-activities.ts +2 -2
  185. package/src/server/serverFns/bug/bug-comments.ts +3 -3
  186. package/src/server/serverFns/bug/bug-crud/detail-select.ts +1 -1
  187. package/src/server/serverFns/bug/bug-crud/detail.ts +2 -2
  188. package/src/server/serverFns/bug/bug-crud.ts +1 -1
  189. package/src/server/serverFns/bug/bug-group-query.ts +1 -1
  190. package/src/server/serverFns/bug/bug-groups.ts +2 -2
  191. package/src/server/serverFns/bug/bug-story-utils.ts +1 -1
  192. package/src/server/serverFns/iteration/iteration-crud.ts +1 -1
  193. package/src/server/serverFns/knowledge/public/legal/create.ts +3 -0
  194. package/src/server/serverFns/knowledge/public/legal/update.ts +8 -8
  195. package/src/server/serverFns/story/link-preview.ts +3 -2
  196. package/src/server/serverFns/story/story-children.ts +1 -1
  197. package/src/server/serverFns/story/story-comments.ts +1 -1
  198. package/src/server/serverFns/story/story-crud/bulk.ts +1 -1
  199. package/src/server/serverFns/story/story-crud.ts +1 -1
  200. package/src/server/serverFns/story/story-dependencies.ts +1 -1
  201. package/src/server/serverFns/story/story-groups.ts +1 -1
  202. package/src/server/serverFns/testcase/__tests__/testcase-groups.test.ts +1 -1
  203. package/src/server/serverFns/testcase/testcase-board.ts +1 -1
  204. package/src/server/serverFns/testcase/testcase-crud.ts +1 -1
  205. package/src/server/serverFns/testcase/testcase-display-options.ts +1 -1
  206. package/src/server/serverFns/testcase/testcase-filter-views.ts +1 -1
  207. package/src/server/serverFns/testcase/types.ts +1 -1
  208. package/src/server/story/types.ts +2 -2
  209. package/src/shared/bug/__tests__/constants.test.ts +1 -1
  210. package/src/{components → shared}/bug/types.ts +4 -3
  211. package/src/{components → shared}/story/constants.ts +1 -1
  212. package/src/{components → shared}/story/types.ts +1 -7
  213. /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 "@/components/bug/types";
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 "@/components/bug/types";
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 "@/components/bug/types";
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 "@/components/bug/types";
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 "@/components/bug/types";
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 "@/components/story/constants";
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
- if (code !== undefined || data.title !== undefined) {
58
- // 审计 🟡(2026-10-25)核实:code 仅参与 canonicalId 计算,LegalRegulation
59
- // 无 code 列(create 同样不落库),故无 existing.code 可回退——与
60
- // dictionary/update.ts 的 industry 回退不可对齐属数据模型差异。
61
- // 仅改标题时 canonicalId 会从「code 维度」回落「title 维度」,分享关联
62
- // (按 canonicalId 匹配)可能错位;修复需为 LegalRegulation 增加 code 列
63
- // (schema 变更,见修复报告待决策项)。
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: code ?? undefined,
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
- url: httpUrl,
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 "@/components/story/types";
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 "@/components/story/types";
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 "@/components/story/constants";
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 "@/components/story/types";
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 "@/components/story/types";
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 "@/components/story/constants";
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 "@/components/testcase/display/field-configs";
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 "@/components/testcase/display/field-configs";
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 "@/components/testcase/display/field-configs";
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 "@/components/testcase/display/field-configs";
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 "@/components/testcase/display/field-configs";
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 "@/components/story/types";
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 "@/components/story/constants";
21
+ import type { StoryState, StoryPriority } from "@/shared/story/constants";
22
22
  import type {
23
23
  UserBrief,
24
24
  ReactionGroup,
25
25
  ActivityItem,
26
- } from "@/components/story/types";
26
+ } from "@/shared/story/types";
27
27
 
28
28
  export const USER_BRIEF_SELECT = {
29
29
  id: true,
@@ -51,7 +51,7 @@ import {
51
51
  BUG_LIST_SELECT,
52
52
  castBugUsers,
53
53
  type ReproduceSteps,
54
- } from "../../../components/bug/types";
54
+ } from "@/shared/bug/types";
55
55
 
56
56
  // 规格 §3.3 权威 action 全集(§3.1/§3.3 原文枚举 + 详情分区可产生的字段 diff)
57
57
  const SPEC_ACTIONS = [
@@ -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 域前端类型 + Prisma select 常量。Prisma 仅 type-only 导入(编译期擦除),
19
- // 运行时零依赖,客户端安全;禁止把本文件内容上移到 shared/bug(select 常量不进 shared 层)。
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 "@/components/story/types";
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 "./types";
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 "./constants";
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 };