You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Restart does not apply a newly attached USB device to an app, yet the UI stops asking for a restart #134
When a USB stick is attached to (or removed from) a running app, the Devices tab shows "Restart to apply" (web/src/usb.tsx line 50, driven by needsRestart in omarchyd/usb.mjs). The Restart button runs apps.restart, which is lifecycle(['restart'], 'restarting') in omarchyd/apps.mjs (around lines 1679-1699). For a restart it rewrites compose.usb.yml and then runs plain docker-compose restart:
docker-compose restart only restarts the existing containers; it does not re-read the compose files, so the new devices: entries (or the removal of old ones) never reach the container. Only up -d recreates a container when its configuration changed. Despite that, usbApplied is set to the full device list, so usbBindings() reports the device as live (liveIds), needsRestart turns false and the hint disappears. The app still does not have the device, and the UI now says it does.
How to reproduce
I ran createApps with a stand-in run that records the compose calls: installed an app, called bindUsb('demo-app', {id: '10c4:ea60', path: '/dev/ttyUSB0', ...}), then apps.restart.
Actual: the only compose command run is ... -f compose.omarchy.yml -f compose.usb.yml restart, and afterwards usbBindings()[0].liveIds is ['10c4:ea60'] (it was [] before). The overlay file does contain the device.
Expected: either the restart recreates the container (for example up -d --force-recreate, or stop followed by up -d), or usbApplied is not updated by a plain restart so the "Restart to apply" hint stays until the device really is applied. Stop then Start does apply it, which is not what the hint tells the user to do.
Suggested fix
For an app restart, run up -d --force-recreate (or stop then up -d) after writing the overlay, or only set usbApplied after an up.
Thank you @nixfred. Restart recreates the container, so a stick attached since the last start is the one that runs. The saved applied list matches that. This is on main in #844.
Activity
calledtoconstruct commentedon Nov 21, 2026
Working to resolve this.
No open pull request references this issue, and no one has commented that they are working on it.
This shares the app manager with #804, #688, #138, #679, #528, and #134. They share code and will land in one pull request.
🤖 Generated with Grok 4.7
calledtoconstruct commentedon Nov 21, 2026
Thank you @nixfred. Restart recreates the container, so a stick attached since the last start is the one that runs. The saved applied list matches that. This is on main in #844.
🤖 Generated with Grok 4.7