Skip to content

v0.1.3 — one panel per app

Choose a tag to compare

@angeloper86 angeloper86 released this 30 Sep 02:46
· 4 commits to main since this release

Fix — a workspace up opened two panels. The TUI picker dispatched every rundev command twice:
session.command resolves to void, so the guard res !== undefined never returned and the CLI
fallback always fired as well. One picker confirmation ran the verb twice — two flutter run splits
typed into the focused terminal, 3s apart (the server event log shows two up: app runs from a single
select event). The guard now checks that the client exposes the method, and the CLI path stays as
the fallback for an unreachable server.

Fix — interactive services were never idempotent. statusOf promised to report a panel as
running when a record existed, but nothing ever wrote one (the pidfile is only written for process),
so every up reported unknown and relaunched the panel. rundev now records the panel it opens and
down forgets it:

  • a second up reports already instead of opening a duplicate panel;
  • up <svc> --force relaunches on purpose (also exposed as a force in the agent tool), and an
    explicit app@ios over an android panel retargets instead of answering already;
  • check — or targets.<t>.check, for a service that switches device — makes a panel verifiable:
    a closed app is detected and up relaunches by itself;
  • the marker lives in its own file (<name>.panel.json): stopProcess kills by pidfile, and pid: 0
    would have addressed the whole process group. A defensive pid guard covers that path too;
  • logs for an interactive service no longer claims "no log yet": the panel owns its output.

12 new smoke assertions cover the marker, --force, the retarget, the .env guard and the per-target
check. Prefer a verifiable setup when you write a manifest:

"app": {
  "kind": "interactive",
  "targets": {
    "android": { "device": "emulator", "envSection": "ANDROID", "requires": ["emulator"],
                 "check": "adb shell pidof com.example.app" }
  }
}

Upgrade

opencode service restart   # re-resolves opencode-rundev@latest