Devices: the app waits for its old server before starting the new one; clipboard sends keep their headset (review round 31)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-29 08:27:52 +10:00
1 parent cb6f294299
commit a9740ad6f2
4 files changed
+13 -5

No files matched your search

+2 -1
View File
@@ -1503,9 +1503,10 @@ $("clipSend").onclick = () => {
// In the app, Electron reads the clipboard; in a browser, the server does.
async function sendComputerClipboard() {
if (!window.frameApp) return api("/api/clipboard", { fromComputer: true });
const device = window.connDevice; // the headset it was sent to, not one switched to while reading
const text = await window.frameApp.readClipboard();
if (!text) throw new Error("The clipboard is empty (or holds something other than text)");
return api("/api/clipboard", { text });
return api("/api/clipboard", { text }, device);
}
$("clipMac").onclick = () => act($("clipMac").textContent, sendComputerClipboard, $("clipMac"));
+1 -1
View File
@@ -1662,7 +1662,7 @@ def one_server():
edit the headsets on their own, and could move each other's installs to another
headset. Held until this process exits. (FRAME_CONTROL_DATA_DIR gives a second,
separate one, as the tests do.)"""
lock = frame_devices.file_lock(frame_host.data_dir("server.lock"), timeout=8) # the app restarting its server
lock = frame_devices.file_lock(frame_host.data_dir("server.lock"), timeout=float(os.environ.get("FRAME_CONTROL_SERVER_WAIT") or 20)) # while the app restarts it
try:
lock.__enter__()
except OSError: