github-issue-tower-defence-management 1.174.3 → 1.175.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 (67) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bin/adapter/entry-points/console/consoleDoneStore.js +0 -2
  3. package/bin/adapter/entry-points/console/consoleDoneStore.js.map +1 -1
  4. package/bin/adapter/entry-points/console/consoleTabNames.js +0 -1
  5. package/bin/adapter/entry-points/console/consoleTabNames.js.map +1 -1
  6. package/bin/adapter/entry-points/console/dashboardComposeService.js +2 -4
  7. package/bin/adapter/entry-points/console/dashboardComposeService.js.map +1 -1
  8. package/bin/adapter/entry-points/console/ui-dist/assets/{index-g4SqIzCh.js → index-BhDothvr.js} +1 -1
  9. package/bin/adapter/entry-points/console/ui-dist/index.html +1 -1
  10. package/bin/domain/entities/WorkflowStatus.js +1 -6
  11. package/bin/domain/entities/WorkflowStatus.js.map +1 -1
  12. package/bin/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.js +0 -39
  13. package/bin/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.js.map +1 -1
  14. package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js +15 -1
  15. package/bin/domain/usecases/SetupTowerDefenceProjectUseCase.js.map +1 -1
  16. package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js +0 -2
  17. package/bin/domain/usecases/console/GenerateConsoleListsUseCase.js.map +1 -1
  18. package/bin/domain/usecases/dashboard/ComposeDashboardUseCase.js +2 -3
  19. package/bin/domain/usecases/dashboard/ComposeDashboardUseCase.js.map +1 -1
  20. package/bin/domain/usecases/dashboard/GenerateDashboardRowUseCase.js +0 -1
  21. package/bin/domain/usecases/dashboard/GenerateDashboardRowUseCase.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/adapter/entry-points/console/consoleDoneStore.ts +0 -2
  24. package/src/adapter/entry-points/console/consoleTabNames.ts +0 -1
  25. package/src/adapter/entry-points/console/dashboardComposeService.test.ts +4 -8
  26. package/src/adapter/entry-points/console/dashboardComposeService.ts +1 -3
  27. package/src/adapter/entry-points/console/dashboardEmitterComposerKey.test.ts +12 -17
  28. package/src/adapter/entry-points/console/ui/e2e/consoleScenario.spec.ts +4 -32
  29. package/src/adapter/entry-points/console/ui/e2e/consoleTestHarness.ts +1 -18
  30. package/src/adapter/entry-points/console/ui/src/features/console/components/layout/ConsoleTabList.stories.tsx +3 -7
  31. package/src/adapter/entry-points/console/ui/src/features/console/components/layout/ConsoleTabList.test.tsx +2 -4
  32. package/src/adapter/entry-points/console/ui/src/features/console/components/operations/ConsoleOperationMenu.test.tsx +1 -1
  33. package/src/adapter/entry-points/console/ui/src/features/console/hooks/useConsoleNavigation.test.ts +6 -8
  34. package/src/adapter/entry-points/console/ui/src/features/console/logic/tabAdvance.test.ts +8 -17
  35. package/src/adapter/entry-points/console/ui/src/features/console/logic/types.ts +0 -2
  36. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsoleItemDetailContainer.test.tsx +3 -3
  37. package/src/adapter/entry-points/console/ui/src/features/console/pages/ConsolePage.test.tsx +5 -6
  38. package/src/adapter/entry-points/console/ui-dist/assets/{index-g4SqIzCh.js → index-BhDothvr.js} +1 -1
  39. package/src/adapter/entry-points/console/ui-dist/index.html +1 -1
  40. package/src/adapter/entry-points/console/webServer.test.ts +4 -6
  41. package/src/adapter/entry-points/handlers/consoleListsWriter.test.ts +30 -26
  42. package/src/adapter/entry-points/handlers/dashboardRowWriter.test.ts +5 -6
  43. package/src/domain/entities/WorkflowStatus.ts +0 -5
  44. package/src/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.test.ts +198 -863
  45. package/src/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.ts +0 -68
  46. package/src/domain/usecases/SetupTowerDefenceProjectUseCase.test.ts +89 -51
  47. package/src/domain/usecases/SetupTowerDefenceProjectUseCase.ts +30 -2
  48. package/src/domain/usecases/console/GenerateConsoleListsUseCase.test.ts +62 -72
  49. package/src/domain/usecases/console/GenerateConsoleListsUseCase.ts +0 -8
  50. package/src/domain/usecases/dashboard/ComposeDashboardUseCase.test.ts +19 -28
  51. package/src/domain/usecases/dashboard/ComposeDashboardUseCase.ts +2 -3
  52. package/src/domain/usecases/dashboard/GenerateDashboardRowUseCase.test.ts +11 -12
  53. package/src/domain/usecases/dashboard/GenerateDashboardRowUseCase.ts +0 -3
  54. package/src/domain/usecases/intmux/GenerateInTmuxByHumanDataUseCase.test.ts +2 -2
  55. package/types/adapter/entry-points/console/consoleDoneStore.d.ts.map +1 -1
  56. package/types/adapter/entry-points/console/consoleTabNames.d.ts.map +1 -1
  57. package/types/adapter/entry-points/console/dashboardComposeService.d.ts.map +1 -1
  58. package/types/domain/entities/WorkflowStatus.d.ts +0 -1
  59. package/types/domain/entities/WorkflowStatus.d.ts.map +1 -1
  60. package/types/domain/usecases/RevertNotReadyReviewQueueIssueUseCase.d.ts.map +1 -1
  61. package/types/domain/usecases/SetupTowerDefenceProjectUseCase.d.ts +1 -0
  62. package/types/domain/usecases/SetupTowerDefenceProjectUseCase.d.ts.map +1 -1
  63. package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts +1 -2
  64. package/types/domain/usecases/console/GenerateConsoleListsUseCase.d.ts.map +1 -1
  65. package/types/domain/usecases/dashboard/ComposeDashboardUseCase.d.ts.map +1 -1
  66. package/types/domain/usecases/dashboard/GenerateDashboardRowUseCase.d.ts +0 -1
  67. package/types/domain/usecases/dashboard/GenerateDashboardRowUseCase.d.ts.map +1 -1
@@ -23,7 +23,6 @@ const counts: Record<ConsoleTabName, number> = {
23
23
  'workflow-blocker': 5,
24
24
  prs: 35,
25
25
  triage: 132,
26
- unread: 18,
27
26
  'failed-preparation': 2,
28
27
  'todo-by-human': 66,
29
28
  'todo-by-agent': 24,
@@ -44,9 +43,8 @@ export const ZeroCountTabsHidden: Story = {
44
43
  'workflow-blocker': 0,
45
44
  prs: 35,
46
45
  triage: 0,
47
- unread: 18,
48
46
  'failed-preparation': 0,
49
- 'todo-by-human': 0,
47
+ 'todo-by-human': 18,
50
48
  'todo-by-agent': 0,
51
49
  stories: 0,
52
50
  },
@@ -60,9 +58,8 @@ export const ZeroCountActiveTabStaysVisible: Story = {
60
58
  'workflow-blocker': 0,
61
59
  prs: 35,
62
60
  triage: 0,
63
- unread: 18,
64
61
  'failed-preparation': 0,
65
- 'todo-by-human': 0,
62
+ 'todo-by-human': 18,
66
63
  'todo-by-agent': 0,
67
64
  stories: 0,
68
65
  },
@@ -71,12 +68,11 @@ export const ZeroCountActiveTabStaysVisible: Story = {
71
68
 
72
69
  export const AfterAutoAdvanceToNextTab: Story = {
73
70
  args: {
74
- activeTab: 'unread',
71
+ activeTab: 'failed-preparation',
75
72
  counts: {
76
73
  'workflow-blocker': 0,
77
74
  prs: 0,
78
75
  triage: 0,
79
- unread: 7,
80
76
  'failed-preparation': 2,
81
77
  'todo-by-human': 4,
82
78
  'todo-by-agent': 0,
@@ -6,7 +6,6 @@ const counts: Record<ConsoleTabName, number> = {
6
6
  'workflow-blocker': 4,
7
7
  prs: 3,
8
8
  triage: 0,
9
- unread: 5,
10
9
  'failed-preparation': 0,
11
10
  'todo-by-human': 2,
12
11
  'todo-by-agent': 3,
@@ -27,7 +26,6 @@ describe('ConsoleTabList', () => {
27
26
  <ConsoleTabList {...baseProps} activeTab="prs" counts={counts} />,
28
27
  );
29
28
  expect(queryByText('Awaiting Quality Check')).not.toBeNull();
30
- expect(queryByText('Unread')).not.toBeNull();
31
29
  expect(queryByText('Todo by human')).not.toBeNull();
32
30
  expect(queryByText('Todo by agent')).not.toBeNull();
33
31
  expect(queryByText('Triage')).toBeNull();
@@ -114,8 +112,8 @@ describe('ConsoleTabList', () => {
114
112
  onSelectTab={onSelectTab}
115
113
  />,
116
114
  );
117
- fireEvent.click(getByText('Unread'));
118
- expect(onSelectTab).toHaveBeenCalledWith('unread');
115
+ fireEvent.click(getByText('Todo by human'));
116
+ expect(onSelectTab).toHaveBeenCalledWith('todo-by-human');
119
117
  });
120
118
 
121
119
  it('prefixes the snapshot info with "(cached)" and sets data-from-cache when data is from cache', () => {
@@ -91,7 +91,7 @@ describe('ConsoleOperationMenu', () => {
91
91
  it('hides the review group when there is no pull request', () => {
92
92
  const { queryByText } = render(
93
93
  <ConsoleOperationMenu
94
- tab="unread"
94
+ tab="todo-by-human"
95
95
  item={issueItem}
96
96
  hasPullRequest={false}
97
97
  rejectEnabled={false}
@@ -12,7 +12,6 @@ const counts = (
12
12
  'workflow-blocker': 0,
13
13
  prs: 0,
14
14
  triage: 0,
15
- unread: 0,
16
15
  'failed-preparation': 0,
17
16
  'todo-by-human': 0,
18
17
  'todo-by-agent': 0,
@@ -63,10 +62,10 @@ describe('useConsoleNavigation', () => {
63
62
  it('selects a tab and updates the path', () => {
64
63
  const { result } = renderHook(() => useConsoleNavigation('acme', counts()));
65
64
  act(() => {
66
- result.current.selectTab('unread');
65
+ result.current.selectTab('triage');
67
66
  });
68
- expect(result.current.activeTab).toBe('unread');
69
- expect(window.location.pathname).toBe('/projects/acme/unread');
67
+ expect(result.current.activeTab).toBe('triage');
68
+ expect(window.location.pathname).toBe('/projects/acme/triage');
70
69
  });
71
70
 
72
71
  it('opens an item and reflects it in the hash', () => {
@@ -103,7 +102,6 @@ describe('useConsoleNavigation default tab without a tab segment', () => {
103
102
  'workflow-blocker': 3,
104
103
  prs: 5,
105
104
  triage: 2,
106
- unread: 9,
107
105
  'failed-preparation': 1,
108
106
  'todo-by-human': 4,
109
107
  }),
@@ -134,14 +132,14 @@ describe('useConsoleNavigation default tab without a tab segment', () => {
134
132
  { initialProps: { tabCounts: counts() } },
135
133
  );
136
134
  expect(result.current.activeTab).toBe('workflow-blocker');
137
- rerender({ tabCounts: counts({ unread: 6 }) });
138
- expect(result.current.activeTab).toBe('unread');
135
+ rerender({ tabCounts: counts({ triage: 6 }) });
136
+ expect(result.current.activeTab).toBe('triage');
139
137
  });
140
138
 
141
139
  it('keeps the tab from the path even when counts are present', () => {
142
140
  window.history.replaceState({}, '', '/projects/acme/triage?k=token');
143
141
  const { result } = renderHook(() =>
144
- useConsoleNavigation('acme', counts({ unread: 6 })),
142
+ useConsoleNavigation('acme', counts({ triage: 6 })),
145
143
  );
146
144
  expect(result.current.activeTab).toBe('triage');
147
145
  });
@@ -2,7 +2,7 @@ import {
2
2
  findNextNonEmptyTabToRight,
3
3
  resolveDefaultActiveTab,
4
4
  } from './tabAdvance';
5
- import { CONSOLE_TABS, type ConsoleTabName } from './types';
5
+ import type { ConsoleTabName } from './types';
6
6
 
7
7
  const counts = (
8
8
  overrides: Partial<Record<ConsoleTabName, number>>,
@@ -10,7 +10,6 @@ const counts = (
10
10
  'workflow-blocker': 0,
11
11
  prs: 0,
12
12
  triage: 0,
13
- unread: 0,
14
13
  'failed-preparation': 0,
15
14
  'todo-by-human': 0,
16
15
  'todo-by-agent': 0,
@@ -18,17 +17,10 @@ const counts = (
18
17
  ...overrides,
19
18
  });
20
19
 
21
- describe('CONSOLE_TABS ordering', () => {
22
- it('places Unread before Triage so unseen items are worked first', () => {
23
- const names = CONSOLE_TABS.map((tab) => tab.name);
24
- expect(names.indexOf('unread')).toBeLessThan(names.indexOf('triage'));
25
- });
26
- });
27
-
28
20
  describe('findNextNonEmptyTabToRight', () => {
29
21
  it('returns the first non-empty tab to the right of the active tab', () => {
30
- expect(findNextNonEmptyTabToRight('prs', counts({ unread: 7 }))).toBe(
31
- 'unread',
22
+ expect(findNextNonEmptyTabToRight('prs', counts({ triage: 7 }))).toBe(
23
+ 'triage',
32
24
  );
33
25
  });
34
26
 
@@ -36,7 +28,7 @@ describe('findNextNonEmptyTabToRight', () => {
36
28
  expect(
37
29
  findNextNonEmptyTabToRight(
38
30
  'prs',
39
- counts({ triage: 0, unread: 0, 'todo-by-human': 4 }),
31
+ counts({ triage: 0, 'todo-by-human': 4 }),
40
32
  ),
41
33
  ).toBe('todo-by-human');
42
34
  });
@@ -51,14 +43,14 @@ describe('findNextNonEmptyTabToRight', () => {
51
43
  });
52
44
 
53
45
  it('returns the immediately adjacent tab when it is non-empty', () => {
54
- expect(
55
- findNextNonEmptyTabToRight('prs', counts({ triage: 12, unread: 7 })),
56
- ).toBe('unread');
46
+ expect(findNextNonEmptyTabToRight('prs', counts({ triage: 12 }))).toBe(
47
+ 'triage',
48
+ );
57
49
  });
58
50
 
59
51
  it('returns null when no tab to the right has any items', () => {
60
52
  expect(
61
- findNextNonEmptyTabToRight('unread', counts({ prs: 35 })),
53
+ findNextNonEmptyTabToRight('todo-by-human', counts({ prs: 35 })),
62
54
  ).toBeNull();
63
55
  });
64
56
 
@@ -77,7 +69,6 @@ describe('resolveDefaultActiveTab', () => {
77
69
  'workflow-blocker': 3,
78
70
  prs: 5,
79
71
  triage: 2,
80
- unread: 9,
81
72
  'failed-preparation': 1,
82
73
  'todo-by-human': 4,
83
74
  }),
@@ -145,7 +145,6 @@ export type ConsoleTabName =
145
145
  | 'workflow-blocker'
146
146
  | 'prs'
147
147
  | 'triage'
148
- | 'unread'
149
148
  | 'failed-preparation'
150
149
  | 'todo-by-human'
151
150
  | 'todo-by-agent'
@@ -166,7 +165,6 @@ export type ConsoleTab = {
166
165
  export const CONSOLE_TABS: ConsoleTab[] = [
167
166
  { name: 'workflow-blocker', label: 'Workflow Blocker' },
168
167
  { name: 'prs', label: 'Awaiting Quality Check' },
169
- { name: 'unread', label: 'Unread' },
170
168
  { name: 'triage', label: 'Triage' },
171
169
  { name: 'failed-preparation', label: 'Failed Preparation' },
172
170
  { name: 'todo-by-human', label: 'Todo by human' },
@@ -163,7 +163,7 @@ describe('ConsoleItemDetailContainer', () => {
163
163
  }));
164
164
  const { container, getByPlaceholderText, getByText } = render(
165
165
  <ConsoleItemDetailContainer
166
- tab="unread"
166
+ tab="todo-by-human"
167
167
  item={issueItem}
168
168
  caches={buildCaches()}
169
169
  operations={operations}
@@ -253,7 +253,7 @@ describe('ConsoleItemDetailContainer', () => {
253
253
  }));
254
254
  const { container, getByPlaceholderText, getByText } = render(
255
255
  <ConsoleItemDetailContainer
256
- tab="unread"
256
+ tab="todo-by-human"
257
257
  item={issueItem}
258
258
  caches={buildCaches()}
259
259
  operations={operations}
@@ -420,7 +420,7 @@ describe('ConsoleItemDetailContainer', () => {
420
420
  getByText,
421
421
  } = render(
422
422
  <ConsoleItemDetailContainer
423
- tab="unread"
423
+ tab="todo-by-human"
424
424
  item={issueItemWithRelatedPullRequest}
425
425
  caches={buildCaches({
426
426
  relatedPrs: [relatedPullRequest],
@@ -47,7 +47,7 @@ const listPayload = (tab: string) => ({
47
47
  createdAt: '2026-06-17T00:00:00.000Z',
48
48
  },
49
49
  ]
50
- : tab === 'unread'
50
+ : tab === 'todo-by-human'
51
51
  ? [
52
52
  {
53
53
  number: 866,
@@ -60,7 +60,7 @@ const listPayload = (tab: string) => ({
60
60
  isPr: false,
61
61
  relatedOpenPullRequestUrls: [],
62
62
  story: 'TDPM Console port',
63
- status: 'Unread',
63
+ status: 'Todo by human',
64
64
  nextActionDate: null,
65
65
  nextActionHour: null,
66
66
  dependedIssueUrls: [],
@@ -271,7 +271,7 @@ describe('ConsolePage', () => {
271
271
  expect(getByText('Add serveConsole subcommand')).toBeInTheDocument();
272
272
  });
273
273
 
274
- fireEvent.click(getByText('Unread'));
274
+ fireEvent.click(getByText('Todo by human'));
275
275
  await waitFor(() => {
276
276
  expect(
277
277
  getByText('Notify finished issue preparation'),
@@ -288,10 +288,9 @@ describe('ConsolePage', () => {
288
288
  });
289
289
  const tabs = within(tabBar());
290
290
  expect(tabs.queryByText('Awaiting Quality Check')).not.toBeNull();
291
- expect(tabs.queryByText('Unread')).not.toBeNull();
291
+ expect(tabs.queryByText('Todo by human')).not.toBeNull();
292
292
  expect(tabs.queryByText('Triage')).toBeNull();
293
293
  expect(tabs.queryByText('Failed Preparation')).toBeNull();
294
- expect(tabs.queryByText('Todo by human')).toBeNull();
295
294
  });
296
295
 
297
296
  it('does not render the project header bar above the tab bar', async () => {
@@ -855,7 +854,7 @@ describe('ConsolePage auto-advance tab', () => {
855
854
  });
856
855
  expect(
857
856
  within(tabBar())
858
- .getByText('Unread')
857
+ .getByText('Todo by human')
859
858
  .closest('a')
860
859
  ?.getAttribute('aria-current'),
861
860
  ).toBe('page');