Skip to content

🤖 fix: SshPromptDialog dismisses the prompt when ssh.prompt.respond returns an error Result #4628

Description

@ThomasK33

Problem

SshPromptDialog treats every resolved ssh.prompt.respond call as success.

  • src/browser/components/SshPromptDialog/SshPromptDialog.tsx:101-103 awaits api.ssh.prompt.respond(...), then removes the prompt from the queue.
  • respond returns Result<void, string> (src/common/orpc/schemas/api.ts ~3546). A { success: false, error } reply still dismisses the prompt. No error is shown and no retry is offered. Only a thrown error keeps the prompt (the catch at ~:104).

The old test double returned void, which hid this. It surfaced while typing the double in the createTestApiClient migration (#4625 stack).

Repro

In SshPromptDialog.test.tsx, make respond resolve { success: false, error: "expired" }, then click Reject. The dialog closes. Expected: it stays open with the error, so the user can retry.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high • Cost: $86.18

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions