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.38k stars 373 forks source link

Large Command Pasting Issue: Command Display Cut-off #3456

Open Sh3lldor opened 1 year ago

Sh3lldor commented 1 year ago

Discord username (optional)

No response

Describe the bug

When pasting a large command into the input field, the displayed command gets cut-off and doesn't show the entire command. This issue is causing inconvenience and makes it difficult to review and verify the command. The goal is to find a solution that allows users to see the entire pasted command without any truncation or loss of information.

To reproduce

for example, if I want to run jq command on a large json like:

{"abcd_efgh": "XY", "ijkl_mnop": ["mock1", "mock2"], "qrst_uvwx": 9876543210, "yz_abcd_efgh": null, "ijkl_mnop_qrst": ["mockdata1.com", "mockdata2.org"], "uvwx_ijkl_mnop": ["server-01.mockdata1.com", "db-01.mockdata2.org"], "abcd_efgh_qrst": "ZZ", "uvwx_yz": "MockData Corp.", "efgh_ijkl": [{"mnop_abcd": "MockData's Database Service", "qrst_uvwx": "MockDB", "yz_abcd_efgh": {"efgh_ijkl_mnop": 200, "ijkl_mnop_qrst": null, "qrst_uvwx_yz": [], "abcd_efgh_ijkl": null, "uvwx_ijkl": "Welcome to MockDB", "mnop_qrst": null, "efgh_ijkl_mnop": "MockWAF", "ijkl_mnop": null, "qrst_uvwx_yz_abcd": "MockDBServer", "efgh_ijkl_mnop_qrst": -123456789, "mnop_abcd_efgh": "123.456.789.012", "qrst_uvwx_abcd_efgh": "<HTML><HEAD>\n<TITLE>Welcome to MockDB</TITLE>\n</HEAD><BODY>\n<H1>Welcome to MockDB</H1>\n<p>MockDB is a powerful and scalable database service.</p>\n</BODY></HTML>\n", "qrst_uvwx_yz_abcd_efgh": "/", "mnop_abcd_efgh_ijkl": {}, "qrst_uvwx_yz_abcd_efgh_ijkl": -987654321, "yz": null}, "ijkl_mnop_qrst_uvwx": null, "ijkl_mnop_qrst_uvwx_yz": "2023-07-30T11:59:38.554915", "yz_abcd_efgh_ijkl": "MockData Internet Services", "ijkl_mnop_qrst_uvwx_yz_abcd": "tcp", "qrst": {"qrst_abcd": "us", "mnop": true, "ijkl": "http", "qrst_abcd_efgh": "a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6", "qrst_uvwx": {}, "qrst_abcd_efgh_ijkl": "4f9e2d1c1a0b7d7e8a6c5b3d2e1f4"}, "qrst_abcd_efgh_ijkl_mnop": 123456789, "qrstuvwxyz_abcd": "AS12345", "uvwxyz": {"ijkl_mnop": "Mocktown", "qrst_uvwx_yz_abcd_efgh": "XY", "ijkl_mnop_qrst": null, "qrst_abcd_efgh": -71.0589, "qrst_uvwx": 42.3601, "yz_abcd": "ZZ", "abcdefghijklmnop": "Mockland"}, "qrst_uvwx_ijkl": 9876543210, "ijkl_mnop_qrst_uvwx": ["mockdata1.com", "mockdata2.org"], "ijkl_mnop_qrst_uvwx_yz": "MockData Corp.", "ijkl_mnop_qrst_uvwx_yz_abcd": "HTTP/1.1 200 OK\r\nServer: MockDBServer\r\nMime-Version: 1.0\r\nContent-Type: text/html\r\nContent-Length: 87\r\nExpires: Sun, 30 Jul 2023 11:59:38 GMT\r\nDate: Sun, 30 Jul 2023 11:59:38 GMT\r\nConnection: close\r\n\r\n", "ijkl_mnop_qrst_abcd": 80, "qrst_uvwx_yz_abcd_efgh_ijkl": {}, "qrst_uvwx_yz_abcd_efgh_ijkl_mnop": {"abcdefghijklmnop": {}}, "uvwxyz_abcd": {}, "ijkl_mnop_abcd": "123.456.789.012"}], "qrst_uvwx": "AS12345", "uvwxyz": "Mocktown", "ijkl": "MockData Internet Services", "mnop": -71.0589, "qrst_abcd": "Mockland", "uvwxyz_abcd_efgh": "123.456.789.012", "qrst_uvwx_ijkl": null, "mnop_abcd": [80]}

the text will be cut-off

Expected behavior

1) If the command exceeds the height of the input field, a vertical scrollbar should appear, allowing the user to scroll down and view the full content of the command. 2) The scrollbar should be responsive and functional, enabling smooth navigation through the entire command text. 3) Users should be able to edit and manipulate the entire command without any content being hidden or cut off from view. 4) The system should maintain the original formatting and line breaks of the pasted command, ensuring that it remains legible during scrolling.

Screenshots

image

https://github.com/warpdotdev/Warp/assets/48997586/dbbb2d74-9e66-4cc2-9b1c-977000799141

Operating system

MacOS

Operating system and version

MacOS Venture 13.4

Shell Version

No response

Current Warp version

No response

Regression

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

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

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:b8107fdf-ba31-488d-b103-d271c89cac3e

None

warpdotdev-devx[bot] commented 1 year ago

Hey @Sh3lldor, Thanks for letting us know. As far as I'm aware when you have a large command you can make the terminal size larger to accommodate as a workaround. Also, I was able to replicate the issue, and the scrolling with a large command and small terminal is less than ideal so we'll post any updates to this on the thread.

https://github.com/warpdotdev/Warp/assets/16809145/4b8ae6e9-cace-4605-9577-90c7fc51834c

To anyone else facing this issue, please add a 👍 to the original post at the top or comment with your details, and subscribe if you'd like to be notified.

mikelange-revium commented 8 months ago

Not sure if explicitly related, but I also find the bottom of terminal cut-off during execution of commands with the bordered highlight area clearly proceeding further than the available scroll area - very annoying! Can't see the end of a diff or git log, or npm install etc until I select that area and kill the currently executing process - also appears to be intermittent behaviour.

ashvinnihalani commented 8 months ago

+1 When having the prompt fixed to the bottom, sometimes the a single command will over lap with the prompt. After this bad block, command output is now hidden by the prompt. image image