warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.39k stars 374 forks source link

Starship design broken at v0.2024.07.09.08.01.stable_00 #5123

Closed nyxb closed 3 months ago

nyxb commented 4 months ago

Dupe Check

Describe the bug

The design is broken after i updated to the latest version. the carret is not on the right position.

To reproduce

idk use starhip with nerdfonts and update warp?

Screenshots

NyxbShot-2024-07-13-at-15 42 21@2x

Operating system

MacOS

Operating system and version

14.5 (23F79)

Shell Version

zsh 5.9 (x86_64-apple-darwin23.0)

Current Warp version

v0.2024.07.09.08.01.stable_00

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

alokedesai commented 4 months ago

Hey @nyxb, thanks for filing! Could you elaborate on exactly what's wrong in the screenshot above? A before and after screenshot would especially be useful. Thank you!

nyxb commented 4 months ago

Hey @nyxb, thanks for filing! Could you elaborate on exactly what's wrong in the screenshot above? A before and after screenshot would especially be useful. Thank you!

oh I just see you can't see the carret on the screenshot. A before and after picture would probably not help either. I can visualize it again in a moment. The fact is that the carret is no longer under the Apple sign but 5px further to the right and now there is no more space. In other words, he has a top-5 so to speak

ok here is a screenshot normally the carret is on the red position but the green carret is the real carret now NyxbShot-2024-07-15-at-16 24 08@2x

Advait-M commented 4 months ago

Hey @nyxb, thanks for filing! Could you elaborate on exactly what's wrong in the screenshot above? A before and after screenshot would especially be useful. Thank you!

oh I just see you can't see the carret on the screenshot. A before and after picture would probably not help either. I can visualize it again in a moment. The fact is that the carret is no longer under the Apple sign but 5px further to the right and now there is no more space. In other words, he has a top-5 so to speak

ok here is a screenshot normally the carret is on the red position but the green carret is the real carret now NyxbShot-2024-07-15-at-16 24 08@2x

Thanks for elaborating @nyxb - to confirm, the issue is that the red "cursor" is not aligned correctly with the green cursor for text?

Could you please provide your Starship toml config file and which nerdfont you're using in Warp + what line height & font size you're using? Looking to repro this issue so we can help debug it!

Advait-M commented 4 months ago

Or do you mean that there's essentially an extra space (or two) on the second line (before the command)? With the red bit being a screenshot annotation/edit that you added @nyxb?

nyxb commented 4 months ago

Or do you mean that there's essentially an extra space (or two) on the second line (before the command)? With the red bit being a screenshot annotation/edit that you added @nyxb?

I painted the red line. It is supposed to symbolize where the carret should actually be and where it was before the update. The green one is the current status. My configs have remained the same. Before the last update, everything worked. But i like to share the configs

iurigustavo commented 3 months ago

Same here:

image

no new line

Advait-M commented 3 months ago

Or do you mean that there's essentially an extra space (or two) on the second line (before the command)? With the red bit being a screenshot annotation/edit that you added @nyxb?

I painted the red line. It is supposed to symbolize where the carret should actually be and where it was before the update. The green one is the current status. My configs have remained the same. Before the last update, everything worked. But i like to share the configs

Got it - yep, could you please share your Starship toml config? Didn't see it here, but let me know if I missed it! I currently haven't been able to repro this issue

Advait-M commented 3 months ago

Same here:

image

no new line

I think you're referring to a different topic here - please see https://github.com/warpdotdev/Warp/issues/2304#issuecomment-2223352668 for context here on the recent update. And https://github.com/warpdotdev/Warp/issues/5052 might be helpful for you too.

nyxb commented 3 months ago

Or do you mean that there's essentially an extra space (or two) on the second line (before the command)? With the red bit being a screenshot annotation/edit that you added @nyxb?

I painted the red line. It is supposed to symbolize where the carret should actually be and where it was before the update. The green one is the current status. My configs have remained the same. Before the last update, everything worked. But i like to share the configs

Got it - yep, could you please share your Starship toml config? Didn't see it here, but let me know if I missed it! I currently haven't been able to repro this issue

I share my conf next days

nyxb commented 3 months ago

@Advait-M here are my configs: https://github.com/nyxb/dotfiles

NyxbShot-2024-07-21-at-10 53 27@2x

Advait-M commented 3 months ago

https://github.com/nyxb/dotfiles

Thanks! I can repro this. Taking a deeper look.

Advait-M commented 3 months ago

Though, I'm seeing the 1 cell space in iTerm and the default Mac terminal too. @nyxb are you sure this space doesn't exist in your prompt configuration itself 🤔 ? Curious which terminal you were using where this worked correctly?

image

image

Advait-M commented 3 months ago

I wonder if this is related to this bit

# Drop ugly default prompt characters
[character]
success_symbol = ""
error_symbol = ""

i.e. Starship allows you to override the symbols for this, but it's not overidding the space between the > and the command, which leads to the 1 extra space.

Here's a workaround for the Starship behavior that I found, which should get the outcome you want:

in zshrc:

eval "$(starship init zsh)"
PROMPT="${PROMPT}"$'\n'

in starship.toml:

# Drop ugly default prompt characters
[character]
success_symbol = ""
error_symbol = ""
format = ""

[line_break]
disabled = false

This gets me this in Warp: image

Hope this helps @nyxb !

nyxb commented 3 months ago

I wonder if this is related to this bit

# Drop ugly default prompt characters
[character]
success_symbol = ""
error_symbol = ""

i.e. Starship allows you to override the symbols for this, but it's not overidding the space between the > and the command, which leads to the 1 extra space.

Here's a workaround for the Starship behavior that I found, which should get the outcome you want:

in zshrc:

eval "$(starship init zsh)"
PROMPT="${PROMPT}"$'\n'

in starship.toml:

# Drop ugly default prompt characters
[character]
success_symbol = ""
error_symbol = ""
format = ""

[line_break]
disabled = false

This gets me this in Warp: image

Hope this helps @nyxb !

Thank you very much. Yes that solves the problem with the space on the left.

But somehow since the update there is hardly any space between the top and bottom, how can this be solved? There was more space before.

NyxbShot-2024-07-23-at-06 46 44@2x

Advait-M commented 3 months ago

Glad to hear that helped!

Ah, you're referring to between the prompt and command @nyxb ? So, we're now more closely matching the "normal/true" custom prompt/PS1 experience from other terminals and inter-mixing the Grid and Input Editor.

As such, we've removed padding here, to allow both to be right beside each other.

I've seen a couple other requests for this - could you perhaps open a new GH issue focused on this and we can use that to gauge interest? What I imagine we could do in the future:

  1. Add configuration to introduce padding between the n-1'th line of the prompt and nth line (which is what would help here)
  2. Add configuration to introduce padding between the nth line of the prompt and the command

Note that we can only really do this in the Input Editor (not in finished blocks, where the prompt and command are now part of the same grid).

Advait-M commented 3 months ago

Ah https://github.com/warpdotdev/Warp/issues/5159 looks like this issue actually @nyxb ! I'll follow up there too

Advait-M commented 3 months ago

I'm going to close this in favour of #5159 to track padding!