From 55c0b82284f7031fdcf5627960997d5481c67d2b Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Fri, 29 May 2026 20:38:07 -0400 Subject: [PATCH] refactor(just): slim down mobile-dev to just run Flutter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mobile-dev was bundling migrations, Docker service startup, and relay compilation (with a 90-second polling loop) alongside the Flutter run. The desktop dev recipe doesn't do this — it expects the relay to already be running via `just relay`. Mobile should follow the same pattern. --- justfile | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/justfile b/justfile index c4f051e15..2b2c5f853 100644 --- a/justfile +++ b/justfile @@ -340,34 +340,14 @@ mobile-check: mobile-test: unset GIT_DIR GIT_WORK_TREE; cd {{mobile_dir}} && flutter test -# Run the mobile app on iOS simulator (starts infra + relay automatically) +# Run the mobile app on iOS simulator mobile-dev: #!/usr/bin/env bash set -euo pipefail - just _ensure-migrations - # Start relay in background if not already running - RELAY_PID="" - if ! lsof -i :3000 -sTCP:LISTEN -t &>/dev/null; then - echo "Starting relay in background (log: /tmp/sprout-relay.log)..." - cargo run -p sprout-relay &>/tmp/sprout-relay.log & - RELAY_PID=$! - trap 'if [[ -n "$RELAY_PID" ]]; then kill "$RELAY_PID" 2>/dev/null || true; fi' EXIT - echo -n "Waiting for relay" - for _ in $(seq 1 30); do - lsof -i :3000 -sTCP:LISTEN -t &>/dev/null && break - echo -n "." - sleep 3 - done - echo " ready" - else - echo "Relay already running on :3000" - fi - # Open iOS simulator if not already running if ! pgrep -x Simulator &>/dev/null; then open -a Simulator sleep 3 fi - # Run Flutter cd {{mobile_dir}} unset GIT_DIR GIT_WORK_TREE flutter run