Skip to content

Treat WmHints::set send failure as recoverable - #22

Draft
warp-agent-staging[bot] wants to merge 1 commit into
warpdotdev/v0.30.xfrom
factory/fix-wm-hints-set-panic
Draft

warp-agent-staging[bot] wants to merge 1 commit into
warpdotdev/v0.30.xfrom
factory/fix-wm-hints-set-panic

Conversation

@warp-agent-staging

Copy link
Copy Markdown

Summary

  • On a dead X11 connection, WmHints::set returns a ConnectionError. The previous code called expect_then_ignore_error, which panics on the send error. This caused Warp to abort when ringing the terminal bell while the window was inactive (Sentry WARP-CLIENT-BETA-STABLE-89S1).
  • Replace the panic with an if let Ok(cookie) that silently drops the send error, matching how the get side of the same function already handles failures. On success, the cookie error is still ignored.

Test plan

  • cargo check --features x11 passes
  • Verify that request_user_attention no longer panics when the X11 connection is dead

This PR was created by Warp (running Claude Code).

When the X11 connection is dead, WmHints::set returns a ConnectionError.
The previous code called expect_then_ignore_error which panics on the
send error. This caused Warp to abort (Sentry WARP-CLIENT-BETA-STABLE-89S1)
when ringing the terminal bell while the window was inactive on a dead
connection.

Replace the panic with an if-let that silently drops the send error,
matching how the get side of the same function already handles failures.
On success, the cookie error is still ignored the same way.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

0 participants