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
20.81k stars 351 forks source link

Warp doesn't respect the `Open new windows with custom size` on first launch #4011

Open jatindotdev opened 8 months ago

jatindotdev commented 8 months ago

Discord username (optional)

No response

Describe the bug

After fully closing the application and launching it again, it doesn't launch with the custom size set. Works on subsequent launch if warp is active.

To reproduce

  1. Set window custom size
  2. Exit warp fully
  3. Launch warp

Expected behavior

Should respect the custom size on first launch too.

Screenshots

https://github.com/warpdotdev/Warp/assets/59236972/40538c3e-4570-40c6-b51e-b703d744b60f

Operating system

MacOS

Operating system and version

Sonoma 14.2.1 (23C71)

Shell Version

fish, version 3.6.4

Current Warp version

v0.2023.12.19.08.02.stable_00

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

First time trying this feature

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

dannyneira commented 8 months ago

Hey @jatindotdev Thanks for letting us know. As far as I'm aware, the last window closed is what sets the size of the window on first start, so as long as the last window you closed is the one set to the custom size, it should display new windows after quitting with that size.

jatindotdev commented 8 months ago

Hi @dannyneira, thanks you your time, i expected the same to happen thougth the recording doesn't show scenario you explained but i can confirm it doesn't open at the same size of the last window closed

dannyneira commented 8 months ago

heard, I wonder if the same happens when you reopen the app from something other than the raycast extension? That may be causing the new window to not open with the same custom size. Also when you have a Window open and you press CMD-N does a new window open with the custom size?

jatindotdev commented 8 months ago

heard, I wonder if the same happens when you reopen the app from something other than the raycast extension?

the same result with spotlight or opening it manually

Also when you have a Window open and you press CMD-N does a new window open with the custom size?

yes it works when we have a window open or if its not fully closed

dannyneira commented 8 months ago

interesting, are you using any window management tools like rectangle, mosaic, amethyst, etc.? I find it difficult to reproduce this issue on my end, so make sure you don't have some window mgmt app installed and possibly over-riding the default behavior.

Also, please run defaults read dev.warp.Warp-Stable | grep NewWindowsNum and let us know the result, this is the setting for the window size, so want to make sure it's being saved/set correctly.

jatindotdev commented 8 months ago

interesting, are you using any window management tools like rectangle, mosaic, amethyst, etc.? I find it difficult to reproduce this issue on my end, so make sure you don't have some window mgmt app installed and possibly over-riding the default behavior.

None actually, i use raycast shortcuts for window mgmt but they don’t run or override anything, still i quit raycast incase it did still no luck

Also, please run defaults read dev.warp.Warp-Stable | grep NewWindowsNum and let us know the result, this is the setting for the window size, so want to make sure it's being saved/set correctly.

here is the result

    NewWindowsNumColumns = 100;
    NewWindowsNumRows = 36;
dannyneira commented 8 months ago

Thanks for the info, I'll check with the team as it's not clear from the video/info you provided. Unfortunately, I don't have a workaround at this time. If/when we have any updates we'll post on here, and we have no firm no eta on a fix.

jatindotdev commented 8 months ago

Thanks again @dannyneira! will wait for an update soon

This is a little off topic with the issue but I had one more thing i can’t figure out, if you see the video you can see in every fish instance there is this

string replace: Regular expression compile error: quantifier does not follow a repeatable item
string replace: ^+x[= ]
string replace: ^

coming up, maybe some pre script is getting injected and this too only happens in warp, i also looked at the fish config but no luck

if you would like me to create an issue i will do it

dannyneira commented 8 months ago

yes please, create a separate issue, but before you do make sure you disable background blocks in the settings, that may be causing the extra blocks to appear. While Warp is open, in the Mac bar, go to Blocks, then select "Hide background command blocks" to see if that helps.

CleanShot 2023-12-29 at 14 07 48

dusrdev commented 7 months ago

I am having the same issue (but using zsh shell - also mac os). And it behaves the same whether I launch it with raycase, vscode, the app icon or anything...

defaults read dev.warp.Warp-Stable | grep NewWindowsNum

Shows the right size that I configured in the settings, however, the first window (the one that is launched when the application is closed) doesn't use this size, instead uses the default. If the first window is already open, any consecutive window, will use the right size.

However, this is basically worthless if you mainly use a single window most of the time and close the application after you finish using it.

