Skip to content

fix(pcb): skip desktop launcher setup without xdg-mime - #1558

Merged
akhilles merged 2 commits into
mainfrom
fix/headless-launcher-update
Oct 23, 2026
Merged

akhilles merged 2 commits into
mainfrom
fix/headless-launcher-update

Conversation

@akhilles

@akhilles akhilles commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Why

Running pcb self update in headless Linux containers such as Blaxel attempts to register the desktop URL handler. These images do not include xdg-mime or update-desktop-database, producing warnings for an optional desktop component even though the CLI can update normally.

Changes

  • Skip downloading and registering the optional launcher during self-update when Linux has no executable xdg-mime on PATH.
  • Skip URL-handler registration during fresh installs in the same environment.
  • Check desktop tooling rather than DISPLAY so desktop setup over SSH still works. Preserve warnings for genuine launcher failures.

Validation

  • The new CLI regression test failed before the fix and passes afterward. It covers missing, non-executable, and executable xdg-mime, with downloads blocked, and verifies real toolchain failures still fail the command.
  • cargo test -p pcb --locked: 9 tests passed.
  • cargo clippy -p pcb --all-targets --locked -- -D warnings: passed.
  • prek run cargo-fmt --files crates/pcb/src/main.rs crates/pcb/tests/self_update.rs install.sh: passed.
  • bash -n install.sh: passed; installer branch checks covered Linux with/without xdg-mime, macOS, and genuine registration failures.

Not yet released or tested in a live Blaxel sandbox.


Devin Review

Skip optional launcher updates on Linux when xdg-mime is unavailable, and avoid desktop registration warnings during fresh installs. Preserve desktop setup over SSH and report genuine update failures.
@akhilles
akhilles requested a review from LK October 22, 2026 23:03
devin-ai-integration[bot]

This comment was marked as resolved.

Match the shim's desktop capability check when xdg-mime is present but not executable. Exercise the full release installer against local artifacts, including skipped registration and genuine registration failures.
@akhilles
akhilles merged commit 4537966 into main Oct 23, 2026
12 checks passed
@akhilles
akhilles deleted the fix/headless-launcher-update branch October 23, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants