Repository navigation
feat(linux): Quick Chat floating composer for the Tauri companion - #109947
Conversation
- frameless transparent always-on-top quickchat window (on-demand, canvas pattern), positioned top-third on the cursor monitor, CSS fade+zoom in/out - global shortcut Ctrl+Shift+Space on X11 (GNOME reserves Alt+Space); tray 'Quick Chat' item is the Wayland entry point; blur/Esc/close-request hide - sends via the CLI agent turn with --message-file staged 0600 (argv is world-readable procfs) and cleaned up after the turn; failures surface as desktop notifications; Ctrl+Enter also opens the dashboard - default-agent identity chip (emoji/monogram) from agents list --json, 60s cache - window-scoped capability + permission set; window-state denylist; docs
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat(linux): Quick Chat floating composer for the Tauri companion This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6a1161ff01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// agent turn can keep running for minutes, so the text must never appear in `--message`. | ||
| fn write_message_file(message: &str) -> Result<PathBuf, String> { | ||
| use std::io::Write; | ||
| use std::os::unix::fs::OpenOptionsExt; |
There was a problem hiding this comment.
Guard Unix-only temp-file permissions for Windows bundles
When release operators set desktop-test-bundles=true, .github/workflows/linux-app-release.yml runs the build_windows job and builds this same apps/linux/src-tauri crate as an NSIS bundle. Because quickchat.rs is compiled unconditionally and this function imports std::os::unix::fs::OpenOptionsExt (and then calls .mode(0o600)), the Windows Rust target cannot compile the module. Gate the Unix-only permission setting or use a cross-platform temp-file creation path so the optional Windows desktop test bundle keeps building.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 17, 2026, 7:30 AM ET / 11:30 UTC. Summary PR surface: Docs +8, Other +889. Total +897 across 11 files. Reproducibility: not applicable. as an issue reproduction because this is a new feature PR. The Windows compile failure is source-reproducible from the unconditional Unix-only API use and the existing Windows bundle workflow. Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the on-demand Tauri window and existing CLI delegation, but make secure message-file staging compile across every supported bundle target, then provide redacted real Linux proof for the X11 shortcut, Wayland tray, successful main-session send, dismissal, and failed-turn notification behavior. Do we have a high-confidence way to reproduce the issue? Not applicable as an issue reproduction because this is a new feature PR. The Windows compile failure is source-reproducible from the unconditional Unix-only API use and the existing Windows bundle workflow. Is this the best way to solve the issue? Mostly yes: an on-demand Tauri window using the companion's existing CLI delegation is the narrowest architectural fit, but it is not the best mergeable implementation until secure temporary-file staging is cross-target and the real Linux flow is proven. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against c3f552628585. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Docs +8, Other +889. Total +897 across 11 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
Runtime proof from a Linux desktop environment (Ubuntu 24.04 container, Xvfb + openbox + picom, X11): the composer was summoned with the real registered global shortcut (
Full desktop context: tauri-quickchat-full.png Notes: the agent chip shows the monogram fallback ("A"/Agent) because the shell's first-run CLI install state hadn't settled in the container — the identity path itself is verified against |
|
Merged via squash.
|
…enclaw#109947) * feat(linux): add Quick Chat floating composer to the Tauri companion - frameless transparent always-on-top quickchat window (on-demand, canvas pattern), positioned top-third on the cursor monitor, CSS fade+zoom in/out - global shortcut Ctrl+Shift+Space on X11 (GNOME reserves Alt+Space); tray 'Quick Chat' item is the Wayland entry point; blur/Esc/close-request hide - sends via the CLI agent turn with --message-file staged 0600 (argv is world-readable procfs) and cleaned up after the turn; failures surface as desktop notifications; Ctrl+Enter also opens the dashboard - default-agent identity chip (emoji/monogram) from agents list --json, 60s cache - window-scoped capability + permission set; window-state denylist; docs * chore(linux): register quickchat.js as a knip native-asset entry
* fix(linux): restore the macOS build of the Tauri companion Tauri gates `WebviewWindowBuilder::transparent` behind its `macos-private-api` feature on macOS, so the companion stopped compiling for macOS when Quick Chat landed in #109947: `no method named 'transparent' found for struct 'WebviewWindowBuilder'`. Enable that feature together with the matching `app.macOSPrivateApi` config flag, which Tauri requires to agree with it or tauri-build fails the allowlist check. Quick Chat is built for a transparent window - quickchat.css makes html and body transparent behind a 16px-radius translucent card with a drop shadow - so compiling macOS by dropping `.transparent(true)` would ship an opaque rectangle instead of the floating composer. Also add a per-PR macOS `cargo check`. The only job that compiled the macOS target sits behind a manual dispatch input in linux-app-release.yml, which is why a broken macOS build survived for nine days. * ci(linux): build the macOS companion on macos-15 tauri-plugin-notifications' Swift sources use typed throws (`throws(FFIResult)`), which requires Swift 6. The macos-14 runner image still ships Swift 5.x and cannot parse them, so the plugin's build script panics with "Swift build failed for target: arm64-apple-macosx13.0". This hit the new per-PR check immediately, and it means the release workflow's `build_macos` job could not have produced a macOS bundle either - it compiles the same crate on the same image, but only runs behind a manual dispatch input so nothing surfaced it. Move both to macos-15.
…114243) * fix(linux): restore the macOS build of the Tauri companion Tauri gates `WebviewWindowBuilder::transparent` behind its `macos-private-api` feature on macOS, so the companion stopped compiling for macOS when Quick Chat landed in openclaw#109947: `no method named 'transparent' found for struct 'WebviewWindowBuilder'`. Enable that feature together with the matching `app.macOSPrivateApi` config flag, which Tauri requires to agree with it or tauri-build fails the allowlist check. Quick Chat is built for a transparent window - quickchat.css makes html and body transparent behind a 16px-radius translucent card with a drop shadow - so compiling macOS by dropping `.transparent(true)` would ship an opaque rectangle instead of the floating composer. Also add a per-PR macOS `cargo check`. The only job that compiled the macOS target sits behind a manual dispatch input in linux-app-release.yml, which is why a broken macOS build survived for nine days. * ci(linux): build the macOS companion on macos-15 tauri-plugin-notifications' Swift sources use typed throws (`throws(FFIResult)`), which requires Swift 6. The macos-14 runner image still ships Swift 5.x and cannot parse them, so the plugin's build script panics with "Swift build failed for target: arm64-apple-macosx13.0". This hit the new per-PR check immediately, and it means the release workflow's `build_macos` job could not have produced a macOS bundle either - it compiles the same crate on the same image, but only runs behind a manual dispatch input so nothing surfaced it. Move both to macos-15.


What Problem This Solves
The Linux/Tauri companion has no quick way to message the agent — every interaction goes through the full dashboard. This is the cross-platform sibling of the macOS Quick Chat bar (#109720): a summonable floating composer that fires a message at the default agent's main session and gets out of the way.
Why This Change Was Made
First deliberately minimal step, matching the shell's existing architecture (CLI delegation, static frontend, on-demand windows):
quickchatwebview created on demand (same pattern as the Canvas window), centered on the cursor's monitor with its top edge at ~22% of the work area, excluded from window-state restoration. CSS-driven fade+zoom in/out (140ms/100ms) with a JS↔Rust hide handshake; hides on Escape, focus loss, close-request, successful send, or toggle.Ctrl+Shift+Spaceglobal shortcut on X11 (Alt+Space is GNOME's window-menu grab and can never be registered; the existing X11-only gate applies — the plugin's Linux backend doesn't support Wayland) and a Quick Chat tray item that works everywhere including Wayland. The existingCmdOrCtrl+Shift+Odashboard shortcut is untouched; the handler now dispatches by shortcut identity.quickchat_sendcommand runsopenclaw agent --message-file <owner-only tmp> --session-key main --jsondetached — the message is staged in a 0600 file and deleted after the turn because argv is world-readable through procfs and an agent turn can run for minutes. The bar shows the accepted state immediately; a failed turn surfaces as a desktop notification with the first stderr line.Ctrl+Enteradditionally opens the dashboard.quickchat_identityresolves the default agent fromopenclaw agents list --json(60s cache) and renders emoji or a hue-hashed monogram with a "Message " placeholder.quickchatwindow with its own permission set; no permission strip on Linux (no TCC equivalent), and no accessibility/window-capture features in this first step by design.User Impact
Linux companion users get a keyboard-first composer for the main session. Replies stay in the normal session (dashboard). No changes to existing windows, shortcuts, or gateway behavior.
Release-note context:
feat(linux): Quick Chat floating composer — Ctrl+Shift+Space (X11) or tray item, sends to the main session via the CLI.Evidence
gpt-5.6-sol, xhigh): three passes; accepted findings fixed (procfs argv exposure →--message-filewith 0600 staging and cleanup incl. partial-write failure; GNOME-reserved Alt+Space default replaced; staged-file cleanup on every error path); final pass clean — "no accepted/actionable findings".agents list --jsonemitsidentityName/identityEmoji/isDefault(src/commands/agents.commands.list.ts);agent --message-file/--session-keyflags and bare-key default-agent resolution (src/cli/program/register.agent-turn.ts, src/agents/command/session.ts).Shortcut::matchesverified in the vendored plugin's upstream source.linux-appCI lane (cargo fmt --check+ full Tauri bundle build on ubuntu) is the compile/build gate for this PR. Runtime verification on a real Linux desktop is a follow-up; the feature is additive and cannot affect existing shell behavior when unused.