@trusty-squire/mcp 0.7.8 → 0.7.9

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.
@@ -40,6 +40,15 @@
40
40
  the same `overflow:hidden` trick. */
41
41
  #screen { flex: 1; position: relative; background: #0f1115;
42
42
  min-height: 0; min-width: 0; overflow: hidden; }
43
+ /* Diagnostic overlay — temporary. Shows live #screen + canvas
44
+ dimensions so we can debug "why isn't the canvas scaling on
45
+ this user's phone" without remote-debugging the browser.
46
+ Remove once the mobile-fit issue is closed out. */
47
+ #diag { position: fixed; left: 8px; bottom: 8px;
48
+ background: rgba(0,0,0,0.7); color: #4ade80;
49
+ font: 11px/1.3 ui-monospace, monospace;
50
+ padding: 6px 8px; border-radius: 6px; z-index: 30;
51
+ pointer-events: none; white-space: pre; }
43
52
  /* Overlay siblings of #screen — `position: fixed` against the
44
53
  viewport, NOT positioned inside #screen. RFB appends a <canvas>
45
54
  child to #screen at connect time, and that canvas can cover any
@@ -96,6 +105,7 @@
96
105
  autocorrect="off" autocapitalize="off" spellcheck="false"
97
106
  aria-hidden="true" tabindex="-1" />
98
107
  <button id="kb" type="button" aria-label="Show keyboard">⌨</button>
108
+ <div id="diag">init…</div>
99
109
  <script type="module">
100
110
  import RFB from "./core/rfb.js";
101
111
 
@@ -131,7 +141,28 @@
131
141
  rfb.addEventListener("connect", () => {
132
142
  dot.className = "ok";
133
143
  msg.style.display = "none";
144
+ renderDiag();
134
145
  });
146
+
147
+ // Live debug overlay — see #diag for context. Updates whenever
148
+ // layout changes; also runs once after connect.
149
+ const diag = document.getElementById("diag");
150
+ function renderDiag() {
151
+ const sr = screen.getBoundingClientRect();
152
+ const c = screen.querySelector("canvas");
153
+ const cr = c ? c.getBoundingClientRect() : null;
154
+ diag.textContent =
155
+ `vp ${innerWidth}x${innerHeight} dpr ${devicePixelRatio}\n` +
156
+ `screen ${Math.round(sr.width)}x${Math.round(sr.height)}\n` +
157
+ (c
158
+ ? `cv attr ${c.width}x${c.height} ` +
159
+ `css ${Math.round(cr.width)}x${Math.round(cr.height)}\n` +
160
+ `cv style "${c.style.width}" "${c.style.height}"`
161
+ : `cv (none yet)`);
162
+ }
163
+ window.addEventListener("resize", renderDiag);
164
+ setTimeout(renderDiag, 200);
165
+ setTimeout(renderDiag, 2000);
135
166
  rfb.addEventListener("disconnect", () => {
136
167
  dot.className = "err";
137
168
  msg.style.display = "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusty-squire/mcp",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "mcpName": "io.github.Trusty-Squire/mcp",
5
5
  "type": "module",
6
6
  "description": "Local MCP server vibe coding agents install. Thin relay to the Trusty Squire API, with the bundled universal signup bot.",