Repository navigation
Conversation
Lands the missing server review fixes from feat/device-panel-server alongside security and reliability fixes found in the live nightly audit: - DeviceChannels: reject control characters and whitespace in device paths, tighten helper IDs to [A-Za-z0-9._-]+, verify canonical URL pathname, validate WS subprotocols, register WS channels before dialing the hub, stay inside the 2 MiB window, fail slow before enqueuing oversized messages, allow the draining nextSeq at the 64-message buffer limit, cap outbound bufferedAmount, keep UTF-16 surrogate pairs whole, and clean up handshake listeners. - DeviceService & LocalDeviceHost: persist pendingReleases before updating in-memory claims, check daemon PID liveness before refusing session close, withdraw launchers and agent-device.json when agent access turns off (and re-check agent access before recording/binding), keep retrying failed hub restarts with backoff, verify hub liveness in currentHub, reap stale hubs on start and stop, read the hub token from stdout only with Bearer on /readyz, reserve own tool ports before spawn and clear agent port only after stop, and guard the settings watcher per change. - AgentDeviceShim: refuse agent override flags (--session, -s, device/daemon flags), strip --serial for Android cdp/connection, stop matching positional -h on fill/type, write launchers atomically, hash non-plain IDs, forward SIGTERM/SIGINT, and escape % in Windows .cmd scripts. - DeviceActions, DeviceHubOperations, Codex, Guide: implement iOS shake via notifyutil, reject Android permission reset instead of revoking, capture Xcode 26 fallback screenshots with a scoped temp file, set Codex device MCP tool_timeout_sec=300, drop redundant device listing on device_open, and update the device-tab guide topic.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
badcuban
enabled auto-merge
November 23, 2026 23:15
# Conflicts: # apps/server/src/device/DeviceService.ts
TranscriptSelectionPopover focuses its note textarea inside requestAnimationFrame after Add note is clicked. On busy CI runners, userEvent.keyboard started typing before that frame ran, dropping characters or leaving the note empty so toggling Source dismissed it. Wait for the note input to have focus before typing.
badcuban
added this pull request to the merge queue
Nov 24, 2026
Any commits made after this event will not be merged.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes server-side security, lifecycle, and reliability gaps in the Device panel (including the server review fixes that had stayed unmerged on
feat/device-panel-server).What was wrong
\t/\n, letting WHATWG URL normalization traverse out of/vendor/serve-sim/helper/<id>/...with the hub's bearer token.pendingReleases+ dead-daemon PID checks, hub restart retry loop, stale-hub reaping, stdout-only token parsing, and strict WS channel registration/flow control) had not made it intomain. A crashedagent-devicedaemon left sessions impossible to close.device_openduring cold installs and simulator/emulator boots, iOSshakereturned unsupported, Android permissionresetsilently revoked, and the app guide missed Round 2 device features.How it's fixed
?,#; tighten helper IDs to[A-Za-z0-9._-]+; assert canonicalURL.pathname; validate WS subprotocols; register slots before dialing; hold strictly inside the 2 MiB window; failslowbefore enqueuing oversized messages; allow the drainingnextSeqat the 64-message limit; cap outboundbufferedAmount; keep surrogate pairs together; clean up handshake listeners.claims.json(withpendingReleases) before mutating memory; check daemon PID liveness inreleaseAgentSessionandstopAgentDeviceDaemon; revoke launchers andagent-device.jsonunder locks when agent access turns off (and re-check mid-boot); retry failed hub restarts with backoff and check hub liveness incurrentHub; reap stale hubs at startup and shutdown; read hub token from stdout only and send Bearer on/readyz; register hub port before spawn and clear agent port only after stop; preserve a healthy hub'sreadystatus when agent tool setup fails; guard settings watcher per change.--session/-s/device/daemon override flags; strip--serialfor Androidcdp/connection; avoid matching positional-honfill/type; write launchers atomically; hash non-plain IDs; forward signals; escape%on Windows.shakevianotifyutil; return unsupported for Android permissionreset; use scoped temp files for Xcode 26 fallback screenshots; set Codex device MCPtool_timeout_sec=300; skip duplicate device listing indevice_open; updatedevice-tabguide topic anddocs/design/devices.md.Checks
vp fmt,vp lint(0 errors),vp run --cache '@threadlines/server#typecheck'(0 errors)vp run --cache '@threadlines/server#test' Device(48/48 passed)vp run --cache '@threadlines/server#test' PreviewTunnel(10/10 passed)vp run --cache '@threadlines/server#test' guide(7/7 passed)vp run --cache '@threadlines/server#test' codexAppServerArgs(3/3 passed)Note:
AgentDeviceShim.test.tshad an outdated assertion expectingopen --session mineto override the bound session; updated to expect refusal per the bound-session requirement.