@allpepper/task-orchestrator-tui 1.0.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/README.md +78 -0
- package/package.json +54 -0
- package/src/tui/app.tsx +308 -0
- package/src/tui/components/column-filter-bar.tsx +52 -0
- package/src/tui/components/confirm-dialog.tsx +45 -0
- package/src/tui/components/dependency-list.tsx +115 -0
- package/src/tui/components/empty-state.tsx +28 -0
- package/src/tui/components/entity-table.tsx +120 -0
- package/src/tui/components/error-message.tsx +41 -0
- package/src/tui/components/feature-kanban-card.tsx +216 -0
- package/src/tui/components/footer.tsx +34 -0
- package/src/tui/components/form-dialog.tsx +338 -0
- package/src/tui/components/header.tsx +54 -0
- package/src/tui/components/index.ts +16 -0
- package/src/tui/components/kanban-board.tsx +335 -0
- package/src/tui/components/kanban-card.tsx +70 -0
- package/src/tui/components/kanban-column.tsx +173 -0
- package/src/tui/components/priority-badge.tsx +16 -0
- package/src/tui/components/section-list.tsx +96 -0
- package/src/tui/components/status-actions.tsx +87 -0
- package/src/tui/components/status-badge.tsx +22 -0
- package/src/tui/components/tree-view.tsx +295 -0
- package/src/tui/components/view-mode-chips.tsx +23 -0
- package/src/tui/index.tsx +33 -0
- package/src/tui/screens/dashboard.tsx +248 -0
- package/src/tui/screens/feature-detail.tsx +312 -0
- package/src/tui/screens/index.ts +6 -0
- package/src/tui/screens/kanban-view.tsx +251 -0
- package/src/tui/screens/project-detail.tsx +305 -0
- package/src/tui/screens/project-view.tsx +498 -0
- package/src/tui/screens/search.tsx +257 -0
- package/src/tui/screens/task-detail.tsx +294 -0
- package/src/ui/adapters/direct.ts +429 -0
- package/src/ui/adapters/index.ts +14 -0
- package/src/ui/adapters/types.ts +269 -0
- package/src/ui/context/adapter-context.tsx +31 -0
- package/src/ui/context/theme-context.tsx +43 -0
- package/src/ui/hooks/index.ts +20 -0
- package/src/ui/hooks/use-data.ts +919 -0
- package/src/ui/hooks/use-debounce.ts +37 -0
- package/src/ui/hooks/use-feature-kanban.ts +151 -0
- package/src/ui/hooks/use-kanban.ts +96 -0
- package/src/ui/hooks/use-navigation.tsx +94 -0
- package/src/ui/index.ts +73 -0
- package/src/ui/lib/colors.ts +79 -0
- package/src/ui/lib/format.ts +114 -0
- package/src/ui/lib/types.ts +157 -0
- package/src/ui/themes/dark.ts +63 -0
- package/src/ui/themes/light.ts +63 -0
- package/src/ui/themes/types.ts +71 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import type { Task, Feature, Priority } from 'task-orchestrator-bun/src/domain/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Navigation screens for the TUI
|
|
5
|
+
*/
|
|
6
|
+
export enum Screen {
|
|
7
|
+
Dashboard = 'dashboard',
|
|
8
|
+
ProjectView = 'project-view',
|
|
9
|
+
FeatureView = 'feature-view',
|
|
10
|
+
TaskDetail = 'task-detail',
|
|
11
|
+
Search = 'search',
|
|
12
|
+
Help = 'help',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Screen parameters for navigation
|
|
17
|
+
*/
|
|
18
|
+
export interface ScreenParams {
|
|
19
|
+
[Screen.Dashboard]: Record<string, never>;
|
|
20
|
+
[Screen.ProjectView]: { projectId: string };
|
|
21
|
+
[Screen.FeatureView]: { featureId: string };
|
|
22
|
+
[Screen.TaskDetail]: { taskId: string };
|
|
23
|
+
[Screen.Search]: { query?: string };
|
|
24
|
+
[Screen.Help]: Record<string, never>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Navigation state with screen stack
|
|
29
|
+
*/
|
|
30
|
+
export interface NavigationState {
|
|
31
|
+
stack: Array<{
|
|
32
|
+
screen: Screen;
|
|
33
|
+
params: Record<string, unknown>;
|
|
34
|
+
}>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Keyboard shortcut definition
|
|
39
|
+
*/
|
|
40
|
+
export interface Shortcut {
|
|
41
|
+
key: string;
|
|
42
|
+
label: string;
|
|
43
|
+
action: () => void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Generic tree node for hierarchical data
|
|
48
|
+
*/
|
|
49
|
+
export interface TreeNode<T> {
|
|
50
|
+
data: T;
|
|
51
|
+
children: TreeNode<T>[];
|
|
52
|
+
expanded: boolean;
|
|
53
|
+
level: number;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Feature with nested tasks for tree view
|
|
58
|
+
*/
|
|
59
|
+
export interface FeatureWithTasks extends Feature {
|
|
60
|
+
tasks: Task[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Kanban board task with optional feature label
|
|
65
|
+
*/
|
|
66
|
+
export interface BoardTask extends Task {
|
|
67
|
+
featureName?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Kanban board card definition
|
|
72
|
+
*/
|
|
73
|
+
export interface BoardCard {
|
|
74
|
+
id: string;
|
|
75
|
+
title: string;
|
|
76
|
+
featureName: string | null;
|
|
77
|
+
priority: Priority;
|
|
78
|
+
task: BoardTask;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Kanban board column definition
|
|
83
|
+
*/
|
|
84
|
+
export interface BoardColumn {
|
|
85
|
+
id: string;
|
|
86
|
+
title: string;
|
|
87
|
+
status: string;
|
|
88
|
+
tasks: BoardTask[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Search result types
|
|
93
|
+
*/
|
|
94
|
+
export interface SearchResults {
|
|
95
|
+
projects: Array<{ id: string; name: string; summary: string }>;
|
|
96
|
+
features: Array<{ id: string; name: string; summary: string; projectId?: string }>;
|
|
97
|
+
tasks: Array<{ id: string; title: string; summary: string; projectId?: string; featureId?: string }>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Dependency information for a task
|
|
102
|
+
*/
|
|
103
|
+
export interface DependencyInfo {
|
|
104
|
+
blockedBy: Task[];
|
|
105
|
+
blocks: Task[];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Project overview data
|
|
110
|
+
*/
|
|
111
|
+
export interface ProjectOverview {
|
|
112
|
+
project: {
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
summary: string;
|
|
116
|
+
status: string;
|
|
117
|
+
};
|
|
118
|
+
taskCounts: {
|
|
119
|
+
total: number;
|
|
120
|
+
byStatus: Record<string, number>;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Feature overview data
|
|
126
|
+
*/
|
|
127
|
+
export interface FeatureOverview {
|
|
128
|
+
feature: {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
summary: string;
|
|
132
|
+
status: string;
|
|
133
|
+
priority: Priority;
|
|
134
|
+
};
|
|
135
|
+
taskCounts: {
|
|
136
|
+
total: number;
|
|
137
|
+
byStatus: Record<string, number>;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Feature card for the feature-based Kanban board
|
|
143
|
+
*/
|
|
144
|
+
export interface BoardFeature extends Feature {
|
|
145
|
+
tasks: Task[];
|
|
146
|
+
taskCounts: { total: number; completed: number };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Column in the feature-based Kanban board
|
|
151
|
+
*/
|
|
152
|
+
export interface FeatureBoardColumn {
|
|
153
|
+
id: string;
|
|
154
|
+
title: string;
|
|
155
|
+
status: string;
|
|
156
|
+
features: BoardFeature[];
|
|
157
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Theme } from './types';
|
|
2
|
+
import { Priority } from 'task-orchestrator-bun/src/domain/types';
|
|
3
|
+
|
|
4
|
+
export const darkTheme: Theme = {
|
|
5
|
+
name: 'dark',
|
|
6
|
+
colors: {
|
|
7
|
+
// Base colors
|
|
8
|
+
background: '#1a1a2e',
|
|
9
|
+
foreground: '#eaeaea',
|
|
10
|
+
muted: '#6b6b8d',
|
|
11
|
+
border: '#3d3d5c',
|
|
12
|
+
|
|
13
|
+
// Status colors (unique keys only)
|
|
14
|
+
status: {
|
|
15
|
+
// Project/Feature/Task shared
|
|
16
|
+
PLANNING: '#a0a0c0',
|
|
17
|
+
IN_DEVELOPMENT: '#4da6ff',
|
|
18
|
+
ON_HOLD: '#cc9966',
|
|
19
|
+
CANCELLED: '#808080',
|
|
20
|
+
COMPLETED: '#4ade80',
|
|
21
|
+
ARCHIVED: '#555555',
|
|
22
|
+
|
|
23
|
+
// Feature/Task shared
|
|
24
|
+
TESTING: '#66cccc',
|
|
25
|
+
BLOCKED: '#ff6666',
|
|
26
|
+
DEPLOYED: '#34d399',
|
|
27
|
+
|
|
28
|
+
// Feature only
|
|
29
|
+
DRAFT: '#6b6b8d',
|
|
30
|
+
VALIDATING: '#66cc99',
|
|
31
|
+
PENDING_REVIEW: '#b366ff',
|
|
32
|
+
|
|
33
|
+
// Task only
|
|
34
|
+
BACKLOG: '#6b6b8d',
|
|
35
|
+
PENDING: '#a0a0c0',
|
|
36
|
+
IN_PROGRESS: '#4da6ff',
|
|
37
|
+
IN_REVIEW: '#b366ff',
|
|
38
|
+
CHANGES_REQUESTED: '#ff9966',
|
|
39
|
+
READY_FOR_QA: '#66cc99',
|
|
40
|
+
INVESTIGATING: '#ffcc66',
|
|
41
|
+
DEFERRED: '#999999',
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// Priority colors
|
|
45
|
+
priority: {
|
|
46
|
+
[Priority.HIGH]: '#ff6b6b',
|
|
47
|
+
[Priority.MEDIUM]: '#ffd93d',
|
|
48
|
+
[Priority.LOW]: '#6bcb77',
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// Semantic colors
|
|
52
|
+
accent: '#4da6ff',
|
|
53
|
+
success: '#4ade80',
|
|
54
|
+
warning: '#ffd93d',
|
|
55
|
+
error: '#ff6b6b',
|
|
56
|
+
danger: '#ff6666',
|
|
57
|
+
info: '#66cccc',
|
|
58
|
+
|
|
59
|
+
// Interactive colors
|
|
60
|
+
selection: '#4a4a7a',
|
|
61
|
+
highlight: '#6060a0',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Theme } from './types';
|
|
2
|
+
import { Priority } from 'task-orchestrator-bun/src/domain/types';
|
|
3
|
+
|
|
4
|
+
export const lightTheme: Theme = {
|
|
5
|
+
name: 'light',
|
|
6
|
+
colors: {
|
|
7
|
+
// Base colors
|
|
8
|
+
background: '#ffffff',
|
|
9
|
+
foreground: '#1a1a2e',
|
|
10
|
+
muted: '#6b7280',
|
|
11
|
+
border: '#e5e7eb',
|
|
12
|
+
|
|
13
|
+
// Status colors (unique keys only)
|
|
14
|
+
status: {
|
|
15
|
+
// Project/Feature/Task shared
|
|
16
|
+
PLANNING: '#6b7280',
|
|
17
|
+
IN_DEVELOPMENT: '#3b82f6',
|
|
18
|
+
ON_HOLD: '#d97706',
|
|
19
|
+
CANCELLED: '#6b7280',
|
|
20
|
+
COMPLETED: '#16a34a',
|
|
21
|
+
ARCHIVED: '#9ca3af',
|
|
22
|
+
|
|
23
|
+
// Feature/Task shared
|
|
24
|
+
TESTING: '#06b6d4',
|
|
25
|
+
BLOCKED: '#ef4444',
|
|
26
|
+
DEPLOYED: '#22c55e',
|
|
27
|
+
|
|
28
|
+
// Feature only
|
|
29
|
+
DRAFT: '#9ca3af',
|
|
30
|
+
VALIDATING: '#14b8a6',
|
|
31
|
+
PENDING_REVIEW: '#8b5cf6',
|
|
32
|
+
|
|
33
|
+
// Task only
|
|
34
|
+
BACKLOG: '#9ca3af',
|
|
35
|
+
PENDING: '#6b7280',
|
|
36
|
+
IN_PROGRESS: '#3b82f6',
|
|
37
|
+
IN_REVIEW: '#8b5cf6',
|
|
38
|
+
CHANGES_REQUESTED: '#f97316',
|
|
39
|
+
READY_FOR_QA: '#14b8a6',
|
|
40
|
+
INVESTIGATING: '#eab308',
|
|
41
|
+
DEFERRED: '#9ca3af',
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// Priority colors
|
|
45
|
+
priority: {
|
|
46
|
+
[Priority.HIGH]: '#dc2626',
|
|
47
|
+
[Priority.MEDIUM]: '#ca8a04',
|
|
48
|
+
[Priority.LOW]: '#16a34a',
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
// Semantic colors
|
|
52
|
+
accent: '#2563eb',
|
|
53
|
+
success: '#16a34a',
|
|
54
|
+
warning: '#ca8a04',
|
|
55
|
+
error: '#dc2626',
|
|
56
|
+
danger: '#dc2626',
|
|
57
|
+
info: '#0891b2',
|
|
58
|
+
|
|
59
|
+
// Interactive colors
|
|
60
|
+
selection: '#dbeafe',
|
|
61
|
+
highlight: '#bfdbfe',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Priority } from 'task-orchestrator-bun/src/domain/types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* All possible status values across Project, Feature, and Task
|
|
5
|
+
* Using string literal union to avoid duplicate key issues
|
|
6
|
+
*/
|
|
7
|
+
export type StatusKey =
|
|
8
|
+
// Project statuses
|
|
9
|
+
| 'PLANNING'
|
|
10
|
+
| 'IN_DEVELOPMENT'
|
|
11
|
+
| 'ON_HOLD'
|
|
12
|
+
| 'CANCELLED'
|
|
13
|
+
| 'COMPLETED'
|
|
14
|
+
| 'ARCHIVED'
|
|
15
|
+
// Feature-only statuses
|
|
16
|
+
| 'DRAFT'
|
|
17
|
+
| 'TESTING'
|
|
18
|
+
| 'VALIDATING'
|
|
19
|
+
| 'PENDING_REVIEW'
|
|
20
|
+
| 'BLOCKED'
|
|
21
|
+
| 'DEPLOYED'
|
|
22
|
+
// Task-only statuses
|
|
23
|
+
| 'BACKLOG'
|
|
24
|
+
| 'PENDING'
|
|
25
|
+
| 'IN_PROGRESS'
|
|
26
|
+
| 'IN_REVIEW'
|
|
27
|
+
| 'CHANGES_REQUESTED'
|
|
28
|
+
| 'READY_FOR_QA'
|
|
29
|
+
| 'INVESTIGATING'
|
|
30
|
+
| 'DEFERRED';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Theme interface for the Task Orchestrator UI
|
|
34
|
+
* Supports both TUI (terminal) and web renderers
|
|
35
|
+
*/
|
|
36
|
+
export interface Theme {
|
|
37
|
+
name: 'dark' | 'light';
|
|
38
|
+
colors: {
|
|
39
|
+
// Base colors
|
|
40
|
+
background: string;
|
|
41
|
+
foreground: string;
|
|
42
|
+
muted: string;
|
|
43
|
+
border: string;
|
|
44
|
+
|
|
45
|
+
// Status colors - maps all unique status values
|
|
46
|
+
status: Record<StatusKey, string>;
|
|
47
|
+
|
|
48
|
+
// Priority colors
|
|
49
|
+
priority: Record<Priority, string>;
|
|
50
|
+
|
|
51
|
+
// Semantic colors
|
|
52
|
+
accent: string;
|
|
53
|
+
success: string;
|
|
54
|
+
warning: string;
|
|
55
|
+
error: string;
|
|
56
|
+
danger: string;
|
|
57
|
+
info: string;
|
|
58
|
+
|
|
59
|
+
// Interactive colors
|
|
60
|
+
selection: string;
|
|
61
|
+
highlight: string;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Task counts structure used in overviews
|
|
67
|
+
*/
|
|
68
|
+
export interface TaskCounts {
|
|
69
|
+
total: number;
|
|
70
|
+
byStatus: Record<string, number>;
|
|
71
|
+
}
|