feat(core): add inline-tui view mode#32718
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
View your CI Pipeline Execution ↗ for commit 24a67fc
☁️ Nx Cloud last updated this comment at |
6da27bd to
cf657ff
Compare
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Failed to publish a PR release of this pull request, triggered by @AgentEnder. |
4a89831 to
50bcd15
Compare
50bcd15 to
df3321e
Compare
🐳 We have a release for that!This PR has a release associated with it. You can try it out using this command: npx create-nx-workspace@0.0.0-pr-32718-f806144 my-workspaceOr just copy this version and use it in your own command: 0.0.0-pr-32718-f806144
To request a new release for this pull request, mention someone from the Nx team or the |
9d4f72a to
0d65b91
Compare
| } | ||
|
|
||
| /// Get the shared state Arc (for mode switching) | ||
| pub fn get_state(&self) -> Arc<Mutex<TuiState>> { |
| /// This creates both the state and the app in one call. | ||
| /// Prefer using `with_state()` for new code, especially when mode switching is needed. | ||
| #[allow(dead_code)] | ||
| pub fn new( |
| pub fn start_command(&mut self, thread_count: Option<u32>) -> napi::Result<()> { | ||
| self.app.lock().start_command(thread_count); | ||
|
|
||
| self.app.with_app(|tui_app| { |
There was a problem hiding this comment.
WHy do we need with_app? rather than like.. self.app.start_command?
| /// tui_app.start_command(None); | ||
| /// }); | ||
| /// ``` | ||
| fn with_app<F, R>(&self, f: F) -> R |
There was a problem hiding this comment.
I don't think this is necessary? self.app can be Arc<Mutex>
| if let Err(r) = t.exit() { | ||
| debug!("Unable to exit Terminal: {:?}", r); | ||
| // Only try to restore terminal if it's still in raw mode | ||
| if crossterm::terminal::is_raw_mode_enabled().unwrap_or(false) { |
There was a problem hiding this comment.
Don't check this out here, check it inside of TUi exit
| // === Interactive Mode Methods === | ||
|
|
||
| /// Check if the current task can be interactive (has a PTY writer) | ||
| fn can_be_interactive(&self) -> bool { |
There was a problem hiding this comment.
This should be shareable
|
|
||
| if matches!(key.code, KeyCode::F(12)) { | ||
| // Toggle debug mode on F12 | ||
| self.dispatch_action(Action::ToggleDebugMode); |
There was a problem hiding this comment.
fyi, this doesn't work. but we can follow for it
| // start_tasks uses trait default which calls on_tasks_started | ||
|
|
||
| // === PTY Registration (hooks for trait defaults) === | ||
|
|
There was a problem hiding this comment.
this could probably be 1 function
|
|
||
| // Build left side: NX logo + status icon + task name | ||
| let left_spans = vec
Current Behavior
When running single tasks we have a "minimal" tui, but that minimal tui still makes it really hard / impossible to use some of the terminals built in features... like:
Expected Behavior
When running single tasks we can use an inline viewport to render some tui widgets at the bottom of the viewport, and terminal output can be printed above.
Related Issue(s)
Fixes #