Skip to content

Show active shares in UI; run host CLI agents under Flatpak#94

Open
johnjazzi wants to merge 4 commits into
mainfrom
dev
Open

Show active shares in UI; run host CLI agents under Flatpak#94
johnjazzi wants to merge 4 commits into
mainfrom
dev

Conversation

@johnjazzi

Copy link
Copy Markdown
Contributor

Summary

Follow-ups from 0.2.8/0.2.9 testing (Mac + Linux/Alpine flatpak). Two-way peer discovery is confirmed working; these fix the remaining reported issues.

Share status not shown

syncActiveShares() (sync from the backend's real active-share list) was defined but never called, so the Share panel showed "not sharing" even when a share was active (e.g. auto-started "share all workspaces"). Now synced on workspace load and on Share-panel mount.

CLI agents under Flatpak (Linux)

The flatpak sandbox can't see host-installed CLIs (claude/gemini/codex), so detection, model listing, and launch all failed — which also made the agent list look empty ("can't find / can't add an agent"). Added in_flatpak() + host_command() and route is_installed, list_models, and the pty_spawn exec through flatpak-spawn --host when sandboxed (cwd via --directory, env via --env=). Manifest gains --talk-name=org.freedesktop.Flatpak (the Development portal flatpak-spawn needs). MCP env is forwarded; --share=network already shares the host loopback so the host agent reaches the in-app MCP server.

Also

  • Peer "can't get files" now shows the real error + 8s timeout (from prior work in this branch).

Specs updated. 311 tests pass; cargo check clean; version synced to 0.2.9. The Flatpak agent path can't be verified locally (no flatpak here) — needs a flatpak rebuild to test.

🤖 Generated with Claude Code

john and others added 4 commits June 15, 2026 22:56
…nder Flatpak

Share status:
- syncActiveShares() was defined but never called, so the Share panel never
  reflected the backend's real active shares (e.g. an auto-started "share all
  workspaces"). Now synced on workspace load and on Share-panel mount.

Flatpak agents (Linux):
- The sandbox can't see host-installed CLIs (claude/gemini/codex), so detection,
  model listing, and launch all failed. Added in_flatpak() + host_command() and
  route is_installed, list_models and the pty_spawn exec through
  `flatpak-spawn --host` when sandboxed (cwd via --directory, env via --env=).
- Manifest: add --talk-name=org.freedesktop.Flatpak (the Development portal
  flatpak-spawn requires). MCP env is forwarded; --share=network already shares
  the host loopback so the host agent reaches the in-app MCP server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Finder/Dock launches inherit launchd's minimal PATH
(/usr/bin:/bin:/usr/sbin:/sbin), so `which claude` and bare-binary
spawns missed Homebrew/npm-global installs after the Tauri refactor —
every preset showed "Not installed" and sessions wouldn't start.

- Add cached login_shell_path(): queries `$SHELL -ilc 'printf %s "$PATH"'`,
  merges inherited PATH + common fallbacks (homebrew, ~/.local/bin,
  ~/.cargo/bin, npm-global, bun, deno, volta), deduped.
- host_command() and pty_spawn() (non-Flatpak) set child PATH to it so
  detection and launch find host agents. Flatpak path unchanged.
- Fix agent_control_add_custom_agent to return { ok, agent } — the shape
  the store and tests expect; bare entry left result.ok undefined so
  added agents never rendered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant