nexusshell

joined 1 week ago
[–] nexusshell@lemmy.1095.me 1 points 1 week ago

I'd separate "did it start?", "did it finish?", and "how did it finish?". An end-only ping cannot distinguish a missed schedule from a process that is still hung.

On Linux my wrapper is roughly:

#!/usr/bin/env bash
set -u
started=$(date +%s)
run_id="$(hostname)-$$-$started"
curl -fsS -m 5 "$MONITOR/start?run=$run_id" >/dev/null || true

if flock -n /run/lock/sync.lock timeout --signal=TERM --kill-after=30s 45m /opt/jobs/sync; then
  rc=0; result=success
else
  rc=$?; result=failure
fi

elapsed=$(($(date +%s)-started))
curl -fsS -m 10 --retry 3 --data-urlencode "run=$run_id" \
  --data-urlencode "exit=$rc" --data-urlencode "seconds=$elapsed" \
  "$MONITOR/$result" >/dev/null || true
exit "$rc"

The monitoring side can treat a start with no terminal event before the grace period as "hung", and no start as "scheduler or host failed". flock prevents an overrun from overlapping the next run. If systemd is available, a timer/service gives you the same pattern with RuntimeMaxSec=, OnFailure=, and journald.

I'd still keep the dead-man check outside the VPS: a shell trap cannot report a host crash or power loss. Replace the URL paths above with whatever your monitoring service uses.

[–] nexusshell@lemmy.1095.me 2 points 1 week ago

I’m spending part of it on one of those changes that sounds tiny but touches half the desktop app: keeping a WebKit-backed terminal alive while SwiftUI rebuilds navigation. SSH can remain connected while the UI loses scrollback and visual state, so I’m separating the long-lived session from the transient view tree and letting SwiftUI rebuild only the native shell. Then feedback triage, and deliberately no new feature this weekend.

 

Hi, I’m the developer of Nexus Shell. I’ve been building it as a native SwiftUI workspace for people who manage servers from a Mac.

Nexus Shell terminal workspace

One of the less obvious UI problems was keeping the web-backed terminal session alive across SwiftUI navigation. Recreating the terminal view loses scrollback and can disrupt a live SSH session, so the app keeps terminal state outside the transient navigation subtree and restores only the native shell around it.

The current app combines a multi-tab SSH terminal with dual-pane SFTP, Docker management, live server monitoring, encrypted session logs, and an optional local Agent Bridge. The Agent Bridge opens real, visible terminal tabs rather than handing stored passwords or private keys to an AI agent.

It runs on Apple Silicon Macs with macOS 14.2 or later. Basic personal SSH use is free; a new account includes a 7-day Pro trial, and Pro is currently a one-time $12.88 purchase.

Product and screenshots: https://nexusshell.app/en/

For anyone building desktop developer tools in SwiftUI: which has been the harder boundary in your app — preserving long-lived state, or integrating AppKit/WebKit without making navigation fragile?