Skip to content

Commit 29f9e76

Browse files
FrozenPandazclaude
andauthored
feat(core): add comprehensive dependency tracking with continuous task support (#31861)
## Current Behavior When tasks are pending (not started yet), the TUI shows an empty terminal pane with no information about why the task is waiting. Users have no visibility into task dependencies or their status. ## Expected Behavior When a task is pending, the TUI now displays a comprehensive dependency view showing: - Progress header indicating how many dependencies are complete vs total - Scrollable list of all dependencies (direct and transitive) with real-time status updates - Support for continuous tasks where InProgress/Stopped are considered complete - Keyboard navigation (arrow keys, j/k vim keys, page up/down) - Dependencies sorted by complexity (most dependencies first), then alphabetically ### Dependencies Pending ![image](https://github.com/user-attachments/assets/c704dac9-500c-4ff8-a658-24fd23276a29) ### Dependencies Ready but waiting for thread ![image](https://github.com/user-attachments/assets/834dcbc8-6801-4392-b047-0c5115a5ad06) ### Scrollable ![image](https://github.com/user-attachments/assets/338c4486-6268-48c2-a91c-cfa282101565) ## Related Issue(s) This enhancement improves the TUI experience by providing clear visibility into task dependencies, making it easier to understand build pipelines and debug issues. --------- Co-authored-by: Claude <[email protected]>
1 parent be6d35b commit 29f9e76

File tree

13 files changed

+913
-143
lines changed

13 files changed

+913
-143
lines changed

packages/nx/src/native/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export declare class ExternalObject<T> {
88
}
99
}
1010
export declare class AppLifeCycle {
11-
constructor(tasks: Array<Task>, initiatingTasks: Array<string>, runMode: RunMode, pinnedTasks: Array<string>, tuiCliArgs: TuiCliArgs, tuiConfig: TuiConfig, titleText: string, workspaceRoot: string)
11+
constructor(tasks: Array<Task>, initiatingTasks: Array<string>, runMode: RunMode, pinnedTasks: Array<string>, tuiCliArgs: TuiCliArgs, tuiConfig: TuiConfig, titleText: string, workspaceRoot: string, taskGraph: TaskGraph)
1212
startCommand(threadCount?: number | undefined | null): void
1313
scheduleTask(task: Task): void
1414
startTasks(tasks: Array<Task>, metadata: object): void
@@ -322,6 +322,7 @@ export interface TaskGraph {
322322
roots: Array<string>
323323
tasks: Record<string, Task>
324324
dependencies: Record<string, Array<string>>
325+
continuousDependencies: Record<string, Array<string>>
325326
}
326327

327328
export interface TaskResult {

packages/nx/src/native/logger/console.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::native::logger::enable_logger;
2-
use tracing::{debug, error};
2+
use tracing::debug;
33

44
#[napi]
55
pub fn log_debug(message: String) {

packages/nx/src/native/tasks/types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ pub struct TaskGraph {
4040
pub roots: Vec<String>,
4141
pub tasks: HashMap<String, Task>,
4242
pub dependencies: HashMap<String, Vec<String>>,
43+
pub continuous_dependencies: HashMap<String, Vec<String>>,
4344
}
4445

4546
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]

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

Lines changed: 242 additions & 115 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use super::{
1010
};
1111

1212
pub mod countdown_popup;
13+
pub mod dependency_view;
1314
pub mod help_popup;
1415
pub mod help_text;
1516
pub mod layout_manager;

0 commit comments

Comments
 (0)