dannyneira commented 6 months ago

Hey folks, I think this may be a different behavior when you close the window with CMD-W versus quitting the app with CMD-Q. Please note the video below with iTerm2, Terminal, and Warp showing the same issue. When you close with CMD-W, and reopen with CMD-N, the custom size is retained in all. But when you close with CMD-Q, if the window was a different size, the new size is retained when you reopen the app. I suspect this may have to do with macOS Window Manager as this also happens with other apps like Chrome, Safari, etc.

https://github.com/warpdotdev/Warp/assets/16809145/80a79eb7-5725-4110-9458-f4be1bff041e

dusrdev commented 6 months ago

@dannyneira Your comment is irrelevant to the issue, notice the the last 3 words "on first launch", meaning when the app was closed and you open the app which creates a new window. When you close with CMD-W you only close the window, so this does not apply. BTW, the post means that the app should respect the size regardless of whether it was open. With your example I would need to keep the app open always, which I may not want. And even if I did, every time I restart my macbook, it would still launch with the wrong size.

dannyneira commented 6 months ago

Heard, sorry if my comment wasn't helpful. Warp does retain the size of the last window closed when quitting the app or restarting your Mac, but I'll let the team know the issue is with the "first launch" of Warp and we'll post updates on this thread.

dusrdev commented 6 months ago

@dannyneira

Warp does retain the size of the last window closed when quitting the app or restarting your Mac

I just tried it and it doesn't, regardless of whether this setting is toggled on or off, after I use CMD+Q to quit wrap, the next time I launch it, it always opens with its default size (which is square-ish) on my 14" m2 macbook pro, and doesn't look that good.

The point I think of this setting (at least my expectation when reading the description) is that this will set the default size to open windows, but it doesn't work like that.

I don't see the reason of having a custom size but only for consecutive windows, it just doesn't make any sense, especially since warp supports tabs, so I rarely open multiple windows. Most of the time I use one window, and when I don't need it, I close the app, but then it launches with the default size again.

dannyneira commented 6 months ago

@dusrdev that may have to do with the Session Restoration feature, if you disable that, it may keep the previous size before closing, give it a shot and let me know if that helps. https://docs.warp.dev/features/sessions/session-restoration

CleanShot 2024-02-16 at 11 42 46

dusrdev commented 6 months ago

@dannyneira Session restoration might work but it gives me more stuff I don't want on the way. When I decide to press CMD-Q to quit the app, I don't expect the next time I launch it have all my windows open, all the tabs within them, and panes/blocks. Perhaps (and I think most likely) is that when I quit the app, I want everything to close so that the next launch is from a fresh state.

So, it might work for this purpose as a side effect, but I don't think this is what it's intended for (and btw I think this is way too many options to toggle in single switch, perhaps separating that a few toggles might be the wise choice so that users can choose what they want instead of everything or nothing) but again, this issue is just about wanting to warp adhere to some custom default window size, regardless of what was or wasn't used or open in any previous session. That seems like such an easy request. This is what I expect from the option in the first place. to set a default window size. very simple.

squallliu commented 6 months ago

The same problem exists on linux.

facubarril commented 6 months ago

Same problem here. If I leave "Restore windows, tabs, and panes on startup" on, it keeps the size of the last window. But I don't want to keep the other stuff, I want a clean new window with the custom size only.

juliabresolin commented 4 months ago

Same problem here.

Do we have any expected fix for this?

It's really annoying to have to leave session restoration active so that the warp opens to the correct size.

garyjkuehn commented 2 months ago

Using Warp version v0.2024.06.18.08.02.stable_03. The startup of a custom window size doesn't work. Ensured feature Restore Windows, tab..... is off. MacOS Monterey 12.6.2.

IS there an ETA for resolution? Session restore is even more annoying for my workflow so not an option for me.

Zaberahmed commented 1 month ago

@dannyneira I am having this issue described in the video provided above. Switching off "Session restoration" like you suggested takes me back to the default warp terminal size every time I close it via 'x' icon on top-right / ALT + F4 / use 'exit' command. So,currently I just close it using the 'x' icon or ALT + F4 on my machine with "Session restoration" switched on. That way I never kill the session and resume back from last session with my custom window size. In case I lose the custom window, I open another window with CTRL + Shift + N while another default window is open.

What I would like to have is to switch off the restore option and whenever I open warp, I want it to be my custom size. Thanks for your time :+1: