Skip to content

Commit 348ca23

Browse files
committed
feat(core): display batch tasks in the tui
1 parent c71e11c commit 348ca23

File tree

56 files changed

+5132
-1007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+5132
-1007
lines changed

packages/nx/src/native/tui/action.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use crate::native::tasks::types::{Task, TaskResult};
22

3-
use super::{app::{BatchInfo, BatchStatus, Focus}, components::tasks_list::TaskStatus};
3+
use super::{
4+
app::{BatchInfo, Focus},
5+
components::tasks_list::{BatchStatus, TaskStatus},
6+
};
47

58
#[derive(Debug, Clone, PartialEq, Eq)]
69
pub enum Action {
@@ -38,5 +41,6 @@ pub enum Action {
3841
EndCommand,
3942
StartBatch(String, BatchInfo),
4043
UpdateBatchStatus(String, BatchStatus),
41-
AppendBatchOutput(String, String),
44+
ExpandBatch(String),
45+
CollapseBatch(String),
4246
}

packages/nx/src/native/tui/app.rs

Lines changed: 524 additions & 118 deletions
Large diffs are not rendered by default.

packages/nx/src/native/tui/components/snapshots/nx__native__tui__components__tasks_list__tests__all_tasks_in_progress.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ expression: terminal.backend()
55
" "
66
" NX Running Test Tasks... Cache Duration"
77
""
8-
" │⠋ task1 ... <1ms"
8+
">│⠋ task1 ... <1ms"
99
" │⠋ task2 ... <1ms"
10-
">│⠋ task3 ... <1ms"
10+
" │⠋ task3 ... <1ms"
1111
""
1212
" "
1313
" "
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Completed Test Batch Completion (45.0s) Cache Duration"
7+
" "
8+
"> ✔ lib:build Remote <1ms"
9+
" ✔ app:build Local <1ms"
10+
" "
11+
" "
12+
" "
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Running Test Batch Completion... Cache Duration"
7+
""
8+
">│⠋ ▼ batch1 (2) "
9+
" │⠋ app:build ... <1ms"
10+
" │⠋ lib:build ... <1ms"
11+
""
12+
" "
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Running Batch Display Test... Cache Duration"
7+
""
8+
" │⠋ standalone:test ... <1ms"
9+
" │⠋ ▼ batch1 (2) "
10+
">│⠋ app:build ... <1ms"
11+
" │⠋ lib:build ... <1ms"
12+
""
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" "
20+
" "
21+
" "
22+
" "
23+
" "
24+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Running Batch Display Test... Cache Duration"
7+
""
8+
">│⠋ app:build ... <1ms"
9+
" │⠋ lib:build ... <1ms"
10+
" │⠋ standalone:test ... <1ms"
11+
""
12+
" "
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" "
20+
" "
21+
" "
22+
" "
23+
" "
24+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Running Batch Display Test... Cache Duration"
7+
""
8+
" │⠋ standalone:test ... <1ms"
9+
">│⠋ ▶ batch1 (2) "
10+
" │· Waiting for task... "
11+
""
12+
" "
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" "
20+
" "
21+
" "
22+
" "
23+
" "
24+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Running Batch Display Test... Cache Duration"
7+
""
8+
" │⠋ standalone:test ... <1ms"
9+
" │⠋ ▼ batch1 (2) "
10+
" │⠋ app:build ... <1ms"
11+
">│⠋ lib:build ... <1ms"
12+
""
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" "
20+
" "
21+
" "
22+
" "
23+
" "
24+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
source: packages/nx/src/native/tui/components/tasks_list.rs
3+
expression: terminal.backend()
4+
---
5+
" "
6+
" NX Running Batch Display Test... Cache Duration"
7+
""
8+
" │⠋ standalone:test ... <1ms"
9+
">│⠋ ▼ batch1 (2) "
10+
" │⠋ app:build ... <1ms"
11+
" │⠋ lib:build ... <1ms"
12+
""
13+
" "
14+
" "
15+
" "
16+
" "
17+
" "
18+
" "
19+
" "
20+
" "
21+
" "
22+
" "
23+
" "
24+
" quit: q help: ? navigate: ↑ ↓ filter: / pin output: 1 or 2 show output: <enter>"

0 commit comments

Comments
 (0)