@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
|
@@ -91,7 +91,7 @@ vi.mock("../detail/story-detail-body", () => ({
|
|
|
91
91
|
}));
|
|
92
92
|
|
|
93
93
|
import { StoryPeekPanel } from "../peek-panel";
|
|
94
|
-
import type { StoryDetail } from "
|
|
94
|
+
import type { StoryDetail } from "@/shared/story/types";
|
|
95
95
|
|
|
96
96
|
function detail(priority: StoryDetail["priority"]): StoryDetail {
|
|
97
97
|
return {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
22
22
|
import { act, render, waitFor } from "@testing-library/react";
|
|
23
23
|
import React from "react";
|
|
24
|
-
import type { StoryListItem, UserBrief } from "
|
|
24
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
25
25
|
|
|
26
26
|
const mocks = vi.hoisted(() => ({
|
|
27
27
|
onViewChange: undefined as undefined | ((v: string) => void),
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
import { parseJsonlBuffer, parseFinalBuffer } from "@/lib/ai/story-jsonl"
|
|
40
40
|
import { StoryAiPreviewList, type PreviewStoryItem } from "./story-ai-preview-list"
|
|
41
41
|
import { StorySearchPopover } from "@/components/story/search-popover"
|
|
42
|
-
import type { UserBrief } from "@/
|
|
42
|
+
import type { UserBrief } from "@/shared/story/types"
|
|
43
43
|
import { m } from "@/paraglide/messages.js";
|
|
44
44
|
|
|
45
45
|
type AiTab = "create" | "split" | "import"
|
|
@@ -26,8 +26,8 @@ import {
|
|
|
26
26
|
SelectTrigger,
|
|
27
27
|
SelectValue,
|
|
28
28
|
} from "@/components/ui/select"
|
|
29
|
-
import { STORY_PRIORITIES } from "@/
|
|
30
|
-
import type { UserBrief } from "@/
|
|
29
|
+
import { STORY_PRIORITIES } from "@/shared/story/constants"
|
|
30
|
+
import type { UserBrief } from "@/shared/story/types"
|
|
31
31
|
import { m } from "@/paraglide/messages.js";
|
|
32
32
|
|
|
33
33
|
const PRIORITY_LABELS: Record<string, () => string> = {
|
|
@@ -28,8 +28,8 @@ import {
|
|
|
28
28
|
import { Badge } from "@/components/ui/badge";
|
|
29
29
|
import { UserAvatar } from "@/components/shared-kit";
|
|
30
30
|
import { PriorityIcon } from "./priority-icon";
|
|
31
|
-
import { STATE_COLOR, PRIORITY_RANK } from "
|
|
32
|
-
import type { StoryListItem } from "
|
|
31
|
+
import { STATE_COLOR, PRIORITY_RANK } from "@/shared/story/constants";
|
|
32
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
33
33
|
import { m } from '@/paraglide/messages.js'
|
|
34
34
|
|
|
35
35
|
const STATE_LABEL_FNS: Record<string, () => string> = {
|
|
@@ -38,9 +38,9 @@ import {
|
|
|
38
38
|
|
|
39
39
|
import { createStoryFn } from "@/server/serverFns/story"
|
|
40
40
|
import { ensureBuiltinProjectFn } from "@/server/serverFns/project"
|
|
41
|
-
import type { StoryPriority, StoryState } from "
|
|
42
|
-
import type { UserBrief } from "
|
|
43
|
-
import { serializeStoryDescription } from "
|
|
41
|
+
import type { StoryPriority, StoryState } from "@/shared/story/constants"
|
|
42
|
+
import type { UserBrief } from "@/shared/story/types"
|
|
43
|
+
import { serializeStoryDescription } from "@/shared/story/types"
|
|
44
44
|
import { StateEditor, PriorityEditor, AssigneeEditor, DateEditor, LabelsEditor } from "./inline-editors"
|
|
45
45
|
import { createStorySchema } from "./story-create-schema"
|
|
46
46
|
|
|
@@ -62,7 +62,7 @@ interface CreateStoryDialogProps {
|
|
|
62
62
|
initialProjectId?: string
|
|
63
63
|
onSuccess?: (
|
|
64
64
|
story: { id: string; name: string; identifier?: string },
|
|
65
|
-
activities?: import("
|
|
65
|
+
activities?: import("@/shared/story/types").ActivityItem[],
|
|
66
66
|
) => void
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { describe, it, expect, vi } from "vitest";
|
|
19
19
|
import { render, screen, waitFor } from "@testing-library/react";
|
|
20
20
|
import { ActivityTimeline } from "../activity-timeline";
|
|
21
|
-
import type { ActivityItem, UserBrief } from "
|
|
21
|
+
import type { ActivityItem, UserBrief } from "@/shared/story/types";
|
|
22
22
|
|
|
23
23
|
vi.mock("@/server/serverFns/project", () => ({
|
|
24
24
|
listProjectsBriefFn: vi.fn().mockResolvedValue([]),
|
|
@@ -46,7 +46,7 @@ vi.mock("@tanstack/react-router", () => ({
|
|
|
46
46
|
}));
|
|
47
47
|
|
|
48
48
|
import { AssociatedAttachmentsPanel } from "../story-detail-toolbar/associated-attachments-panel";
|
|
49
|
-
import type { RelationsData } from "
|
|
49
|
+
import type { RelationsData } from "@/shared/story/types";
|
|
50
50
|
|
|
51
51
|
const data = {
|
|
52
52
|
links: [{ id: "l1", url: "https://a.com", title: "站点A", description: null }],
|
|
@@ -193,7 +193,7 @@ const notionLikeReady = import("@/components/tiptap/notion-like");
|
|
|
193
193
|
|
|
194
194
|
// 被测组件(mock 声明之后 import,保证 mock 生效)
|
|
195
195
|
import { StoryDetailBody } from "../story-detail-body";
|
|
196
|
-
import type { StoryDetail, UserBrief } from "
|
|
196
|
+
import type { StoryDetail, UserBrief } from "@/shared/story/types";
|
|
197
197
|
// 真实契约类型(vi.mock 只替换运行时,类型仍取自真实模块 → 替身受契约约束)
|
|
198
198
|
import type {
|
|
199
199
|
CollabAwareness,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
import { ActivityTimeline } from "./activity-timeline";
|
|
20
20
|
import { CommentThread } from "./comment-thread";
|
|
21
|
-
import type { CommentWithReplies, ActivityItem, UserBrief } from "
|
|
21
|
+
import type { CommentWithReplies, ActivityItem, UserBrief } from "@/shared/story/types";
|
|
22
22
|
import { m } from "@/paraglide/messages.js";
|
|
23
23
|
|
|
24
24
|
interface ActivityTabsProps {
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
PRIORITY_ICON,
|
|
29
29
|
type StoryState,
|
|
30
30
|
type StoryPriority,
|
|
31
|
-
} from "@/
|
|
31
|
+
} from "@/shared/story/constants";
|
|
32
32
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
33
33
|
import { listProjectsBriefFn } from "@/server/serverFns/project";
|
|
34
|
-
import type { ActivityItem, UserBrief } from "@/
|
|
34
|
+
import type { ActivityItem, UserBrief } from "@/shared/story/types";
|
|
35
35
|
import { groupActivities, type ActivityGroup } from "@/lib/story/activity-grouper";
|
|
36
36
|
import { ArrowUpFromDot, ArrowRight, ChevronDown, Dot, Sparkles, Layers, UserRound } from "lucide-react";
|
|
37
37
|
import { sanitize } from "@/lib/sanitize";
|
|
@@ -21,7 +21,7 @@ import { Button } from "@/components/ui/button";
|
|
|
21
21
|
import { Textarea } from "@/components/ui/textarea";
|
|
22
22
|
import { createCommentFn } from "@/server/serverFns/story";
|
|
23
23
|
import { toast } from "@/components/ui/toast";
|
|
24
|
-
import type { CommentWithReplies } from "
|
|
24
|
+
import type { CommentWithReplies } from "@/shared/story/types";
|
|
25
25
|
import { m } from "@/paraglide/messages.js";
|
|
26
26
|
|
|
27
27
|
interface CommentInputProps {
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "@/components/ui/dropdown-menu";
|
|
30
30
|
import { deleteCommentFn, updateCommentFn } from "@/server/serverFns/story";
|
|
31
31
|
import { toast } from "@/components/ui/toast";
|
|
32
|
-
import type { CommentWithReplies } from "
|
|
32
|
+
import type { CommentWithReplies } from "@/shared/story/types";
|
|
33
33
|
import { m } from "@/paraglide/messages.js";
|
|
34
34
|
|
|
35
35
|
interface CommentItemProps {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { CommentItem } from "./comment-item";
|
|
19
19
|
import { CommentInput } from "./comment-input";
|
|
20
|
-
import type { CommentWithReplies } from "
|
|
20
|
+
import type { CommentWithReplies } from "@/shared/story/types";
|
|
21
21
|
import { m } from '@/paraglide/messages.js'
|
|
22
22
|
import { formatTimestamp } from "@/lib/datetime";
|
|
23
23
|
|
|
@@ -19,7 +19,7 @@ import { Plus } from "lucide-react";
|
|
|
19
19
|
import { Button } from "@/components/ui/button";
|
|
20
20
|
import { cn } from "@/lib/utils";
|
|
21
21
|
import { EmojiPicker } from "@/components/shared-kit/comments/emoji-picker";
|
|
22
|
-
import type { ReactionGroup } from "@/
|
|
22
|
+
import type { ReactionGroup } from "@/shared/story/types";
|
|
23
23
|
import { m } from "@/paraglide/messages.js";
|
|
24
24
|
|
|
25
25
|
interface ReactionBarProps {
|
|
@@ -35,9 +35,9 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip
|
|
|
35
35
|
import { updateStoryFn, listStoryReactionsFn, toggleStoryReactionFn } from "@/server/serverFns/story";
|
|
36
36
|
import { formatTimestamp } from "@/lib/datetime";
|
|
37
37
|
import { toast } from "@/components/ui/toast";
|
|
38
|
-
import type { StoryDetail, UserBrief, CommentWithReplies, ActivityItem, ReactionGroup, RelationsData } from "
|
|
39
|
-
import { parseStoryDescription, serializeStoryDescription } from "
|
|
40
|
-
import type { StoryState } from "
|
|
38
|
+
import type { StoryDetail, UserBrief, CommentWithReplies, ActivityItem, ReactionGroup, RelationsData } from "@/shared/story/types";
|
|
39
|
+
import { parseStoryDescription, serializeStoryDescription } from "@/shared/story/types";
|
|
40
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
41
41
|
import type { StoryPatch } from "../display/group-fields";
|
|
42
42
|
import { ActivityTabs } from "./activity-tabs";
|
|
43
43
|
import { EmojiPicker } from "@/components/shared-kit/comments/emoji-picker";
|
|
@@ -233,7 +233,7 @@ export interface StoryDetailBodyProps {
|
|
|
233
233
|
/** 字段落库成功后的补丁回调(PeekPanel 回写列表/看板做乐观更新) */
|
|
234
234
|
onStoryPatch?: (storyId: string, patch: StoryPatch) => void;
|
|
235
235
|
onNavigateInPanel?: (targetId: string, targetIdentifier?: string, relationKind?: "child" | "dependency") => void;
|
|
236
|
-
onOpenEntity?: (entity: import("
|
|
236
|
+
onOpenEntity?: (entity: import("@/components/story/entity-overlay").StoryEntityOverlay) => void;
|
|
237
237
|
/** 用例/BUG 行的面板内叠加打开(peek 传入;缺省整页跳转) */
|
|
238
238
|
/** 内嵌面板导航面包屑(在面板内跳转时替代单层 identifier 显示) */
|
|
239
239
|
breadcrumbItems?: Array<{ identifier?: string; projectId?: string; label: string; onClick?: () => void }>;
|
|
@@ -49,7 +49,7 @@ import { sanitize } from "@/lib/sanitize";
|
|
|
49
49
|
import { formatFileSize, getFaviconUrl, getFileTypeIcon, extractLinkTitle, getMimeTypeLabel, getMimeTypeLabelKey, getMimeTypeLabelByKey, MIME_TYPE_LABEL_ORDER, type MimeTypeLabelKey } from "../../relations/format";
|
|
50
50
|
import { generalGroupLabel } from "../../relations/general-groups";
|
|
51
51
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
52
|
-
import type { AssociatedItem, RelationsData, StoryLinkItem, StoryAttachmentItem } from "
|
|
52
|
+
import type { AssociatedItem, RelationsData, StoryLinkItem, StoryAttachmentItem } from "@/shared/story/types";
|
|
53
53
|
import { m } from "@/paraglide/messages.js";
|
|
54
54
|
import { toastError } from "@/lib/toast-error";
|
|
55
55
|
import { useStoryPanelOpen } from "@/lib/hooks/use-story-panel-open";
|
|
@@ -61,7 +61,7 @@ export interface AssociatedAttachmentsPanelProps {
|
|
|
61
61
|
data: RelationsData;
|
|
62
62
|
onRefresh: (next: (prev: RelationsData) => RelationsData) => void;
|
|
63
63
|
onOpenDialog: (kind: AssociatedDialogKind, editLink?: StoryLinkItem, editAttachment?: StoryAttachmentItem) => void;
|
|
64
|
-
onAppendActivities?: (items: import("
|
|
64
|
+
onAppendActivities?: (items: import("@/shared/story/types").ActivityItem[]) => void;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// 记住列表/预览显示方式
|
|
@@ -47,7 +47,7 @@ import { VirtualGroupHeader } from "../../views/story-list/group";
|
|
|
47
47
|
import { DisplayOptionsBody } from "../../display/display-dropdown";
|
|
48
48
|
import { StoryRefRow } from "../../relations/story-ref-row";
|
|
49
49
|
import type { DisplayOptions } from "../../display/types";
|
|
50
|
-
import type { RelationsData, StoryListItem, UserBrief } from "
|
|
50
|
+
import type { RelationsData, StoryListItem, UserBrief } from "@/shared/story/types";
|
|
51
51
|
import type { StoryPatch } from "../../display/group-fields";
|
|
52
52
|
import { m } from "@/paraglide/messages.js";
|
|
53
53
|
import { toastError } from "@/lib/toast-error";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
bulkDeleteStoriesFn,
|
|
30
30
|
bulkUpdateStoriesFn,
|
|
31
31
|
} from "@/server/serverFns/story";
|
|
32
|
-
import { DEPENDENCY_TYPE_OPTIONS, toDependencyEdge, type DependencyTypeOption } from "
|
|
32
|
+
import { DEPENDENCY_TYPE_OPTIONS, toDependencyEdge, type DependencyTypeOption } from "@/shared/story/constants";
|
|
33
33
|
import { BatchToolbar } from "../../views/story-list/batch-toolbar";
|
|
34
34
|
import { useGroupedStories } from "../../display/use-grouped-stories";
|
|
35
35
|
import { VirtualGroupHeader } from "../../views/story-list/group";
|
|
@@ -37,7 +37,7 @@ import { DisplayOptionsBody } from "../../display/display-dropdown";
|
|
|
37
37
|
import { StoryRefRow } from "../../relations/story-ref-row";
|
|
38
38
|
import type { DisplayOptions, GroupNode } from "../../display/types";
|
|
39
39
|
import type { StoryPatch } from "../../display/group-fields";
|
|
40
|
-
import type { RelationsData, UserBrief, DependencyRow } from "
|
|
40
|
+
import type { RelationsData, UserBrief, DependencyRow } from "@/shared/story/types";
|
|
41
41
|
import { m } from "@/paraglide/messages.js";
|
|
42
42
|
import { toastError } from "@/lib/toast-error";
|
|
43
43
|
import {
|
|
@@ -77,7 +77,7 @@ export interface StoryDetailDependencyPanelProps {
|
|
|
77
77
|
projects?: { id: string; name: string; icon: string; displayId: string | null }[];
|
|
78
78
|
labels?: { id: string; name: string; color: string }[];
|
|
79
79
|
onOpenAdd: () => void;
|
|
80
|
-
onAppendActivities?: (items: import("
|
|
80
|
+
onAppendActivities?: (items: import("@/shared/story/types").ActivityItem[]) => void;
|
|
81
81
|
onNavigateInPanel?: (targetId: string, targetIdentifier?: string, relationKind?: "child" | "dependency") => void;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -50,9 +50,9 @@ import { getLinksFn, getAttachmentsFn, getLinkedDocsFn, getLinkedDesignsFn } fro
|
|
|
50
50
|
import { StorySelectDialog } from "../../inline-editors/story-select-dialog";
|
|
51
51
|
import { CreateStoryDialog } from "../../create-story-dialog";
|
|
52
52
|
import { addDependenciesFn, getDependenciesFn, listChildStoriesFn } from "@/server/serverFns/story";
|
|
53
|
-
import { DEPENDENCY_TYPE_OPTIONS, toDependencyEdge, type DependencyTypeOption } from "
|
|
53
|
+
import { DEPENDENCY_TYPE_OPTIONS, toDependencyEdge, type DependencyTypeOption } from "@/shared/story/constants";
|
|
54
54
|
import { useToolbarOverflow } from "../../ai/use-toolbar-overflow";
|
|
55
|
-
import type { RelationsData, UserBrief } from "
|
|
55
|
+
import type { RelationsData, UserBrief } from "@/shared/story/types";
|
|
56
56
|
import { m } from "@/paraglide/messages.js";
|
|
57
57
|
import { toastError } from "@/lib/toast-error";
|
|
58
58
|
|
|
@@ -72,13 +72,13 @@ interface StoryDetailToolbarProps {
|
|
|
72
72
|
data: RelationsData;
|
|
73
73
|
onRefresh: (next: (prev: RelationsData) => RelationsData) => void;
|
|
74
74
|
/** 关联类操作产生的活动即时追加到时间线 */
|
|
75
|
-
onAppendActivities?: (items: import("
|
|
75
|
+
onAppendActivities?: (items: import("@/shared/story/types").ActivityItem[]) => void;
|
|
76
76
|
users?: UserBrief[];
|
|
77
77
|
projects?: { id: string; name: string; icon: string; displayId: string | null }[];
|
|
78
78
|
labels?: { id: string; name: string; color: string }[];
|
|
79
79
|
onNavigateInPanel?: (targetId: string, targetIdentifier?: string, relationKind?: "child" | "dependency") => void;
|
|
80
80
|
/** 用例/BUG 行的面板内叠加打开(peek 传入;缺省整页跳转) */
|
|
81
|
-
onOpenEntity?: (entity: import("
|
|
81
|
+
onOpenEntity?: (entity: import("@/components/story/entity-overlay").StoryEntityOverlay) => void;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
export function StoryDetailToolbar({ storyId, storyIdentifier, projectId, storyUpdatedAt, data, onRefresh, onAppendActivities, users, projects, labels, onNavigateInPanel, onOpenEntity }: StoryDetailToolbarProps) {
|
|
@@ -86,8 +86,8 @@ export function StoryDetailToolbar({ storyId, storyIdentifier, projectId, storyU
|
|
|
86
86
|
const [dependencyDialogOpen, setDependencyDialogOpen] = React.useState(false);
|
|
87
87
|
const [assocDialogOpen, setAssocDialogOpen] = React.useState<AssociatedDialogKind | null>(null);
|
|
88
88
|
const [designDialog, setDesignDialog] = React.useState<{ open: boolean; mode: DesignSelectMode }>({ open: false, mode: "design" });
|
|
89
|
-
const [linkInitialEdit, setLinkInitialEdit] = React.useState<import("
|
|
90
|
-
const [editAttachment, setEditAttachment] = React.useState<import("
|
|
89
|
+
const [linkInitialEdit, setLinkInitialEdit] = React.useState<import("@/shared/story/types").StoryLinkItem | null>(null);
|
|
90
|
+
const [editAttachment, setEditAttachment] = React.useState<import("@/shared/story/types").StoryAttachmentItem | null>(null);
|
|
91
91
|
const [dependencyType, setDependencyType] = React.useState<DependencyTypeOption["key"] | undefined>(undefined);
|
|
92
92
|
// 关联测试用例提交成功 → bump 刷新测试用例面板(面板数据自持,refreshKey 变化重拉)
|
|
93
93
|
const [casesRefreshKey, setCasesRefreshKey] = React.useState(0);
|
|
@@ -226,7 +226,7 @@ export function StoryDetailToolbar({ storyId, storyIdentifier, projectId, storyU
|
|
|
226
226
|
|
|
227
227
|
const handleCreateSuccess = (
|
|
228
228
|
_story: { id: string; name: string; identifier?: string },
|
|
229
|
-
activities?: import("
|
|
229
|
+
activities?: import("@/shared/story/types").ActivityItem[],
|
|
230
230
|
) => {
|
|
231
231
|
setActionOpen(null);
|
|
232
232
|
refreshChildren();
|
|
@@ -273,7 +273,7 @@ export function StoryDetailToolbar({ storyId, storyIdentifier, projectId, storyU
|
|
|
273
273
|
setDesignDialog({ open: true, mode });
|
|
274
274
|
};
|
|
275
275
|
|
|
276
|
-
const handleOpenAssocDialog = (kind: AssociatedDialogKind, editLink?: import("
|
|
276
|
+
const handleOpenAssocDialog = (kind: AssociatedDialogKind, editLink?: import("@/shared/story/types").StoryLinkItem, editAttachmentItem?: import("@/shared/story/types").StoryAttachmentItem) => {
|
|
277
277
|
if (kind === "design") {
|
|
278
278
|
handleOpenDesignDialog("design");
|
|
279
279
|
return;
|
|
@@ -75,7 +75,7 @@ import { TEST_CASE_PRIORITY_META } from "@/components/testcase/constants";
|
|
|
75
75
|
import { extractTextColors } from "@/components/shared-kit/list-kit/level-badge";
|
|
76
76
|
import { GenerateTestCasesDialog } from "@/components/testcase/ai/generate-dialog";
|
|
77
77
|
import { SelectCasesDialog } from "@/components/testcase/detail/select-cases-dialog";
|
|
78
|
-
import type { UserBrief } from "
|
|
78
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
79
79
|
import { m } from "@/paraglide/messages.js";
|
|
80
80
|
import { toast } from "@/components/ui/toast";
|
|
81
81
|
import { toastError } from "@/lib/toast-error";
|
|
@@ -256,7 +256,7 @@ export function StoryDetailTestCases({
|
|
|
256
256
|
/** 需求最近更新时间:变化即重判 stale(编辑保存后即时刷新提示) */
|
|
257
257
|
storyUpdatedAt?: string | null;
|
|
258
258
|
/** peek 内叠加打开(传入时点击行在 peek 内打开,缺省整页跳转) */
|
|
259
|
-
onOpenEntity?: (entity: import("
|
|
259
|
+
onOpenEntity?: (entity: import("@/components/story/entity-overlay").StoryEntityOverlay) => void;
|
|
260
260
|
}) {
|
|
261
261
|
const [panelOpen, setPanelOpen] = useStoryPanelOpen(storyId, "testcases");
|
|
262
262
|
const navigate = useNavigate();
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
import { GitPullRequestArrow, Tag, CalendarRange } from "lucide-react";
|
|
19
19
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
|
20
20
|
import { ChevronDown } from "lucide-react";
|
|
21
|
-
import type { StoryState } from "
|
|
22
|
-
import type { ActivityItem } from "
|
|
21
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
22
|
+
import type { ActivityItem } from "@/shared/story/types";
|
|
23
23
|
import { ParentStoryEditor } from "../inline-editors/parent-story-editor";
|
|
24
24
|
import { LabelsEditor } from "../inline-editors/labels-editor";
|
|
25
25
|
import { IterationEditor } from "@/components/iteration/iteration-editor";
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
// 回归:peek prev/next 须按当前视图展示顺序(分组 → 子组)导航,而非平坦 stories.items。
|
|
19
19
|
import { describe, expect, it } from "vitest";
|
|
20
20
|
import { flattenStoryGroups } from "../flatten-story-groups";
|
|
21
|
-
import type { StoryListItem } from "
|
|
21
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
22
22
|
|
|
23
23
|
const s = (id: string) => ({ id } as StoryListItem);
|
|
24
24
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { describe, it, expect } from "vitest";
|
|
19
19
|
import { GROUP_FIELD, toGroupFieldPatch, applyStoryPatchToItem } from "../group-fields";
|
|
20
|
-
import type { StoryListItem, UserBrief } from "
|
|
20
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
21
21
|
|
|
22
22
|
describe("GROUP_FIELD", () => {
|
|
23
23
|
it("state 映射到 state", () => {
|
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
PRIORITY_COLUMN_TINT,
|
|
25
25
|
STATE_COLUMN_TINT,
|
|
26
26
|
} from "../group-resolver";
|
|
27
|
-
import { STATE_COLOR } from "
|
|
27
|
+
import { STATE_COLOR } from "@/shared/story/constants";
|
|
28
28
|
import { PRIORITY_COLOR } from "../../priority-icon";
|
|
29
|
-
import type { StoryListItem } from "
|
|
29
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
30
30
|
|
|
31
31
|
const makeStory = (over: Partial<StoryListItem> & { id: string }): StoryListItem => ({
|
|
32
32
|
identifier: "STR-1", name: "t", description: null, state: "todo", priority: "medium", archived: false,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { describe, it, expect } from "vitest";
|
|
19
19
|
import { applyOrder } from "../order-resolver";
|
|
20
|
-
import type { StoryListItem } from "
|
|
20
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
21
21
|
|
|
22
22
|
const makeStory = (over: Partial<StoryListItem>): StoryListItem => ({
|
|
23
23
|
id: "id1", identifier: "STR-1", name: "test", description: null,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import { describe, it, expect } from "vitest";
|
|
19
19
|
import { renderHook } from "@testing-library/react";
|
|
20
20
|
import { useGroupedStories } from "../use-grouped-stories";
|
|
21
|
-
import type { StoryListItem } from "
|
|
21
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
22
22
|
import { DEFAULT_DISPLAY_OPTIONS } from "../types";
|
|
23
23
|
|
|
24
24
|
const makeStory = (over: Partial<StoryListItem> & { id: string }): StoryListItem => ({
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
19
19
|
import { renderHook, waitFor, act } from "@testing-library/react";
|
|
20
|
-
import type { StoryListItem } from "
|
|
20
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
21
21
|
import { DEFAULT_DISPLAY_OPTIONS } from "../types";
|
|
22
22
|
import type { PagedStoriesArgs } from "../use-paged-story-groups";
|
|
23
23
|
|
|
@@ -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 { StoryListItem } from "
|
|
18
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
19
19
|
|
|
20
20
|
/** 顶层/子层分组都只需 items 与 subGroups(GroupNode / PagedGroupNode 结构兼容) */
|
|
21
21
|
type GroupLike = { items: StoryListItem[]; subGroups?: { items: StoryListItem[] }[] };
|
|
@@ -15,9 +15,9 @@
|
|
|
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 { GroupKey } from "./types";
|
|
20
|
-
import type { StoryListItem, UserBrief } from "
|
|
20
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
21
21
|
|
|
22
22
|
/** 列表行可更新的字段(与 updateStoryFn 入参保持一致),消除动态字段拼接的 as never。
|
|
23
23
|
* name 由详情面板(PeekPanel / 详情页)改动后回写视图,供列表/看板实时乐观更新。 */
|
|
@@ -19,9 +19,9 @@ import { Sprout, CircleUser } from "lucide-react";
|
|
|
19
19
|
import { UserAvatar } from "@/components/shared-kit";
|
|
20
20
|
import { LucideIconByName } from "@/components/shared-kit/icons/lucide-icon-picker/lucide-icon-by-name";
|
|
21
21
|
import { cn } from "@/lib/utils";
|
|
22
|
-
import { STORY_STATES, STATE_LABEL, STATE_COLOR, STATE_ICON, STORY_PRIORITIES, PRIORITY_LABEL, PRIORITY_ICON } from "
|
|
22
|
+
import { STORY_STATES, STATE_LABEL, STATE_COLOR, STATE_ICON, STORY_PRIORITIES, PRIORITY_LABEL, PRIORITY_ICON } from "@/shared/story/constants";
|
|
23
23
|
import { PRIORITY_COLOR } from "../priority-icon";
|
|
24
|
-
import type { StoryListItem } from "
|
|
24
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
25
25
|
import type { GroupContext, GroupKey, GroupNode } from "./types";
|
|
26
26
|
import { GROUP_FIELD } from "./group-fields";
|
|
27
27
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -15,9 +15,9 @@
|
|
|
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 { StoryListItem } from "
|
|
18
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
19
19
|
import type { OrderKey, OrderDirection } from "./types";
|
|
20
|
-
import { PRIORITY_RANK } from "
|
|
20
|
+
import { PRIORITY_RANK } from "@/shared/story/constants";
|
|
21
21
|
|
|
22
22
|
export function applyOrder(items: StoryListItem[], order: OrderKey, dir: OrderDirection = "asc"): StoryListItem[] {
|
|
23
23
|
const sorted = [...items];
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
// 与运行时常量为 story 规范口径落共享层 values.ts,此处仅透传保持消费方
|
|
21
21
|
// import 不变)。story 专属的 GroupNode/GroupContext 留本文件。
|
|
22
22
|
|
|
23
|
-
import type { StoryListItem, UserBrief } from "
|
|
23
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
24
24
|
|
|
25
25
|
export {
|
|
26
26
|
GROUP_KEYS,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { useMemo } from "react";
|
|
19
19
|
import type { DisplayOptions, GroupContext, GroupNode } from "./types";
|
|
20
|
-
import type { StoryListItem } from "
|
|
20
|
+
import type { StoryListItem } from "@/shared/story/types";
|
|
21
21
|
import { applyOrder } from "./order-resolver";
|
|
22
22
|
import { groupBy } from "./group-resolver";
|
|
23
23
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { useCallback, useMemo } from "react";
|
|
19
19
|
import { usePagedGroupsCore } from "@/hooks/use-paged-groups";
|
|
20
|
-
import type { StoryListItem, UserBrief } from "
|
|
20
|
+
import type { StoryListItem, UserBrief } from "@/shared/story/types";
|
|
21
21
|
import type { StoryFilters } from "../story-toolbar";
|
|
22
22
|
import type { FilterCondition } from "../filters";
|
|
23
23
|
import { serializeFilters } from "../filters";
|
|
@@ -25,7 +25,7 @@ import { listStoriesInGroupFn, listStoryGroupsFn, listAllGroupsItemsFn } from "@
|
|
|
25
25
|
import { resolveGroupLabel, resolveGroupIcon, resolveGroupColor } from "./group-resolver";
|
|
26
26
|
import type { DisplayOptions, GroupContext, GroupKey, GroupNode } from "./types";
|
|
27
27
|
import { applyStoryPatchToItem, type StoryPatch } from "./group-fields";
|
|
28
|
-
import { PRIORITY_RANK, STORY_PRIORITIES, STORY_STATES } from "
|
|
28
|
+
import { PRIORITY_RANK, STORY_PRIORITIES, STORY_STATES } from "@/shared/story/constants";
|
|
29
29
|
import { m } from "@/paraglide/messages.js";
|
|
30
30
|
|
|
31
31
|
/** 服务端按组分页的组节点:在 GroupNode 上标记 total/hasMore/loading */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
2
|
+
// AllBlue - 理想之海
|
|
3
|
+
// Copyright (C) 2026 AllBlue Contributors
|
|
4
|
+
//
|
|
5
|
+
// This program is free software: you can redistribute it and/or modify
|
|
6
|
+
// it under the terms of the GNU Affero General Public License as published by
|
|
7
|
+
// the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
// (at your option) any later version.
|
|
9
|
+
//
|
|
10
|
+
// This program is distributed in the hope that it will be useful,
|
|
11
|
+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
// GNU Affero General Public License for more details.
|
|
14
|
+
//
|
|
15
|
+
// You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
// Peek 面板内实体叠加层(用例/BUG 行的面板内打开)。纯 UI 状态形状,留在
|
|
19
|
+
// components 层:case 分支引用 server serverFns 类型与 folder-tree 组件类型
|
|
20
|
+
// (均 type-only,编译期擦除),不放 src/shared 以免 shared 反向依赖 server。
|
|
21
|
+
// bug 由实体 peek 面板按 id 自取详情。
|
|
22
|
+
export type StoryEntityOverlay =
|
|
23
|
+
| { kind: "case"; item: import("@/server/serverFns/testcase/types").TestCaseSummary; folders: import("@/components/testcase/folder-tree").FolderNodeDto[] }
|
|
24
|
+
| { kind: "bug"; id: string };
|
|
@@ -41,13 +41,13 @@ import type {
|
|
|
41
41
|
} from "@/components/shared-kit/list-kit/filters/types";
|
|
42
42
|
import { cn } from "@/lib/utils";
|
|
43
43
|
import { PriorityIcon } from "../priority-icon";
|
|
44
|
-
import { STORY_STATES, STATE_ICON, PRIORITY_LABEL, type StoryPriority, type StoryState } from "
|
|
44
|
+
import { STORY_STATES, STATE_ICON, PRIORITY_LABEL, type StoryPriority, type StoryState } from "@/shared/story/constants";
|
|
45
45
|
import { StateEditor } from "../inline-editors/state-editor";
|
|
46
46
|
import { PriorityEditor } from "../inline-editors/priority-editor";
|
|
47
47
|
import { AssigneeEditor } from "../inline-editors/assignee-editor";
|
|
48
48
|
import { LabelsEditor } from "../inline-editors/labels-editor";
|
|
49
49
|
import { TitleEditor } from "../inline-editors/title-editor";
|
|
50
|
-
import type { UserBrief } from "
|
|
50
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
51
51
|
|
|
52
52
|
export { serializeFilters, deserializeFilters, OPERATOR_LABELS, generateConditionId } from "@/components/shared-kit/list-kit/filters";
|
|
53
53
|
export type { FilterOperator, FilterFieldType };
|
|
@@ -20,7 +20,7 @@ import { CircleUser, Search, Check, ArrowDownUp } from "lucide-react";
|
|
|
20
20
|
import { Input } from "@/components/ui/input";
|
|
21
21
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
22
22
|
import { UserAvatar } from "@/components/shared-kit";
|
|
23
|
-
import type { UserBrief } from "
|
|
23
|
+
import type { UserBrief } from "@/shared/story/types";
|
|
24
24
|
import { cn } from "@/lib/utils";
|
|
25
25
|
import { InlineTrigger } from "./inline-trigger";
|
|
26
26
|
import { m } from "@/paraglide/messages.js";
|
|
@@ -20,7 +20,7 @@ import { Check, Waypoints } from "lucide-react";
|
|
|
20
20
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
21
21
|
import { Button, buttonVariants } from "@/components/ui/button";
|
|
22
22
|
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
|
23
|
-
import { DEPENDENCY_TYPE_OPTIONS, type DependencyTypeOption } from "
|
|
23
|
+
import { DEPENDENCY_TYPE_OPTIONS, type DependencyTypeOption } from "@/shared/story/constants";
|
|
24
24
|
import { cn } from "@/lib/utils";
|
|
25
25
|
import { m } from "@/paraglide/messages.js";
|
|
26
26
|
|
|
@@ -20,8 +20,8 @@ import { GitPullRequestCreateArrow, ExternalLink, X, GitPullRequestArrow } from
|
|
|
20
20
|
import { Button } from "@/components/ui/button";
|
|
21
21
|
import { cn } from "@/lib/utils";
|
|
22
22
|
import { StorySelectDialog } from "./story-select-dialog";
|
|
23
|
-
import type { StoryState } from "
|
|
24
|
-
import type { ActivityItem } from "
|
|
23
|
+
import type { StoryState } from "@/shared/story/constants";
|
|
24
|
+
import type { ActivityItem } from "@/shared/story/types";
|
|
25
25
|
import { m } from "@/paraglide/messages.js";
|
|
26
26
|
|
|
27
27
|
interface ParentStoryEditorProps {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
import { useState } from "react";
|
|
19
19
|
import { Check } from "lucide-react";
|
|
20
20
|
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
|
|
21
|
-
import { PRIORITY_LABEL } from "
|
|
22
|
-
import type { StoryPriority } from "
|
|
21
|
+
import { PRIORITY_LABEL } from "@/shared/story/constants";
|
|
22
|
+
import type { StoryPriority } from "@/shared/story/constants";
|
|
23
23
|
import { PriorityIcon } from "../priority-icon";
|
|
24
24
|
import { cn } from "@/lib/utils";
|
|
25
25
|
import { InlineTrigger } from "./inline-trigger";
|