github-issue-tower-defence-management 2.2.0 → 2.3.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/CHANGELOG.md +7 -0
- package/bin/adapter/entry-points/console/consoleDoneStore.js +0 -2
- package/bin/adapter/entry-points/console/consoleDoneStore.js.map +1 -1
- package/bin/adapter/entry-points/console/consoleTabNames.js +0 -1
- package/bin/adapter/entry-points/console/consoleTabNames.js.map +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/index-C5cOzhyn.js +86 -0
- package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js +0 -15
- package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js.map +1 -1
- package/package.json +1 -1
- package/src/adapter/entry-points/console/consoleDataDelivery.test.ts +15 -9
- package/src/adapter/entry-points/console/consoleDoneStore.ts +0 -2
- package/src/adapter/entry-points/console/consoleItemUrlLookup.test.ts +1 -1
- package/src/adapter/entry-points/console/consoleTabNames.ts +0 -1
- package/src/adapter/entry-points/console/ui/e2e/consoleScenario.spec.ts +7 -115
- package/src/adapter/entry-points/console/ui/e2e/consoleTestHarness.ts +0 -16
- package/src/adapter/entry-points/console/ui/src/features/console/components/detail/ConsoleItemDetail.stories.tsx +1 -3
- package/src/adapter/entry-points/console/ui/src/features/console/components/layout/ConsoleTabList.stories.tsx +0 -4
- package/src/adapter/entry-points/console/ui/src/features/console/components/layout/ConsoleTabList.test.tsx +0 -1
- package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleOperationMenu.stories.tsx +0 -10
- package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleOperationMenu.test.tsx +2 -28
- package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleOperationMenu.tsx +0 -10
- package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleNavigation.test.ts +18 -14
- package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleOverlay.test.ts +2 -2
- package/src/adapter/entry-points/console/ui/src/features/console/logic/actionToast.test.ts +1 -1
- package/src/adapter/entry-points/console/ui/src/features/console/logic/grouping.test.ts +7 -7
- package/src/adapter/entry-points/console/ui/src/features/console/logic/overlay.test.ts +10 -8
- package/src/adapter/entry-points/console/ui/src/features/console/logic/tabAdvance.test.ts +9 -11
- package/src/adapter/entry-points/console/ui/src/features/console/logic/types.ts +1 -12
- package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsoleItemDetailContainer.test.tsx +0 -12
- package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsoleItemDetailContainer.tsx +0 -3
- package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsolePage.tsx +10 -57
- package/src/adapter/entry-points/console/ui-dist/assets/index-C5cOzhyn.js +86 -0
- package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
- package/src/adapter/entry-points/console/webServer.test.ts +2 -2
- package/src/adapter/entry-points/handlers/consoleListsWriter.test.ts +0 -1
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.test.ts +2 -160
- package/src/domain/usecases/console/GenerateConsoleListsUseCase.ts +0 -37
- package/types/adapter/entry-points/console/consoleDoneStore.d.ts.map +1 -1
- package/types/adapter/entry-points/console/consoleTabNames.d.ts.map +1 -1
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts +1 -11
- package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts.map +1 -1
- package/bin/adapter/entry-points/console/ui-dist/assets/index-BVyeR7xJ.js +0 -86
- package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleStoryActions.stories.tsx +0 -80
- package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleStoryActions.test.tsx +0 -39
- package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleStoryActions.tsx +0 -42
- package/src/adapter/entry-points/console/ui-dist/assets/index-BVyeR7xJ.js +0 -86
package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleNavigation.test.ts
CHANGED
|
@@ -11,7 +11,6 @@ const counts = (
|
|
|
11
11
|
): Record<ConsoleTabName, number> => ({
|
|
12
12
|
'workflow-blocker': 0,
|
|
13
13
|
prs: 0,
|
|
14
|
-
triage: 0,
|
|
15
14
|
'failed-preparation': 0,
|
|
16
15
|
'todo-by-human': 0,
|
|
17
16
|
'todo-by-agent': 0,
|
|
@@ -21,13 +20,17 @@ const counts = (
|
|
|
21
20
|
|
|
22
21
|
describe('parseTabFromPath', () => {
|
|
23
22
|
it('reads a known tab from the project path', () => {
|
|
24
|
-
expect(parseTabFromPath('/projects/acme/
|
|
23
|
+
expect(parseTabFromPath('/projects/acme/prs')).toBe('prs');
|
|
25
24
|
});
|
|
26
25
|
|
|
27
26
|
it('returns null for an unknown tab segment', () => {
|
|
28
27
|
expect(parseTabFromPath('/projects/acme/unknown')).toBeNull();
|
|
29
28
|
});
|
|
30
29
|
|
|
30
|
+
it('returns null for the removed triage segment', () => {
|
|
31
|
+
expect(parseTabFromPath('/projects/acme/triage')).toBeNull();
|
|
32
|
+
});
|
|
33
|
+
|
|
31
34
|
it('returns null when there is no tab segment', () => {
|
|
32
35
|
expect(parseTabFromPath('/projects/acme')).toBeNull();
|
|
33
36
|
});
|
|
@@ -56,16 +59,18 @@ describe('useConsoleNavigation', () => {
|
|
|
56
59
|
|
|
57
60
|
it('builds a project tab href', () => {
|
|
58
61
|
const { result } = renderHook(() => useConsoleNavigation('acme', counts()));
|
|
59
|
-
expect(result.current.tabHref('
|
|
62
|
+
expect(result.current.tabHref('todo-by-human')).toBe(
|
|
63
|
+
'/projects/acme/todo-by-human',
|
|
64
|
+
);
|
|
60
65
|
});
|
|
61
66
|
|
|
62
67
|
it('selects a tab and updates the path', () => {
|
|
63
68
|
const { result } = renderHook(() => useConsoleNavigation('acme', counts()));
|
|
64
69
|
act(() => {
|
|
65
|
-
result.current.selectTab('
|
|
70
|
+
result.current.selectTab('todo-by-human');
|
|
66
71
|
});
|
|
67
|
-
expect(result.current.activeTab).toBe('
|
|
68
|
-
expect(window.location.pathname).toBe('/projects/acme/
|
|
72
|
+
expect(result.current.activeTab).toBe('todo-by-human');
|
|
73
|
+
expect(window.location.pathname).toBe('/projects/acme/todo-by-human');
|
|
69
74
|
});
|
|
70
75
|
|
|
71
76
|
it('opens an item and reflects it in the hash', () => {
|
|
@@ -101,7 +106,6 @@ describe('useConsoleNavigation default tab without a tab segment', () => {
|
|
|
101
106
|
counts({
|
|
102
107
|
'workflow-blocker': 3,
|
|
103
108
|
prs: 5,
|
|
104
|
-
triage: 2,
|
|
105
109
|
'failed-preparation': 1,
|
|
106
110
|
'todo-by-human': 4,
|
|
107
111
|
}),
|
|
@@ -114,10 +118,10 @@ describe('useConsoleNavigation default tab without a tab segment', () => {
|
|
|
114
118
|
const { result } = renderHook(() =>
|
|
115
119
|
useConsoleNavigation(
|
|
116
120
|
'acme',
|
|
117
|
-
counts({ 'workflow-blocker': 0, prs: 0,
|
|
121
|
+
counts({ 'workflow-blocker': 0, prs: 0, 'failed-preparation': 8 }),
|
|
118
122
|
),
|
|
119
123
|
);
|
|
120
|
-
expect(result.current.activeTab).toBe('
|
|
124
|
+
expect(result.current.activeTab).toBe('failed-preparation');
|
|
121
125
|
});
|
|
122
126
|
|
|
123
127
|
it('falls back to the first tab when every tab is empty', () => {
|
|
@@ -132,15 +136,15 @@ describe('useConsoleNavigation default tab without a tab segment', () => {
|
|
|
132
136
|
{ initialProps: { tabCounts: counts() } },
|
|
133
137
|
);
|
|
134
138
|
expect(result.current.activeTab).toBe('workflow-blocker');
|
|
135
|
-
rerender({ tabCounts: counts({
|
|
136
|
-
expect(result.current.activeTab).toBe('
|
|
139
|
+
rerender({ tabCounts: counts({ 'failed-preparation': 6 }) });
|
|
140
|
+
expect(result.current.activeTab).toBe('failed-preparation');
|
|
137
141
|
});
|
|
138
142
|
|
|
139
143
|
it('keeps the tab from the path even when counts are present', () => {
|
|
140
|
-
window.history.replaceState({}, '', '/projects/acme/
|
|
144
|
+
window.history.replaceState({}, '', '/projects/acme/todo-by-human?k=token');
|
|
141
145
|
const { result } = renderHook(() =>
|
|
142
|
-
useConsoleNavigation('acme', counts({
|
|
146
|
+
useConsoleNavigation('acme', counts({ 'todo-by-human': 6 })),
|
|
143
147
|
);
|
|
144
|
-
expect(result.current.activeTab).toBe('
|
|
148
|
+
expect(result.current.activeTab).toBe('todo-by-human');
|
|
145
149
|
});
|
|
146
150
|
});
|
package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleOverlay.test.ts
CHANGED
|
@@ -19,10 +19,10 @@ describe('useConsoleOverlay', () => {
|
|
|
19
19
|
it('patches and persists overlay entries with timestamp and mode', () => {
|
|
20
20
|
const { result } = renderHook(() => useConsoleOverlay('acme'));
|
|
21
21
|
act(() => {
|
|
22
|
-
result.current.patchOverlay('PVTI_2', { done: true }, '
|
|
22
|
+
result.current.patchOverlay('PVTI_2', { done: true }, 'todo-by-human');
|
|
23
23
|
});
|
|
24
24
|
expect(result.current.overlay.PVTI_2?.done).toBe(true);
|
|
25
|
-
expect(result.current.overlay.PVTI_2?.mode).toBe('
|
|
25
|
+
expect(result.current.overlay.PVTI_2?.mode).toBe('todo-by-human');
|
|
26
26
|
const stored = JSON.parse(
|
|
27
27
|
localStorage.getItem(overlayStorageKey('acme')) ?? '{}',
|
|
28
28
|
);
|
|
@@ -47,7 +47,7 @@ describe('resolveItemStory', () => {
|
|
|
47
47
|
const overlay: ConsoleOverlay = {
|
|
48
48
|
PVTI_1: {
|
|
49
49
|
ts: 1,
|
|
50
|
-
mode: '
|
|
50
|
+
mode: 'todo-by-human',
|
|
51
51
|
story: { name: 'Overlay', color: 'BLUE' },
|
|
52
52
|
},
|
|
53
53
|
};
|
|
@@ -73,7 +73,7 @@ describe('resolveItemStory', () => {
|
|
|
73
73
|
const overlay: ConsoleOverlay = {
|
|
74
74
|
PVTI_4: {
|
|
75
75
|
ts: snapshotTs,
|
|
76
|
-
mode: '
|
|
76
|
+
mode: 'todo-by-human',
|
|
77
77
|
story: { name: 'FreshOverlay', color: 'GREEN' },
|
|
78
78
|
},
|
|
79
79
|
};
|
|
@@ -92,7 +92,7 @@ describe('resolveItemStory', () => {
|
|
|
92
92
|
const overlay: ConsoleOverlay = {
|
|
93
93
|
PVTI_5: {
|
|
94
94
|
ts: overlayTs,
|
|
95
|
-
mode: '
|
|
95
|
+
mode: 'todo-by-human',
|
|
96
96
|
story: { name: 'StaleOverlay', color: 'RED' },
|
|
97
97
|
},
|
|
98
98
|
};
|
|
@@ -109,7 +109,7 @@ describe('resolveItemStory', () => {
|
|
|
109
109
|
const overlay: ConsoleOverlay = {
|
|
110
110
|
PVTI_6: {
|
|
111
111
|
ts: 1,
|
|
112
|
-
mode: '
|
|
112
|
+
mode: 'todo-by-human',
|
|
113
113
|
story: { name: 'OverlayStory', color: 'BLUE' },
|
|
114
114
|
},
|
|
115
115
|
};
|
|
@@ -122,7 +122,7 @@ describe('resolveItemStory', () => {
|
|
|
122
122
|
const overlay: ConsoleOverlay = {
|
|
123
123
|
PVTI_7: {
|
|
124
124
|
ts: 1,
|
|
125
|
-
mode: '
|
|
125
|
+
mode: 'todo-by-human',
|
|
126
126
|
story: { name: 'OverlayStory', color: 'BLUE' },
|
|
127
127
|
},
|
|
128
128
|
};
|
|
@@ -166,7 +166,7 @@ describe('buildConsoleListRows', () => {
|
|
|
166
166
|
const overlay: ConsoleOverlay = {
|
|
167
167
|
PVTI_1: {
|
|
168
168
|
ts: 1,
|
|
169
|
-
mode: '
|
|
169
|
+
mode: 'todo-by-human',
|
|
170
170
|
story: { name: 'Alpha', color: 'BLUE' },
|
|
171
171
|
},
|
|
172
172
|
};
|
|
@@ -212,7 +212,7 @@ describe('buildConsoleListRows', () => {
|
|
|
212
212
|
const overlay: ConsoleOverlay = {
|
|
213
213
|
PVTI_1: {
|
|
214
214
|
ts: overlayTs,
|
|
215
|
-
mode: '
|
|
215
|
+
mode: 'todo-by-human',
|
|
216
216
|
story: { name: 'StaleStory', color: 'RED' },
|
|
217
217
|
},
|
|
218
218
|
};
|
|
@@ -70,9 +70,9 @@ describe('isOverlayEntryActed', () => {
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
it('treats a done entry as acted regardless of the mode it was written in', () => {
|
|
73
|
-
expect(
|
|
74
|
-
true,
|
|
75
|
-
);
|
|
73
|
+
expect(
|
|
74
|
+
isOverlayEntryActed({ ts: 100, mode: 'todo-by-human', done: true }),
|
|
75
|
+
).toBe(true);
|
|
76
76
|
});
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -86,7 +86,7 @@ describe('counts driven to zero do not revive on tab switch', () => {
|
|
|
86
86
|
|
|
87
87
|
it('does not subtract a done item from a tab other than the one it was processed in', () => {
|
|
88
88
|
const overlay: ConsoleOverlay = {
|
|
89
|
-
PVTI_1: { ts: 100, mode: '
|
|
89
|
+
PVTI_1: { ts: 100, mode: 'todo-by-human', done: true },
|
|
90
90
|
};
|
|
91
91
|
expect(countPendingItems([item(1)], overlay, 'prs')).toBe(1);
|
|
92
92
|
});
|
|
@@ -102,8 +102,10 @@ describe('counts driven to zero do not revive on tab switch', () => {
|
|
|
102
102
|
const overlay: ConsoleOverlay = {
|
|
103
103
|
PVTI_1: { ts: 100, mode: 'prs', done: true },
|
|
104
104
|
};
|
|
105
|
-
expect(countPendingItems([item(1)], overlay, '
|
|
106
|
-
expect(filterPendingItems([item(1)], overlay, '
|
|
105
|
+
expect(countPendingItems([item(1)], overlay, 'todo-by-human')).toBe(1);
|
|
106
|
+
expect(filterPendingItems([item(1)], overlay, 'todo-by-human')).toEqual([
|
|
107
|
+
item(1),
|
|
108
|
+
]);
|
|
107
109
|
});
|
|
108
110
|
|
|
109
111
|
it('counts an item that has no done entry', () => {
|
|
@@ -237,14 +239,14 @@ describe('writeOverlayEntry', () => {
|
|
|
237
239
|
overlay,
|
|
238
240
|
'PVTI_1',
|
|
239
241
|
{ story: { name: 'New Story', color: 'GREEN' } },
|
|
240
|
-
'
|
|
242
|
+
'todo-by-human',
|
|
241
243
|
999,
|
|
242
244
|
);
|
|
243
245
|
expect(next.PVTI_1).toEqual({
|
|
244
246
|
done: true,
|
|
245
247
|
story: { name: 'New Story', color: 'GREEN' },
|
|
246
248
|
ts: 999,
|
|
247
|
-
mode: '
|
|
249
|
+
mode: 'todo-by-human',
|
|
248
250
|
});
|
|
249
251
|
});
|
|
250
252
|
});
|
|
@@ -9,7 +9,6 @@ const counts = (
|
|
|
9
9
|
): Record<ConsoleTabName, number> => ({
|
|
10
10
|
'workflow-blocker': 0,
|
|
11
11
|
prs: 0,
|
|
12
|
-
triage: 0,
|
|
13
12
|
'failed-preparation': 0,
|
|
14
13
|
'todo-by-human': 0,
|
|
15
14
|
'todo-by-agent': 0,
|
|
@@ -19,16 +18,16 @@ const counts = (
|
|
|
19
18
|
|
|
20
19
|
describe('findNextNonEmptyTabToRight', () => {
|
|
21
20
|
it('returns the first non-empty tab to the right of the active tab', () => {
|
|
22
|
-
expect(
|
|
23
|
-
'
|
|
24
|
-
);
|
|
21
|
+
expect(
|
|
22
|
+
findNextNonEmptyTabToRight('prs', counts({ 'failed-preparation': 7 })),
|
|
23
|
+
).toBe('failed-preparation');
|
|
25
24
|
});
|
|
26
25
|
|
|
27
26
|
it('skips empty tabs and returns the next non-empty tab further right', () => {
|
|
28
27
|
expect(
|
|
29
28
|
findNextNonEmptyTabToRight(
|
|
30
29
|
'prs',
|
|
31
|
-
counts({
|
|
30
|
+
counts({ 'failed-preparation': 0, 'todo-by-human': 4 }),
|
|
32
31
|
),
|
|
33
32
|
).toBe('todo-by-human');
|
|
34
33
|
});
|
|
@@ -43,9 +42,9 @@ describe('findNextNonEmptyTabToRight', () => {
|
|
|
43
42
|
});
|
|
44
43
|
|
|
45
44
|
it('returns the immediately adjacent tab when it is non-empty', () => {
|
|
46
|
-
expect(
|
|
47
|
-
'
|
|
48
|
-
);
|
|
45
|
+
expect(
|
|
46
|
+
findNextNonEmptyTabToRight('prs', counts({ 'failed-preparation': 12 })),
|
|
47
|
+
).toBe('failed-preparation');
|
|
49
48
|
});
|
|
50
49
|
|
|
51
50
|
it('returns null when no tab to the right has any items', () => {
|
|
@@ -68,7 +67,6 @@ describe('resolveDefaultActiveTab', () => {
|
|
|
68
67
|
counts({
|
|
69
68
|
'workflow-blocker': 3,
|
|
70
69
|
prs: 5,
|
|
71
|
-
triage: 2,
|
|
72
70
|
'failed-preparation': 1,
|
|
73
71
|
'todo-by-human': 4,
|
|
74
72
|
}),
|
|
@@ -79,9 +77,9 @@ describe('resolveDefaultActiveTab', () => {
|
|
|
79
77
|
it('skips empty left-most tabs and returns the first non-empty tab', () => {
|
|
80
78
|
expect(
|
|
81
79
|
resolveDefaultActiveTab(
|
|
82
|
-
counts({ 'workflow-blocker': 0, prs: 0,
|
|
80
|
+
counts({ 'workflow-blocker': 0, prs: 0, 'failed-preparation': 8 }),
|
|
83
81
|
),
|
|
84
|
-
).toBe('
|
|
82
|
+
).toBe('failed-preparation');
|
|
85
83
|
});
|
|
86
84
|
|
|
87
85
|
it('falls back to the first tab when every tab is empty', () => {
|
|
@@ -43,16 +43,7 @@ export type ConsoleStatusTab = {
|
|
|
43
43
|
items: ConsoleListItem[];
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
export type
|
|
47
|
-
pjcode: string;
|
|
48
|
-
generatedAt: string;
|
|
49
|
-
storyOptions: ConsoleFieldOption[];
|
|
50
|
-
storyOrder: string[];
|
|
51
|
-
storyColors: Record<string, ConsoleColor>;
|
|
52
|
-
items: ConsoleListItem[];
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export type ConsoleTabData = ConsoleStatusTab | ConsoleTriageTab;
|
|
46
|
+
export type ConsoleTabData = ConsoleStatusTab;
|
|
56
47
|
|
|
57
48
|
export type ConsoleStoryColorSource = Record<
|
|
58
49
|
string,
|
|
@@ -144,7 +135,6 @@ export type ConsoleOverlay = Record<string, ConsoleOverlayEntry>;
|
|
|
144
135
|
export type ConsoleTabName =
|
|
145
136
|
| 'workflow-blocker'
|
|
146
137
|
| 'prs'
|
|
147
|
-
| 'triage'
|
|
148
138
|
| 'failed-preparation'
|
|
149
139
|
| 'todo-by-human'
|
|
150
140
|
| 'todo-by-agent'
|
|
@@ -166,7 +156,6 @@ export type ConsoleTab = {
|
|
|
166
156
|
export const CONSOLE_TABS: ConsoleTab[] = [
|
|
167
157
|
{ name: 'workflow-blocker', label: 'Workflow Blocker' },
|
|
168
158
|
{ name: 'prs', label: 'Awaiting Quality Check' },
|
|
169
|
-
{ name: 'triage', label: 'Triage' },
|
|
170
159
|
{ name: 'failed-preparation', label: 'Failed Preparation' },
|
|
171
160
|
{ name: 'todo-by-human', label: 'Todo by human' },
|
|
172
161
|
{ name: 'todo-by-agent', label: 'Todo by agent' },
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
consoleRelatedPullRequestsFixture,
|
|
14
14
|
consoleStatusOptionsFixture,
|
|
15
15
|
consoleStoryColorsFixture,
|
|
16
|
-
consoleStoryOptionsFixture,
|
|
17
16
|
} from '../testing/fixtures';
|
|
18
17
|
import { ConsoleItemDetailContainer } from './ConsoleItemDetailContainer';
|
|
19
18
|
|
|
@@ -110,7 +109,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
110
109
|
caches={buildCaches()}
|
|
111
110
|
operations={operations}
|
|
112
111
|
statusOptions={consoleStatusOptionsFixture}
|
|
113
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
114
112
|
storyColors={consoleStoryColorsFixture}
|
|
115
113
|
storyName="TDPM Console port"
|
|
116
114
|
overlayStatus={null}
|
|
@@ -144,7 +142,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
144
142
|
caches={buildCaches()}
|
|
145
143
|
operations={buildOperations()}
|
|
146
144
|
statusOptions={consoleStatusOptionsFixture}
|
|
147
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
148
145
|
storyColors={consoleStoryColorsFixture}
|
|
149
146
|
storyName="TDPM Console port"
|
|
150
147
|
overlayStatus={null}
|
|
@@ -170,7 +167,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
170
167
|
caches={buildCaches()}
|
|
171
168
|
operations={operations}
|
|
172
169
|
statusOptions={consoleStatusOptionsFixture}
|
|
173
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
174
170
|
storyColors={consoleStoryColorsFixture}
|
|
175
171
|
storyName="TDPM Console port"
|
|
176
172
|
overlayStatus={null}
|
|
@@ -212,7 +208,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
212
208
|
caches={buildCaches()}
|
|
213
209
|
operations={operations}
|
|
214
210
|
statusOptions={consoleStatusOptionsFixture}
|
|
215
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
216
211
|
storyColors={consoleStoryColorsFixture}
|
|
217
212
|
storyName="TDPM Console port"
|
|
218
213
|
overlayStatus={null}
|
|
@@ -260,7 +255,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
260
255
|
caches={buildCaches()}
|
|
261
256
|
operations={operations}
|
|
262
257
|
statusOptions={consoleStatusOptionsFixture}
|
|
263
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
264
258
|
storyColors={consoleStoryColorsFixture}
|
|
265
259
|
storyName="TDPM Console port"
|
|
266
260
|
overlayStatus={null}
|
|
@@ -311,7 +305,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
311
305
|
caches={buildCaches({ relatedPrsNeverResolve: true })}
|
|
312
306
|
operations={operations}
|
|
313
307
|
statusOptions={consoleStatusOptionsFixture}
|
|
314
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
315
308
|
storyColors={consoleStoryColorsFixture}
|
|
316
309
|
storyName="TDPM Console port"
|
|
317
310
|
overlayStatus={null}
|
|
@@ -348,7 +341,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
348
341
|
caches={buildCaches({ prFiles: consoleChangedFilesFixture })}
|
|
349
342
|
operations={operations}
|
|
350
343
|
statusOptions={consoleStatusOptionsFixture}
|
|
351
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
352
344
|
storyColors={consoleStoryColorsFixture}
|
|
353
345
|
storyName="TDPM Console port"
|
|
354
346
|
overlayStatus={null}
|
|
@@ -414,7 +406,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
414
406
|
caches={buildCaches()}
|
|
415
407
|
operations={buildOperations()}
|
|
416
408
|
statusOptions={consoleStatusOptionsFixture}
|
|
417
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
418
409
|
storyColors={consoleStoryColorsFixture}
|
|
419
410
|
storyName="TDPM Console port"
|
|
420
411
|
overlayStatus={null}
|
|
@@ -437,7 +428,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
437
428
|
caches={buildCaches()}
|
|
438
429
|
operations={buildOperations()}
|
|
439
430
|
statusOptions={statusOptionsWithoutAwaitingWorkspace}
|
|
440
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
441
431
|
storyColors={consoleStoryColorsFixture}
|
|
442
432
|
storyName="TDPM Console port"
|
|
443
433
|
overlayStatus={null}
|
|
@@ -458,7 +448,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
458
448
|
caches={buildCaches()}
|
|
459
449
|
operations={operations}
|
|
460
450
|
statusOptions={consoleStatusOptionsFixture}
|
|
461
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
462
451
|
storyColors={consoleStoryColorsFixture}
|
|
463
452
|
storyName="TDPM Console port"
|
|
464
453
|
overlayStatus={null}
|
|
@@ -508,7 +497,6 @@ describe('ConsoleItemDetailContainer', () => {
|
|
|
508
497
|
})}
|
|
509
498
|
operations={operations}
|
|
510
499
|
statusOptions={consoleStatusOptionsFixture}
|
|
511
|
-
storyOptions={consoleStoryOptionsFixture}
|
|
512
500
|
storyColors={consoleStoryColorsFixture}
|
|
513
501
|
storyName="TDPM Console port"
|
|
514
502
|
overlayStatus={null}
|
|
@@ -38,7 +38,6 @@ export type ConsoleItemDetailContainerProps = {
|
|
|
38
38
|
caches: ConsoleCaches;
|
|
39
39
|
operations: ConsoleOperationsApi;
|
|
40
40
|
statusOptions: ConsoleFieldOption[];
|
|
41
|
-
storyOptions: ConsoleFieldOption[];
|
|
42
41
|
storyColors: ConsoleStoryColorSource;
|
|
43
42
|
storyName: string | null;
|
|
44
43
|
overlayStatus: ConsoleOverlayStatus | null;
|
|
@@ -54,7 +53,6 @@ export const ConsoleItemDetailContainer = ({
|
|
|
54
53
|
caches,
|
|
55
54
|
operations,
|
|
56
55
|
statusOptions,
|
|
57
|
-
storyOptions,
|
|
58
56
|
storyColors,
|
|
59
57
|
storyName,
|
|
60
58
|
overlayStatus,
|
|
@@ -231,7 +229,6 @@ export const ConsoleItemDetailContainer = ({
|
|
|
231
229
|
hasPullRequest={hasPullRequest}
|
|
232
230
|
rejectEnabled={pendingReviewComments.length > 0}
|
|
233
231
|
statusOptions={statusOptions}
|
|
234
|
-
storyOptions={storyOptions}
|
|
235
232
|
handlers={handlers}
|
|
236
233
|
/>
|
|
237
234
|
}
|
|
@@ -3,7 +3,6 @@ import { ConsoleTabList } from '../components/layout/ConsoleTabList';
|
|
|
3
3
|
import { ConsoleTimerSettingsModalDialog } from '../components/layout/ConsoleTimerSettingsModalDialog';
|
|
4
4
|
import { ConsoleItemList } from '../components/list/ConsoleItemList';
|
|
5
5
|
import { ConsoleStoryList } from '../components/list/ConsoleStoryList';
|
|
6
|
-
import { ConsoleStoryReorderPanel } from '../components/list/ConsoleStoryReorderPanel';
|
|
7
6
|
import {
|
|
8
7
|
ConsoleErrorToast,
|
|
9
8
|
ConsoleUndoToast,
|
|
@@ -177,26 +176,14 @@ export const ConsolePage = () => {
|
|
|
177
176
|
|
|
178
177
|
const storyColors = activeSnapshot?.storyColors ?? {};
|
|
179
178
|
const statusOptions = activeSnapshot?.statusOptions ?? [];
|
|
180
|
-
const storyOptions = activeSnapshot?.storyOptions ?? [];
|
|
181
179
|
const generatedAt = activeSnapshot?.generatedAt ?? null;
|
|
182
180
|
const fromCache = activeSnapshot?.fromCache ?? false;
|
|
183
181
|
|
|
184
|
-
const [localStoryOptionsOverride, setLocalStoryOptionsOverride] = useState<{
|
|
185
|
-
generatedAt: string | undefined;
|
|
186
|
-
stories: typeof storyOptions;
|
|
187
|
-
} | null>(null);
|
|
188
|
-
|
|
189
182
|
const [localStoryEntriesOverride, setLocalStoryEntriesOverride] = useState<{
|
|
190
183
|
generatedAt: string | undefined;
|
|
191
184
|
stories: ConsoleStoryEntry[];
|
|
192
185
|
} | null>(null);
|
|
193
186
|
|
|
194
|
-
const triageStoryOptions =
|
|
195
|
-
localStoryOptionsOverride !== null &&
|
|
196
|
-
localStoryOptionsOverride.generatedAt === activeSnapshot?.generatedAt
|
|
197
|
-
? localStoryOptionsOverride.stories
|
|
198
|
-
: storyOptions.filter((o) => o.color !== 'GRAY');
|
|
199
|
-
|
|
200
187
|
const selectedItem = useMemo<ConsoleListItem | null>(() => {
|
|
201
188
|
if (selectedItemKey === null || activeSnapshot === null) {
|
|
202
189
|
return null;
|
|
@@ -385,25 +372,6 @@ export const ConsolePage = () => {
|
|
|
385
372
|
throw new Error('No project specified in the URL path.');
|
|
386
373
|
}
|
|
387
374
|
await postConsoleReorderStory({ pjcode, storyOptionId, direction });
|
|
388
|
-
const triageIndex = triageStoryOptions.findIndex(
|
|
389
|
-
(o) => o.id === storyOptionId,
|
|
390
|
-
);
|
|
391
|
-
if (triageIndex !== -1) {
|
|
392
|
-
const triageSwapIndex = triageIndex + (direction === 'up' ? -1 : 1);
|
|
393
|
-
if (
|
|
394
|
-
triageSwapIndex >= 0 &&
|
|
395
|
-
triageSwapIndex < triageStoryOptions.length
|
|
396
|
-
) {
|
|
397
|
-
const nextTriage = [...triageStoryOptions];
|
|
398
|
-
const triageTemp = nextTriage[triageIndex];
|
|
399
|
-
nextTriage[triageIndex] = nextTriage[triageSwapIndex];
|
|
400
|
-
nextTriage[triageSwapIndex] = triageTemp;
|
|
401
|
-
setLocalStoryOptionsOverride({
|
|
402
|
-
generatedAt: activeSnapshot?.generatedAt,
|
|
403
|
-
stories: nextTriage,
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
375
|
const entryIndex = storyEntries.findIndex(
|
|
408
376
|
(e) => e.storyOptionId === storyOptionId,
|
|
409
377
|
);
|
|
@@ -421,13 +389,7 @@ export const ConsolePage = () => {
|
|
|
421
389
|
}
|
|
422
390
|
}
|
|
423
391
|
},
|
|
424
|
-
[
|
|
425
|
-
pjcode,
|
|
426
|
-
triageStoryOptions,
|
|
427
|
-
storyEntries,
|
|
428
|
-
activeSnapshot?.generatedAt,
|
|
429
|
-
storiesSnapshot?.generatedAt,
|
|
430
|
-
],
|
|
392
|
+
[pjcode, storyEntries, storiesSnapshot?.generatedAt],
|
|
431
393
|
);
|
|
432
394
|
|
|
433
395
|
const handleStoryAdd = useCallback(
|
|
@@ -565,23 +527,15 @@ export const ConsolePage = () => {
|
|
|
565
527
|
colorErrors={storyColorErrors}
|
|
566
528
|
/>
|
|
567
529
|
) : selectedItem === null ? (
|
|
568
|
-
|
|
569
|
-
{
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
storyColors={storyColors}
|
|
578
|
-
activeItemId={null}
|
|
579
|
-
now={now}
|
|
580
|
-
isLoading={isLoading}
|
|
581
|
-
error={error}
|
|
582
|
-
onSelectItem={(item) => navigation.openItem(item.projectItemId)}
|
|
583
|
-
/>
|
|
584
|
-
</>
|
|
530
|
+
<ConsoleItemList
|
|
531
|
+
rows={rows}
|
|
532
|
+
storyColors={storyColors}
|
|
533
|
+
activeItemId={null}
|
|
534
|
+
now={now}
|
|
535
|
+
isLoading={isLoading}
|
|
536
|
+
error={error}
|
|
537
|
+
onSelectItem={(item) => navigation.openItem(item.projectItemId)}
|
|
538
|
+
/>
|
|
585
539
|
) : (
|
|
586
540
|
<div className="console-detail-screen" ref={detailScreenRef}>
|
|
587
541
|
<ConsoleItemDetailContainer
|
|
@@ -591,7 +545,6 @@ export const ConsolePage = () => {
|
|
|
591
545
|
caches={caches}
|
|
592
546
|
operations={operations}
|
|
593
547
|
statusOptions={statusOptions}
|
|
594
|
-
storyOptions={storyOptions}
|
|
595
548
|
storyColors={storyColors}
|
|
596
549
|
storyName={storyNameForSelected}
|
|
597
550
|
overlayStatus={overlayStatusForSelected}
|