Skip to content

Strongly typed error handling for remote server SSH installation flow#10429

Merged
alokedesai merged 10 commits intomasterfrom
aloke/error_handling
May 8, 2026
Merged

Strongly typed error handling for remote server SSH installation flow#10429
alokedesai merged 10 commits intomasterfrom
aloke/error_handling

Conversation

@alokedesai
Copy link
Copy Markdown
Member

@alokedesai alokedesai commented May 8, 2026

Description

Makes a bunch of improvements to the error UX for the remote code so that:

  1. We have strongly typed errors, which allows us to separate out the error message we log from the error we message to the user
  2. Improves how we message the error to the user so that it's easier to understand and that the core details actually goes into the big red error box (which is the actual thing anyone is going to read)

https://www.loom.com/share/82f13736fc7741c1b18152b92ddd6047?from_recorder=1&focus_title=1

Before

image

After

image

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Oz conversation

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 8, 2026

@alokedesai

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR introduces typed transport and SSH command errors for the remote-server SSH setup flow and moves banner rendering to structured user-facing error copy.

Concerns

  • The binary check now collapses every non-success SSH command exit into Ok(false), so abnormal failures are treated as a missing binary instead of setup failures.
  • User-facing stderr truncation slices a UTF-8 String at a fixed byte offset, which can panic when stderr contains multibyte characters.

Verdict

Found: 0 critical, 2 important, 0 suggestions

Request changes

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread app/src/remote_server/ssh_transport.rs Outdated
Comment thread crates/remote_server/src/transport.rs Outdated
alokedesai and others added 3 commits May 8, 2026 10:12
- check_binary now distinguishes test -x exit codes (0=found, 1=missing)
  from transport failures (255, signals) instead of collapsing all
  non-success into Ok(false)
- Use str::floor_char_boundary for stderr truncation to avoid panicking
  on multibyte UTF-8 characters

Co-Authored-By: Oz <oz-agent@warp.dev>
@alokedesai alokedesai requested a review from moirahuang May 8, 2026 16:54
Copy link
Copy Markdown
Contributor

@moirahuang moirahuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know this isn't the scope of your PR but looking at this is making me realize, do we need some sort of a CTA for when it does fail? i get that often there's not a clear action but in the cases that there are, if i was the use and saw our banner i'd wonder "ok so i have this error, now what?"

@alokedesai
Copy link
Copy Markdown
Member Author

Yup, already planning on doing that as a followup.

It depends on the error type (which requires strongly typed errors)

@alokedesai alokedesai merged commit 99e8a65 into master May 8, 2026
25 checks passed
@alokedesai alokedesai deleted the aloke/error_handling branch May 8, 2026 18:18
alokedesai added a commit that referenced this pull request May 8, 2026
Drop PlatformParseError (redundant with transport::Error), adapt
RemoteShell + sh invocations to work with new SshCommandError and
transport::Error types, update tests to use transport::Error.

Co-Authored-By: Oz <oz-agent@warp.dev>
trungtai1805 pushed a commit to trungtai1805/warp that referenced this pull request May 9, 2026
…warpdotdev#10429)

## Description
Makes a bunch of improvements to the error UX for the remote code so
that:

1) We have strongly typed errors, which allows us to separate out the
error message we _log_ from the error we message to the user
2) Improves how we message the error to the user so that it's easier to
understand and that the core details actually goes into the big red
error box (which is the actual thing anyone is going to read)


https://www.loom.com/share/82f13736fc7741c1b18152b92ddd6047?from_recorder=1&focus_title=1


## Before
<img width="1241" height="494" alt="image"
src="https://github.com/user-attachments/assets/f8f949a1-19c7-48c8-b205-1965bdf61d21"
/>

## After
<img width="1247" height="516" alt="image"
src="https://github.com/user-attachments/assets/26b8a925-2283-49eb-a1c3-bd50137efb11"
/>


## Agent Mode
- [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode

---
[Oz
conversation](https://staging.warp.dev/conversation/f40d630e-6c90-4f04-92fb-bdcd8dbc73be)

Co-Authored-By: Oz <oz-agent@warp.dev>

---------

Co-authored-by: Oz <oz-agent@warp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants