my-durable 0.0.85 → 0.0.87

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.
@@ -2,13 +2,13 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" />
6
6
  <meta name="theme-color" content="#171214" />
7
7
  <meta name="referrer" content="no-referrer" />
8
8
  <link rel="icon" type="image/svg+xml" href="/icons/durable-pi.svg" />
9
9
  <title>Durable Pi | Network</title>
10
- <script type="module" crossorigin src="/assets/index-BuRMvN7c.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-CYDeZVlE.css">
10
+ <script type="module" crossorigin src="/assets/index-BvzxmEuM.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-BH8kpBKe.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="app"></div>
@@ -2,7 +2,7 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover, interactive-widget=resizes-content" />
6
6
  <meta name="theme-color" content="#171214" />
7
7
  <meta name="referrer" content="no-referrer" />
8
8
  <link rel="icon" type="image/svg+xml" href="/icons/durable-pi.svg" />
@@ -24,3 +24,22 @@ if (/^\/pair\/?$/.test(url.pathname)) {
24
24
  }
25
25
  }
26
26
  createApp(App).mount("#app");
27
+
28
+ // Soft keyboard, iOS: the layout viewport never resizes, so measure the
29
+ // VISUAL viewport and feed it to the shell heights as --vvh (in root zoom
30
+ // coordinates: rendered = var × zoom = the real visible height). Android
31
+ // follows interactive-widget=resizes-content instead, where this var simply
32
+ // agrees with the resized dvh.
33
+ {
34
+ const vv = window.visualViewport;
35
+ const root = document.documentElement;
36
+ const apply = () => {
37
+ const z = parseFloat(getComputedStyle(root).zoom || "1") || 1;
38
+ root.style.setProperty("--vvh", `${(vv?.height ?? window.innerHeight) / z}px`);
39
+ };
40
+ vv?.addEventListener("resize", apply);
41
+ vv?.addEventListener("scroll", apply);
42
+ window.addEventListener("resize", apply);
43
+ window.addEventListener("orientationchange", apply);
44
+ apply();
45
+ }
@@ -2078,11 +2078,11 @@ textarea.app-state-json {
2078
2078
  overflow: visible;
2079
2079
  }
2080
2080
  .topbar {
2081
- position: sticky;
2082
- top: 0;
2081
+ position: static;
2083
2082
  padding: 0 12px;
2084
2083
  height: 58px;
2085
2084
  min-height: 58px;
2085
+ flex: 0 0 auto;
2086
2086
  }
2087
2087
  .brand {
2088
2088
  gap: 8px;
@@ -3287,31 +3287,42 @@ select:focus {
3287
3287
  Engines without standardised zoom (Safari < 17.4) ignore it and fall back
3288
3288
  to the all-rem type scale at the bottom: text-only shrink, still coherent. */
3289
3289
  @media (max-width: 1599px) {
3290
- :root { zoom: 0.95; }
3291
- :root .shell { height: calc(100dvh / 0.95); }
3290
+ :root { zoom: 0.95; --uiz: 0.95; }
3291
+ :root .shell { height: var(--vvh, calc(100dvh / 0.95)); }
3292
3292
  }
3293
3293
  @media (max-width: 1199px) {
3294
- :root { zoom: 0.9; }
3295
- :root .shell { height: calc(100dvh / 0.9); }
3294
+ :root { zoom: 0.9; --uiz: 0.9; }
3295
+ :root .shell { height: var(--vvh, calc(100dvh / 0.9)); }
3296
3296
  }
3297
3297
  @media (max-width: 899px) {
3298
- :root { zoom: 0.85; }
3299
- :root .shell { height: calc(100dvh / 0.85); }
3298
+ :root { zoom: 0.85; --uiz: 0.85; }
3299
+ :root .shell { height: var(--vvh, calc(100dvh / 0.85)); }
3300
3300
  }
3301
3301
  @media (max-width: 740px) {
3302
- :root { zoom: 0.82; }
3302
+ :root { zoom: 0.82; --uiz: 0.82; }
3303
+ /* The shell IS the screen: fixed height, never scrolls — the topbar and
3304
+ the bottom nav are ordinary flex rows so they stay pinned, and the
3305
+ active pane (chat-scroll / inspector / tree drawer) scrolls inside.
3306
+ The old height:auto + overflow:visible let the DOCUMENT scroll, which
3307
+ carried the bottom bar away with the content (live report). */
3303
3308
  :root .shell {
3304
- height: auto;
3305
- min-height: calc(100dvh / 0.82);
3309
+ height: var(--vvh, calc(100dvh / 0.82));
3310
+ min-height: 0;
3311
+ overflow: hidden;
3312
+ }
3313
+ .net-workspace {
3314
+ overflow: hidden;
3306
3315
  }
3307
3316
  .inspector {
3308
3317
  max-height: calc(55vh / 0.82);
3318
+ overflow: hidden;
3309
3319
  }
3310
3320
  }
3311
3321
  @media (max-width: 550px) {
3312
- :root { zoom: 0.78; }
3322
+ :root { zoom: 0.78; --uiz: 0.78; }
3313
3323
  :root .shell {
3314
- min-height: calc(100dvh / 0.78);
3324
+ height: var(--vvh, calc(100dvh / 0.78));
3325
+ min-height: 0;
3315
3326
  }
3316
3327
  .inspector {
3317
3328
  max-height: calc(55vh / 0.78);
@@ -3331,3 +3342,23 @@ select:focus {
3331
3342
  }
3332
3343
  }
3333
3344
  }
3345
+
3346
+ /* ── Keyboard: the form must survive the soft keyboard ────────────────────
3347
+ Two live failure modes when an input gets focus on a phone:
3348
+ 1. iOS auto-zooms the whole viewport when the focused control renders
3349
+ under 16px — under the ui zoom every input did, so the page "exploded".
3350
+ Raise inputs to a RENDERED 16px (16px / zoom in root coordinates).
3351
+ Scoped component styles have higher specificity, hence !important.
3352
+ 2. The shell must shrink to the space ABOVE the keyboard, not stay
3353
+ viewport-tall behind it. index.html declares
3354
+ interactive-widget=resizes-content (Android/Chrome: the layout viewport
3355
+ then resizes, so 100dvh follows); iOS never resizes its layout viewport,
3356
+ so main.ts measures visualViewport and feeds --vvh, which the shell
3357
+ heights above prefer over 100dvh. */
3358
+ @media (max-width: 1599px) {
3359
+ input,
3360
+ textarea,
3361
+ select {
3362
+ font-size: calc(16px / var(--uiz, 1)) !important;
3363
+ }
3364
+ }
@@ -0,0 +1,39 @@
1
+ import { chromium } from "playwright-core";
2
+ const b = await chromium.launch({ executablePath: "/usr/bin/google-chrome", args: ["--no-sandbox"] });
3
+ console.log("w×h | docScrolls | topbarTop | mnavBottom | vpH | chatScrollable");
4
+ for (const [w, h] of [[390, 844], [360, 740], [740, 1014], [600, 952]]) {
5
+ const pg = await b.newPage({ viewport: { width: w, height: h } });
6
+ await pg.goto("http://127.0.0.1:4203/", { waitUntil: "networkidle" });
7
+ // simulate a long conversation inside the chat scroller
8
+ await pg.evaluate(() => {
9
+ const sc = document.querySelector(".chat-scroll") ?? document.querySelector(".welcome");
10
+ if (sc) { sc.innerHTML = "<div style='height:4000px'>long conversation</div>"; sc.scrollTop = 0; }
11
+ });
12
+ const r = await pg.evaluate(async () => {
13
+ window.scrollTo(0, 4000);
14
+ await new Promise((r) => setTimeout(r, 120));
15
+ const tb = document.querySelector(".topbar")?.getBoundingClientRect();
16
+ const mn = document.querySelector(".mnav")?.getBoundingClientRect();
17
+ const sc = document.querySelector(".chat-scroll");
18
+ return {
19
+ docScrolls: window.scrollY > 0,
20
+ tbTop: tb ? Math.round(tb.top) : -1,
21
+ mnBottom: mn ? Math.round(mn.bottom) : -1,
22
+ vh: innerHeight,
23
+ chatScrollable: sc ? sc.scrollHeight > sc.clientHeight : false,
24
+ chatScrolled: sc ? sc.scrollTop : -1,
25
+ };
26
+ });
27
+ // scroll the INTERNAL pane and confirm the bars stay put
28
+ const r2 = await pg.evaluate(async () => {
29
+ const sc = document.querySelector(".chat-scroll");
30
+ if (sc) sc.scrollTop = 800;
31
+ await new Promise((r) => setTimeout(r, 120));
32
+ const tb = document.querySelector(".topbar")?.getBoundingClientRect();
33
+ const mn = document.querySelector(".mnav")?.getBoundingClientRect();
34
+ return { tbTop2: tb ? Math.round(tb.top) : -1, mnBottom2: mn ? Math.round(mn.bottom) : -1, scrolled: sc ? sc.scrollTop : -1 };
35
+ });
36
+ console.log(`${w}×${h} | ${r.docScrolls} | ${r.tbTop}/${r2.tbTop2} | ${r.mnBottom}/${r2.mnBottom2} | ${r.vh} | ${r.chatScrollable} (scrollTop ${r2.scrolled})`);
37
+ await pg.close();
38
+ }
39
+ await b.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.85",
3
+ "version": "0.0.87",
4
4
  "description": "Durable Pi — the durable agent network: hub web UI, device backend daemon, TUI admin and the shared SDK, packaged as one runnable monorepo install",
5
5
  "license": "MIT",
6
6
  "repository": {