Skip to content

Handle missing polkit auth agent in updater - #396

Merged
ilysenko merged 4 commits into
ilysenko:mainfrom
moxw:codex/polkit-manual-install
Jun 3, 2026
Merged

Handle missing polkit auth agent in updater#396
ilysenko merged 4 commits into
ilysenko:mainfrom
moxw:codex/polkit-manual-install

Conversation

@moxw

@moxw moxw commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Detect missing graphical polkit authentication agents before the updater enters the pkexec install path.
  • Keep rebuilt packages ready and report a terminal sudo install command when GUI auth is unavailable.
  • Surface the manual-install message through the current Linux package updater bridge.
  • Bump codex-update-manager to 0.8.2 and document the behavior.

User-visible behavior

Clicking the in-app update button in minimal window-manager sessions without a graphical polkit agent no longer quits Codex into a failed pkexec path. The updater leaves the package ready and shows/reports the manual terminal command instead.

Validation

  • cargo check -p codex-update-manager
  • cargo test -p codex-update-manager
  • node --test scripts/patch-linux-window-ui.test.js
  • git diff --cached --check

@ilysenko

ilysenko commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@moxw Two blockers before this can be merged:

  1. The class-style updater bridge still does not handle Manual install required:. The bootstrap bridge now shows the manual sudo command, but the class-style path in scripts/lib/linux-update-bridge-patch.js still only handles already installed / No Codex Desktop update is ready. Please add the same branch there and cover it in the class-style updater bridge test.

  2. docs/updater.md still says the final install uses pkexec only. Please update it to describe the new manual/sudo fallback when no graphical polkit agent is available.

@moxw

moxw commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. I updated docs/updater.md in 94f27a3 to describe the pkexec/manual sudo fallback.

On the class-style updater bridge: I am intentionally leaving that path unchanged in this PR. The current upstream Electron app uses the bootstrap updater bridge, and this PR is scoped to the current upstream bundle shape. The class-style bridge is retained compatibility for older bundle shapes, and expanding this fix there would broaden the patch/test surface beyond the current app path we need to support.

@ilysenko ilysenko left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed current head. The docs blocker is fixed, and I am accepting the class-style updater bridge as legacy compatibility outside the current upstream bundle path. Current upstream/bootstrap path is covered and CI is green.

@ilysenko
ilysenko merged commit c826e04 into ilysenko:main Jun 3, 2026
6 checks passed
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