feat(status-ui): improve bridge recovery and desktop controls

This commit is contained in:
2026-07-28 21:15:25 +02:00
parent 7cc15cca92
commit a792c577ef
23 changed files with 1336 additions and 204 deletions
+20 -7
View File
@@ -81,23 +81,36 @@ node src/client/noctalia-relay-cli.js \
Install the adapter that matches your desktop: [`noctalia-plugin/`](noctalia-plugin/) supports v4 and [`noctalia-v5-plugin/`](noctalia-v5-plugin/) supports v5. Both adapters are presentation-only; neither starts Pi nor approves extension requests.
## Run as a user service
## Keep the bridge running in the background (recommended)
The included [`systemd/pi-status-bridge.service`](systemd/pi-status-bridge.service) is a portable user-service example. Install the bridge CLI, then ensure both `pi-status-bridge` and `pi` are on the user service's `PATH`:
The desktop UI connects on demand; only the bridge needs to run persistently. On Linux systems using systemd, install the bridge command globally once, then use the included user service:
```bash
npm install --global .
command -v pi-status-bridge pi
npm run bridge:service:install
```
mkdir -p ~/.config/systemd/user
cp systemd/pi-status-bridge.service ~/.config/systemd/user/
systemctl --user daemon-reload
systemctl --user enable --now pi-status-bridge.service
systemctl --user status pi-status-bridge.service
The npm commands below are short, copyable wrappers around `systemctl --user`:
```bash
npm run bridge:service:start # start the bridge
npm run bridge:service:restart # apply bridge changes or recover it
npm run bridge:service:stop # stop the bridge
npm run bridge:service:status # check whether it is healthy
npm run bridge:service:logs # follow bridge logs; Ctrl+C returns to the shell
```
If systemd cannot locate either executable, add a user-service drop-in that sets `PATH` to their containing directories; do not hard-code another user's home path in the tracked unit.
### Opening the desktop UI
- **Development:** run `npm --prefix ui run tauri dev` in a terminal after starting the bridge.
- **Installed UI:** launch it from your application menu or run `pi-status-ui --toggle`. The `--toggle` command shows a hidden window or hides a visible one; it does not restart the bridge.
- **Noctalia:** use the Pi Status launcher as usual; it opens the installed UI.
**Restart Pi** in the UI restarts only the selected directory's Pi agent. `npm run bridge:service:restart` restarts the whole bridge service and all of its active agents.
## Development
```bash