Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Dec 3, 2025

Adds support for Batch tasks and displays them in the TUI.

@leosvelperez leosvelperez self-assigned this Dec 3, 2025
@vercel
Copy link

vercel bot commented Dec 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
nx-dev Ready Ready Preview Jan 23, 2026 5:02pm

Request Review

@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit cf050c9
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6973a8868353880008362e12
😎 Deploy Preview https://deploy-preview-33695--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Dec 3, 2025

View your CI Pipeline Execution ↗ for commit cf050c9

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 30m 55s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 45s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 3s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-23 18:41:34 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Dec 3, 2025

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-33695-7dbda8d
Release details 📑
Published version 0.0.0-pr-33695-7dbda8d
Triggered by @leosvelperez
Branch nxc-2472
Commit 7dbda8d
Workflow run 19900725724

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-33695-fe57a5a
Release details 📑
Published version 0.0.0-pr-33695-fe57a5a
Triggered by @leosvelperez
Branch nxc-2472
Commit fe57a5a
Workflow run 19937294541

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

nx-cloud[bot]

This comment was marked as outdated.

nx-cloud[bot]

This comment was marked as outdated.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx [email protected] my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-33695-e5b8a29
Release details 📑
Published version 0.0.0-pr-33695-e5b8a29
Triggered by @leosvelperez
Branch nxc-2472
Commit e5b8a29
Workflow run 20063765504

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

nx-cloud[bot]

This comment was marked as outdated.

leosvelperez and others added 12 commits January 23, 2026 10:02
Replace the SelectionState enum with Option<Selection> for better idiomatic Rust code. This eliminates unnecessary complexity since the enum only had two variants that map directly to Option's Some and None.
Move selection restoration from handle_batch_complete in app.rs into
ungroup_batch_tasks in tasks_list.rs. Add find_last_completed_task
helper to select task with latest end_time. Add find_batch_group test
helper to reduce boilerplate.
- Remove duplicate Selection type, use SelectionEntry directly
- Remove PaneSelection and SelectedItemType (unnecessary abstractions)
- Consolidate THROBBER_CHARS constant in status_icons.rs
- Simplify selection state handling throughout
…o Rust

- Add BatchStatus enum to lifecycle.rs with #[napi(string_enum)]
- Import BatchInfo and BatchStatus from native in life-cycle.ts
- Update set_batch_status to use BatchStatus enum instead of strings
- Cleaner match expression instead of string comparisons
- Update StoredBatchState and CompletedBatchInfo to use BatchStatus
- Update handle_batch_complete to take BatchStatus directly
- Simplify set_batch_status by passing BatchStatus through
- Add From<BatchStatus> for TaskStatus conversion for rendering
- Make THROBBER_CHARS private to status_icons module
- Add get_batch_status_char function for batch status rendering
- Consolidate duplicate imports in tasks_list.rs
Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud is proposing a fix for your failed CI:

These changes fix the Rust compilation errors introduced during the batch task display refactoring. We restore the missing Event import that was accidentally removed, complete the field rename from selected_task to selected_item that was missed in one location, and add the necessary String conversion for the register_pty_instance call.

Tip

We verified this fix by re-running nx:build-native.

Suggested Fix changes
diff --git a/packages/nx/src/native/tui/inline_app.rs b/packages/nx/src/native/tui/inline_app.rs
index f9484b070a..296a2d9f5a 100644
--- a/packages/nx/src/native/tui/inline_app.rs
+++ b/packages/nx/src/native/tui/inline_app.rs
@@ -222,7 +222,7 @@ impl InlineApp {
         let mut state = self.core.state().lock();
 
         // Collect task IDs to avoid holding immutable borrow during mutation
-        let task_id = self.selected_task.clone();
+        let task_id = self.selected_item.clone();
 
         let task_id = if let Some(task_id) = task_id {
             task_id
@@ -247,7 +247,7 @@ impl InlineApp {
                 // Clone the PTY instance, resize it, and replace the Arc
                 let mut pty_clone = pty_arc.as_ref().clone();
                 if let Ok(()) = pty_clone.resize(rows, cols) {
-                    state.register_pty_instance(task_id, Arc::new(pty_clone));
+                    state.register_pty_instance(task_id.to_string(), Arc::new(pty_clone));
                 }
             }
         }
diff --git a/packages/nx/src/native/tui/lifecycle.rs b/packages/nx/src/native/tui/lifecycle.rs
index 284aef83db..c372e650b5 100644
--- a/packages/nx/src/native/tui/lifecycle.rs
+++ b/packages/nx/src/native/tui/lifecycle.rs
@@ -22,7 +22,7 @@ use super::components::tasks_list::TaskStatus;
 use super::config::{AutoExit, TuiCliArgs as RustTuiCliArgs, TuiConfig as RustTuiConfig};
 use super::inline_app::InlineApp;
 #[cfg(not(test))]
-use super::tui::Tui;
+use super::tui::{Event, Tui};
 use super::tui_app::TuiApp;
 use super::tui_state::TuiState;
 

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally Hfpf-tVP6

Apply fix locally with your editor ↗   View interactive diff ↗


🎓 Learn more about Self-Healing CI on nx.dev

- Change selected_item from Option<String> to Option<SelectionEntry>
- Simplify resize_selected_pty to return Option<()> for ? operator
- Use is_some_and instead of map_or(false, ...)
- Add set_batch_status implementation to InlineApp to update batch_metadata
- Update render_inline_status to check SelectionEntry type for proper status
- Add get_selected_item() and get_focused_pane_item() methods returning SelectionEntry
- Simplify lifecycle.rs mode switching to use SelectionEntry directly
@FrozenPandaz FrozenPandaz merged commit a15881d into master Jan 23, 2026
21 of 22 checks passed
@FrozenPandaz FrozenPandaz deleted the nxc-2472 branch January 23, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants