dsh-mobilecode 0.11.5 → 0.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +19 -14
  2. package/lib/client.js +9 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -142,25 +142,30 @@ card is **Device 1**; co-op docks a second, **Device 2**. It is produced
142
142
  its online row, never a duplicate boot entry. A **Live** badge shows the
143
143
  streamed serial. Quick sizes (Fit / 100% / S·240 / M·320 presets + a select)
144
144
  and frame styles (none / bezel / device) reshape the stage — each stream pane
145
- carries its own copy of these controls (0.11.2). In **Fit** the stage locks
146
- to a shared height, so the two panes sit at identical heights even when the
147
- devices have different screen aspect ratios (0.11.3).
145
+ carries its own copy of these controls (0.11.2). In **Fit** the stage hugs
146
+ the device's real aspect a poller reads the MJPEG `<img>`'s
147
+ `naturalWidth/naturalHeight`, sets `--mc-ar-n` on the stage, and the stage
148
+ box becomes `width: min(100%, 60vh · ar); aspect-ratio: ar` — no letterbox
149
+ bars, and two devices with different aspect ratios keep equal visible
150
+ height (0.11.5).
148
151
  - **Screenshot** captures a still via `POST /stream/still` (a real `screencap`,
149
152
  embedded as a data URL up to 4 MB) and flips the stage to a still view with a
150
153
  "back to Live" link.
151
154
  - **Co-op split view (⧉, v0.9.0)**: with two or more online devices the card
152
155
  header grows a ⧉ toggle that docks a second **Device 2** pane beside it —
153
- its own device select, live `<img>`, tap/drag control, and (since 0.11.2) its
154
- own Size/Frame row mirroring Device 1's; both panes default to Fit, which
155
- locks to one stage height, so the pair starts identical and can be styled
156
- independently. Each pane grants its own HMAC capability; closing one pane
157
- never stalls or disturbs the other stream. A presence watcher polls device
158
- liveness while streaming: if a device is powered off (⏻ off, crash, unplug)
159
- its pane drops the frozen frame and the Live badge within ~5 s, and stays
160
- idle instead of silently grabbing another device both panes guard against
161
- the re-grab (0.11.3–4). Both stream
162
- captions carry the running client version (`· v0.11.x`) so a page refresh is
163
- visibly proven.
156
+ its own device select, live `<img>`, tap/drag control, its own Size/Frame
157
+ row (0.11.2), and since 0.11.5 the same **nav toolbar** (Back/Home/Recents/
158
+ Rotate/Refresh) and **☰ device-actions menu** as Device 1. The section is a
159
+ responsive CSS grid `repeat(auto-fit, minmax(min(250px, 100%), 1fr))`, so
160
+ dragging the drawer narrow stacks the panes vertically and widening it puts
161
+ them side by side (0.11.5). Each pane grants its own HMAC capability;
162
+ closing one pane never stalls or disturbs the other stream. A presence
163
+ watcher polls device liveness while streaming: if a device is powered off
164
+ (⏻ off, crash, unplug) its pane drops the frozen frame and the Live badge
165
+ within ~5 s, and stays idle instead of silently grabbing another device
166
+ both panes guard against the re-grab (0.11.3–4). Both stream captions carry
167
+ the running client version (`· v0.11.x`) so a page refresh is visibly
168
+ proven.
164
169
  - **Security**: every stream route sits behind a loopback + trusted-browser
165
170
  transport fence (peer address, loopback `Host`, `Sec-Fetch-Site` / `Origin` —
166
171
  so a LAN client cannot spoof localhost and a DNS-rebinding `Host` is rejected),
package/lib/client.js CHANGED
@@ -123,10 +123,16 @@ window.__ModuleLoader__.load({
123
123
  .mc-live-section { display: flex; flex-direction: column; gap: 10px; }
124
124
  .mc-live-section.coop { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 10px; align-items: start; }
125
125
  .mc-live-section.coop > .mc-card { min-width: 0; }
126
- .mc-live-section.coop .mc-card-head { flex-wrap: wrap; }
126
+ /* 0.11.6: the co-op head must NEVER wrap to a second row — a wrapped
127
+ head offsets one pane's stage ~38px lower than its sibling's, which
128
+ read as "the bars in Device 1 make the heights differ". Children
129
+ shrink instead (picker/select ellipsize). */
130
+ .mc-live-section.coop .mc-card-head { flex-wrap: nowrap; min-width: 0; }
131
+ .mc-card-head .mc-picker { flex: 1 1 auto; min-width: 0; }
132
+ .mc-card-head .mc-picker .mc-btn { min-width: 0; }
127
133
  /* No coop-specific height cap: both panes must share Device 1's 60vh rule so
128
134
  they match at every size, Fit included (0.11.2). */
129
- .mc-coop-select { width: auto; padding: 3px 6px; font-size: 12px; }
135
+ .mc-coop-select { width: auto; min-width: 0; flex: 0 1 auto; padding: 3px 6px; font-size: 12px; }
130
136
  .mc-live-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
131
137
  .mc-live-nav button { border: 1px solid light-dark(rgba(0,0,0,.16), rgba(255,255,255,.18)); background: light-dark(#fff, #20242b); color: inherit; border-radius: 999px; width: 40px; height: 32px; cursor: pointer; font-size: 14px; }
132
138
  .mc-live-nav button:hover { background: light-dark(rgba(0,0,0,.06), rgba(255,255,255,.1)); }
@@ -190,7 +196,7 @@ window.__ModuleLoader__.load({
190
196
  // Shown on both stream captions so a refresh visibly proves which client
191
197
  // bundle the browser is actually running. Kept in lockstep with
192
198
  // package.json by test/client.mjs.
193
- const MC_VERSION = "0.11.5";
199
+ const MC_VERSION = "0.11.6";
194
200
  // The panel shows cards for platforms the host can actually drive; the
195
201
  // server reports its OS in info.os (iOS tooling is darwin-only).
196
202
  const fallbackPlatforms = (os) => (os === "darwin" ? ["ios", "android"] : ["android"]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-mobilecode",
3
3
  "description": "MobileCode for the dsh web GUI: detect iOS/Android projects, run preview servers, and drive the simulator/emulator from the session — 37 agent tools (device_run, device_screen, device_ui_tree, device_ui_rows, device_tap_row, device_tap_element, device_wait_for, device_scroll_to, device_input, device_batch, device_intent, device_connect, device_pair_qr, device_perf, device_meminfo, device_backtrace, device_display, device_avd_create, device_pair_capture, device_app_info, device_install, device_uninstall, device_reboot, device_log, live screen stream, multimodal screenshots) plus a host-mediated co-op mesh hub (random callsigns, JSON pub/sub, tunable latency/jitter/drop/dup/throttle) so two virtual devices — and the AI watching them — can talk in real time. One classified adb boundary and a Wi-Fi connect/pair QR flow in the Connection settings tab. Hot-pluggable — mounted via the profile bundle list + cordis.patch.yml, no dsh source changes.",
4
- "version": "0.11.5",
4
+ "version": "0.11.6",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@11.22.0",
7
7
  "engines": {