Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Fixed

- Approval notifications now preserve the upstream Approve, Approve for
session, and Decline actions on Linux. A small freedesktop notification
bridge forwards the action and close signals that Electron's Linux
notification backend does not expose, with the existing View-only Electron
notification retained as a fail-soft fallback.
- Remote mobile cold starts now select one runtime owner deterministically.
Explicit systemd user-service configuration takes precedence over the
Desktop app-server and standalone fallback, while a versioned Desktop marker
Expand Down
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[workspace]
members = ["computer-use-linux", "read-aloud-linux", "updater", "record-replay-linux"]
members = [
"computer-use-linux",
"notification-actions-linux",
"read-aloud-linux",
"updater",
"record-replay-linux",
]
resolver = "2"
4 changes: 4 additions & 0 deletions docs/agents/repository-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ The updater runs unprivileged and only escalates through `pkexec` for

## Computer Use, Browser, Read Aloud, And Record & Replay

- `notification-actions-linux/`
Small Rust D-Bus bridge for freedesktop notification action and close
signals. The main-process core patch uses it only for upstream notifications
that already carry actions and falls back to Electron otherwise.
- `computer-use-linux/`
Rust crate for Linux Computer Use MCP, Chrome native messaging host, and the
COSMIC helper. It covers input, capture, accessibility, terminal, identity,
Expand Down
40 changes: 40 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@
cp -R ${./computer-use-linux} "$out/computer-use-linux"
chmod -R u+w "$out"
'';
notificationActionsBuildSource = pkgs.runCommandLocal "codex-notification-actions-linux-source" { } ''
mkdir -p "$out"
cp ${./Cargo.lock} "$out/Cargo.lock"
cat > "$out/Cargo.toml" <<'EOF'
[workspace]
members = ["notification-actions-linux"]
resolver = "2"
EOF
cp -R ${./notification-actions-linux} "$out/notification-actions-linux"
chmod -R u+w "$out"
'';
nativeModulesBuildSupport = pkgs.runCommandLocal "codex-native-modules-build-support" { } ''
mkdir -p "$out/scripts/lib"
cp ${./scripts/lib/native-modules.sh} "$out/scripts/lib/native-modules.sh"
Expand Down Expand Up @@ -161,6 +172,33 @@
'';
};

codexNotificationActionsBinary = pkgs.rustPlatform.buildRustPackage {
pname = "codex-notification-actions-linux";
version = "0.1.0";
src = notificationActionsBuildSource;

cargoLock = {
lockFile = ./Cargo.lock;
};

cargoBuildFlags = [
"-p"
"codex-notification-actions-linux"
];

doCheck = true;

installPhase = ''
runHook preInstall
release_dir="target/''${CARGO_BUILD_TARGET:-${pkgs.stdenv.hostPlatform.rust.rustcTarget}}/release"
if [ ! -d "$release_dir" ]; then
release_dir="target/release"
fi
install -Dm0755 "$release_dir/codex-notification-actions-linux" "$out/bin/codex-notification-actions-linux"
runHook postInstall
'';
};

codexMcpHelperReaper = pkgs.rustPlatform.buildRustPackage {
pname = "codex-mcp-helper-reaper";
version = "0.1.0";
Expand Down Expand Up @@ -497,6 +535,7 @@ PY
export CODEX_LINUX_COMPUTER_USE_BACKEND_SOURCE="${codexComputerUseBinaries}/bin/codex-computer-use-linux"
export CODEX_LINUX_COMPUTER_USE_COSMIC_SOURCE="${codexComputerUseBinaries}/bin/codex-computer-use-cosmic"
export CODEX_CHROME_EXTENSION_HOST_SOURCE="${codexComputerUseBinaries}/bin/codex-chrome-extension-host"
export CODEX_NOTIFICATION_ACTIONS_SOURCE="${codexNotificationActionsBinary}/bin/codex-notification-actions-linux"
${pkgs.lib.optionalString (builtins.elem "mcp-helper-reaper" linuxFeatureIds) ''
export CODEX_MCP_HELPER_REAPER_SOURCE="${codexMcpHelperReaper}/bin/codex-mcp-helper-reaper"
''}
Expand Down Expand Up @@ -719,6 +758,7 @@ PY
};

checks = {
notification-actions-linux = codexNotificationActionsBinary;
nix-linux-features-evaluation = import ./nix/linux-features-test.nix {
inherit pkgs self system;
};
Expand Down
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ LINUX_ICON_SOURCE="${CODEX_LINUX_ICON_SOURCE:-}"
. "$SCRIPT_DIR/scripts/lib/asar-patch.sh"
. "$SCRIPT_DIR/scripts/lib/webview-install.sh"
. "$SCRIPT_DIR/scripts/lib/bundled-plugins.sh"
. "$SCRIPT_DIR/scripts/lib/notification-actions.sh"
. "$SCRIPT_DIR/scripts/lib/linux-features.sh"
. "$SCRIPT_DIR/scripts/lib/rebuild-report.sh"
. "$SCRIPT_DIR/scripts/lib/build-info.sh"
Expand Down Expand Up @@ -341,6 +342,7 @@ main() {
download_electron
extract_webview "$app_dir"
install_app
stage_linux_notification_actions_bridge
install_bundled_plugin_resources "$app_dir"
run_linux_feature_stage_hooks "$app_dir"
create_start_script
Expand Down
16 changes: 16 additions & 0 deletions notification-actions-linux/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "codex-notification-actions-linux"
version = "0.1.0"
edition = "2021"

[[bin]]
name = "codex-notification-actions-linux"
path = "src/main.rs"

[dependencies]
anyhow = "1.0.102"
futures-util = "0.3.32"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = "1.0.149"
tokio = { version = "1.51.1", features = ["io-std", "io-util", "macros", "rt"] }
zbus = "5.14.0"
23 changes: 23 additions & 0 deletions notification-actions-linux/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Linux Notification Actions Bridge

`codex-notification-actions-linux` bridges the action-bearing notification
payload already produced by Codex Desktop to the freedesktop
`org.freedesktop.Notifications` interface. Electron exposes notification action
buttons on macOS and Windows but not Linux, even when the active Linux
notification server advertises the standard `actions` capability.

The Electron main-process patch starts one short-lived bridge process per
actionable notification. The bridge accepts one JSON request on stdin, sends JSON events
for show, click, action, and close on stdout, and accepts `close` on stdin. It
does not execute commands or make approval decisions; it returns only the
selected action index to the existing upstream notification callback.

If the session bus or notification server is unavailable, or the server does
not advertise action support, the bridge reports `unavailable` and the app
uses its existing Electron notification instead.

Run its tests from the repository root:

```bash
cargo test -p codex-notification-actions-linux
```
Loading
Loading