nx
nx copied to clipboard
TUI: Unable to scroll
Current Behavior
Using: The new Terminal UI with iTerm2 on MacOS Issue: I cannot scroll (with my mouse) through the output, navigation with keyboard works. When I scroll using my mouse, I'm scrolling the full terminal output, thus moving the TUI out of view.
Expected Behavior
I would like to be able to scroll through my terminal output using the mouse
GitHub Repo
No response
Steps to Reproduce
- Open iTerm2
- Start some tasks (f.e.
npx nx run-many -t serve,test -p your-app) - Make sure you have enough output so the scroll bar appears
- Try to scroll using your mouse (both in interactive and non-interactive mode)
Nx Report
Node : 23.11.0
OS : darwin-arm64
Native Target : aarch64-macos
npm : 11.3.0
nx : 21.0.3
@nx/js : 21.0.3
@nx/jest : 21.0.3
@nx/eslint : 21.0.3
@nx/workspace : 21.0.3
@nx/angular : 21.0.3
@nx/cypress : 21.0.3
@nx/devkit : 21.0.3
@nx/eslint-plugin : 21.0.3
@nx/express : 21.0.3
@nx/module-federation : 21.0.3
@nx/node : 21.0.3
@nx/playwright : 21.0.3
@nx/rspack : 21.0.3
@nx/storybook : 21.0.3
@nx/web : 21.0.3
@nx/webpack : 21.0.3
typescript : 5.7.3
---------------------------------------
Community plugins:
@ngneat/spectator : 19.5.0
@ngrx/component-store : 19.1.0
@ngrx/effects : 19.1.0
@ngrx/eslint-plugin : 19.0.0
@ngrx/operators : 19.1.0
@ngrx/signals : 19.1.0
@ngrx/store : 19.1.0
@ngrx/store-devtools : 19.1.0
@ngxs/storage-plugin : 19.0.0
@ngxs/store : 19.0.0
@storybook/angular : 8.6.12
apollo-angular : 10.0.3
ng-mocks : 14.13.4
---------------------------------------
Cache Usage: 14.20 MB / 46.04 GB
Failure Logs
Package Manager Version
No response
Operating System
- [x] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response
Is https://github.com/nrwl/nx/pull/31163 fixing it @FrozenPandaz ?
I cannot reproduce this on iTerm2 on macOS, my iTerm window never scrolls only my terminal output
@jogelin Can you reproduce?
Same for me, in interactive mode with mouse reporting no scroll with mouse and selecting text includes the TUI characters
Experiencing the exact same thing when scrolling the new TUI with iTerm2 on MacOS
Same issue. using iTerm2, tmux and nx TUI. keyboard j/k can move up/down though.
Same issue here. I'm using Ubuntu 24. Disabling it until this is fixed.
I also was facing this on MacOS with iTerm2. If you navigate to Settings -> Advanced and set "Scroll wheel sends arrow keys when in alternate screen mode." to "Yes", scrolling should start working.
The one thing that is still not ideal is that you have to actually focus the target output you want to scroll before the scrolling will happen on that output. It would be great if the mouse hover location was enough to scroll the right output.
I can't scroll at all in the IDE (Windows) or in Ubuntu's terminal using the mouse.
"...use the arrow keys to scroll up and down in the output" (https://nx.dev/blog/nx-21-terminal-ui#a-clear-overview-of-projects)
This is terrible! How am I supposed to scroll through hundreds of lines just to get back to the top?
@Anomnimel you can disable TUI with --no-tui switch.
Saved me.
Or downgrade nx to "nx": "21.2.4", where scrolling works even in the TUI
+1, doesn't work for "watch" related tasks in vscode terminal / cc @JamesHenry
env:
- zsh
- macos
- nx: 21.3.10
repro:
https://github.com/microsoft/fluentui-contrib/pull/453
- undo this change https://github.com/microsoft/fluentui-contrib/pull/453/files#diff-2075dfe246c4bb78730d2ec71169b4cd707ad64bf21583aeb5476d6e174b9ec3L45
- run
NX_TUI=true yarn nx run nx-plugin:test --watch
demo:
https://github.com/user-attachments/assets/7e36d9f7-282a-4b59-bcdf-59411ce62978
- unable to scroll up via mouse / keyboard
My main issue with this is that now I can't copy terminal output without it being polluted by "bars".
Example:
█
info: ⏱ Cron jobs disabled - skipped setup. {"service":"api-client"} █
info: 📃 Emitted schema file to ./apps/api-client/src/schema.graphql {"s █
ce":"api-client"}
Anyway to disable this?
Same here, when I'm trying to scroll I'm getting:
I notice this does not happen if using the Nx extension in VSCode and running a task - but does happen if you directly run nx in the terminal window. I suspect this is something to do with terminal settings potentially oh my zsh?
OR... they know about this problem and setting --no-tui in that extension?
You can see the commands that are issued and the extension is not passing "--no-tui". I can clearly see the TUI as well as it's very different.
On both Mac and WSL, we can't select text and copy if it involves having to scroll. As soon as a scroll happens, the text is deselected.
Same here using the built-in Terminal.app. Mouse-scrolling the output pane moves the entire TUI view off the screen.
Same happening to me in iTerm2
+1 same for me
In case someone else would rather not have to deal with this TUI: you can disable it in nx.json:
{ "tui": { "enabled": false } }
In case someone else would rather not have to deal with this TUI: you can disable it in nx.json:
{ "tui": { "enabled": false } }
You can also use export NX_TUI=false or --tui=false.
We currently have it enabled in the nx.json and people can turn it off it they want.
Also getting a bunch of
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B
when trying to scroll (either with trackpad/wheel or keys)
Entering interactive mode by pressing ^+z helped.
Edit: Note, this will disable bindings such as h+enter etc
OS: Mac Shell: zsh
I started to run my nx commands with the --tui=false and that solves the problem for me.
Actually, I will look if it is possible to leverage that flag on any command by default, and only use the nx terminal on demand (it is handy in some of our business case )
Another great feature noone asked for, brings multiple bugs and requires me to change configuration to disable it. Gotta love NX lately.
Another great feature noone asked for, brings multiple bugs and requires me to change configuration to disable it. Gotta love NX lately.
Probably inspired from Angular team itself. They are doing things noone has asked for (deprecating things etc) and not fixing 4+ years critical bugs and strange behavior.
this is very easy to solve @faileon, no need for such kind of feedback 😅. I indeed find it useful on certain scenarios
On the other hand, you can just disable it globally, see the tui details
"tui": {
"enabled": false
}
or disable it per command or task, as for instance, "test": "NX_TUI=false nx test", or adding --tui=false to ur nx command
this is very easy to solver @faileon, no need for such kind of feedback 😅. I indeed find it useful on certain scenarios
On the other hand, you can just disable it globally, see the tui details
"tui": { "enabled": false }or disable it per command or task, as for instance,
"test": "NX_TUI=false nx test",
I don't know, I signed up for a build tooling and lately I'm getting AI assistants, changes to the output of my terminal and things like "yolo" mode for CI... Meanwhile my cache is still flaky for last 3 major versions, like wtf is going on?
Hi Folks, we've got a set of usability enhancements coming to help folks who are not as familiar with how terminal user interfaces (TUIs) and pseudo-terminals (ptys) work, we'll provide an update on here very soon. There are distinctions about what keybindings get interpreted by the TUI and what get interpreted by the pty. We think we've come up with a self-explaining/documenting way to handle it that will land in an upcoming patch.
@faileon There is no such thing as yolo mode for CI, I think you must be referring to a YouTube video which is obviously intended to for one purpose - to grab attention in a sea of other videos.
Nx Cloud's self-healing CI is now capable of auto-committing a suggested fix back to your PR (note: never your main branch) but ONLY if (A) you have told it specifically what tasks you want it do that for and (B) the suggested fix has already been applied and caused the previously failing task to pass (making it a verified fix).
If you are experiencing unexpected cache hits or misses, it is very likely that inputs are misconfigured for whatever reason. Please check out the tools available to you to figure out where that is happening in your setup: https://nx.dev/docs/troubleshooting/troubleshoot-cache-misses - if, after you have been through those steps, you feel you have found a bug please open a fresh issue with full context so that we can help.
Hey all! We made a change in Nx v22.1.0 to disable interactive mode by default for terminal outputs, which alleviates this issue for many tasks that didn't require interactive mode. This means that for interactive outputs, you'll need to press i to enable it before interacting with the terminal.
We're exploring additional UX improvements in this area, so stay tuned.