Repository navigation
fix: open the SSH setup workspace while another device is showing - #734
Merged
Merged
Conversation
Adding an SSH host whose Herdr is missing or too old continues in a workspace on this computer's Herdr. When the window was showing another device, Local's connection had an inactive surface, and Herdr refused `workspace.create` with "surface_inactive: this method requires an active client shell surface". The dialog now switches the window to Local before asking, keeping the Add Device dialog open across the switch, and waits in a new `Activating` step until the window has queued Local's surface activation. The request then follows that activation on the same ordered connection. A Local that cannot be reached returns to the question with the error, keeping the host claim for a retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Zvsmb8t18dhXWMf3nu2sU
[Medium impact] The PR appears safe to merge; no actionable issues remain. SummarySSH setup now switches to Local before opening its workspace and waits until Local's surface activation is queued.
DiagramsequenceDiagram
participant Dialog as Add Device
participant Window
participant Local
Dialog->>Window: Select Local and restore form
Window->>Local: "client_shell.surface.set(active=true)"
Dialog->>Local: workspace.create
Local-->>Dialog: Created workspace and root pane
Dialog->>Local: Type setup command
Dialog->>Window: Close dialog and show workspace
Reviews (2) · Last reviewed commit: "test(devices): check setup activation re..." · Reviewed by Greptile |
Since group members without a drawn chevron stopped reserving its column (cc727de), the native sidebar probe still subtracted ARROW_RESERVE from the expected child label width, so `native_sidebar` failed on both Windows runners with "actual 179px, expected 161px". The probe and its unit fixtures now expect the full width.
Contributor
Author
|
|
…create The setup activation test faked Local's activation by trading in a connection, so it never checked that the window queues `client_shell.surface.set` before `workspace.create`, the order the fix depends on. It now drives `poll_endpoints` against a mock peer whose welcome advertises surface interest, and reads the activation and then the workspace request off the wire.
Owner
|
@greptileai review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adding an SSH host whose Herdr is missing or too old ("The Herdr on … is too old for this app. Should we update it?" → Update) failed with:
The setup continues in a workspace on this computer's Herdr. When the window was showing another device, Local's connection had an inactive surface, and Herdr refuses
workspace.createfrom such a connection.Approach
Step::Activatingwaits until the window's poll has queued Local's surface activation (surface_requested());poll_device_setupthen sendsworkspace.create, which follows the activation on the same ordered connection.Open a local workspace: …, keeping the host claim for a retry, instead of waiting.Validation
Run on Linux x86_64 (Arch/Omarchy) with the pinned Rust 1.96.1, at ef1c819 (base 92f4398).
justis not installed on this machine, so eachjust cistep was run directly:cargo fmt --all -- --check: passedscripts/check-file-size.sh,scripts/test_check_sorted.py,scripts/check-sorted.py: passedcargo clippy --locked --workspace --all-targets --all-features -- -D warnings: passedcargo clippy --locked --workspace --all-targets --no-default-features -- -D warnings: passedcargo test --locked --workspace: 3 failures, all unrelated to this change and reproduced on a cleanorigin/main(26443bc) on the same machine:config::tests::loading::{local_overrides_merge_tables_replace_arrays_and_refresh_defaults, managed_headers_accept_lf_and_crlf_without_migrating_defaults}read the host's Omarchy theme; they pass with an isolatedHOME/XDG_CONFIG_HOME.cloud::install::tests::the_probe_finds_herdr_where_the_bridge_looksfails because this host has/usr/bin/herdr, which the test's PATH searches but its "already installed" skip list omits.cargo test --locked --workspace --all-features: 4591 passed, same 3 unrelated failures.claude/skills/gpui-mockup/scripts/test_wait.py: passedmenu/devices/tests/setup_activation.rs: with another device selected, nothing is sent until Local's surface is requested, the dialog stays open, thenworkspace.createis sent; with Local disconnected, the dialog returns to the question with the error. All 124menu::devicestests pass.just lint-linux/just lint-windows: not run (nocfggates touched)Manual QA
No screenshots: the only visible change is that the error no longer appears; the status text ("Opening a local workspace…") is unchanged.
🤖 Generated with Claude Code
https://claude.ai/code/session_016Zvsmb8t18dhXWMf3nu2sU