-
-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI Fixes & Tweaks #2846
CLI Fixes & Tweaks #2846
Conversation
I think tabs are a bad idea because the user would have to switch back and forth between their code terminal and their TUI terminal whereas if there were no tabs the user could just move the TUI terminal to a second monitor or whatever and never touch it (although as of right now I have to reload it manually to see any non-hot-reloadable changes, hopefully this will change in the future). I suggest we follow what |
@FragrantArmpit
I've heard similar from a couple of other people. I don't plan to change this behavior in this PR but I do think it's something that should be discussed. If you could create a new issue about it, that would be great! |
When logs are already on "optimizing assets", the status message still shows the compiling that has been finished a long time ago: It should skip showing stages that already have been done. Logs and status message should be in sync. No way... I retried a few times and in small window it updates the message almost immediately: But! When the terminal window is maximized, then the delay is always the same. Very strange how available TUI size changes the status message delay with logs. |
I guess this is how it looks now? Since we have a wrapper server starting at the very start, it's OK to send this message at the start. |
@Andrew15-5 Thanks for the report about the overflow issue with arrow keys. I am looking into that now. The other issue with the build messages is that it is building for fullstack and since two builds are running, they can conflict with the message output. What happened here is one build finished quicker and started optimizing but the status bar (compiling x%..) was showing the status for the slower build. I do not plan to fix this just yet as we wanna get this PR wrapped up. And yes that is the new dev server message. |
@Andrew15-5 I think that would be best in a separate PR once this and the other big PR are merged. If you could post your request in the CLI megathread issue, that would be great. |
Yeah, that's interesting. But it should mention somewhere that "All warnings are suppressed" if some warnings appear. It's a great alternative to the manual workaround: https://users.rust-lang.org/t/suppress-warnings-from-the-cargo-command/10536. |
What's Included
[o] open
does the trick and the possibility to remove it was mentioned so I did so anyways (too lazy to make it responsive with the terminal size). Let me know if we do want to keep it.WorkingThis has been removed.[c] clear
keybind.[h] hide
keybind text (it does nothing)MessageSource
to a more reasonable location.Add some background styling to powerline (info bar)- Tried this and it doesn't look the greatest.Todo
If there's time...Decided these are out of the scope of this PR.[/] more
keybind modal.The New Logging
This PR introduces a new concept within the CLI: user-facing and internal logs.
User-facing logs are routed through the TUI into a single message buffer. Every user-facing log ends up as a
Message
with aMessageSource
, verbosityLevel
, messagecontent
, and an automatically determinedoutput_tab
for the tab it will be shown in on the TUI.Internal logs are always tracing-based. However, this doesn't mean any usage of tracing is an internal log. Tracing can be used to emit user-facing logs by providing the value
dx_src
as a tracing field. E.g.info!(dx_src = ?MessageSource::Build, "compilation finished");
Any usage of tracing with thedx_src
, even if it isn't aMessageSource
, will cause the log to be routed to the TUI. Any log withoutdx_src
will be routed to the internal logs.There is also an additional field
dx_no_fmt
which if set at all will cause the message content to be printed without any formatting for user-facing non-interactive-mode logs.The current plan is for logs to be routed to a rolling log file which can be submitted with CLI bug issues for easier debugging. There are no current usages of internal logs.
Screenshots
Moved TUI info bars to the bottom of the screen: