my-durable 0.0.100 → 0.0.102

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.
@@ -7,8 +7,8 @@
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-DKyfqrbX.js"></script>
11
- <link rel="stylesheet" crossorigin href="/assets/index-BJPl06Xx.css">
10
+ <script type="module" crossorigin src="/assets/index-D-h8LqbH.js"></script>
11
+ <link rel="stylesheet" crossorigin href="/assets/index-Clo1OuOR.css">
12
12
  </head>
13
13
  <body>
14
14
  <div id="app"></div>
@@ -2250,13 +2250,19 @@ textarea.app-state-json {
2250
2250
  height: 85dvh;
2251
2251
  min-height: 500px;
2252
2252
  }
2253
+ /* Auto-height: the lineage carries a BRANCH row + crumb row (~2 lines).
2254
+ The old max-height:42 overflowed that content ONTO the table below
2255
+ (live screenshots) — the shell is a fixed-height frame now, so letting
2256
+ the header grow cannot scroll the page; the chat just gets the rest. */
2253
2257
  .chat-header {
2254
2258
  padding: 0 10px;
2259
+ height: auto;
2255
2260
  min-height: 42px;
2256
- max-height: 42px;
2261
+ max-height: none;
2257
2262
  gap: 8px;
2258
2263
  flex-wrap: nowrap;
2259
- overflow: visible; /* never clip: a wrapped/clipped header loses content */
2264
+ flex: 0 0 auto;
2265
+ overflow: visible;
2260
2266
  }
2261
2267
  .model-button img {
2262
2268
  width: 26px;
@@ -3548,3 +3554,51 @@ select:focus {
3548
3554
  margin-bottom: 6px;
3549
3555
  }
3550
3556
  }
3557
+
3558
+ /* ── Compact-band header: unbreakable against ANY content width ───────────
3559
+ From the user's screenshots: the lineage picker reserves flex-basis 240px
3560
+ (network.css), the actions row + crumbs overflowed it, and markdown tables
3561
+ in the transcript are wide. All four levers closed at once: the picker
3562
+ may shrink (no 240px floor), the crumbs never wrap internally, the
3563
+ actions never shrink, the header paints ABOVE escaped content, and wide
3564
+ tables scroll INSIDE the chat instead of escaping it. */
3565
+ @media (max-width: 780px), (max-width: 1100px) and (pointer: coarse) {
3566
+ .chat-header {
3567
+ position: relative;
3568
+ z-index: 2;
3569
+ background: var(--panel);
3570
+ }
3571
+ .chat-header .lineage-picker {
3572
+ flex: 0 1 auto;
3573
+ min-width: 0;
3574
+ }
3575
+ .chat-header .crumbs {
3576
+ flex-wrap: nowrap;
3577
+ min-width: 0;
3578
+ }
3579
+ .chat-header .crumb {
3580
+ flex-shrink: 1;
3581
+ min-width: 0;
3582
+ }
3583
+ .chat-header-actions {
3584
+ flex-shrink: 0;
3585
+ }
3586
+ .markdown table {
3587
+ display: block;
3588
+ width: 100%;
3589
+ max-width: 100%;
3590
+ overflow-x: auto;
3591
+ white-space: nowrap;
3592
+ }
3593
+ }
3594
+
3595
+ /* Tight lineage internals so the auto-height header stays 2 slim rows. */
3596
+ @media (max-width: 780px), (max-width: 1100px) and (pointer: coarse) {
3597
+ .crumb {
3598
+ padding: 3px 2px;
3599
+ }
3600
+ .crumb .device-chip,
3601
+ .crumb-name {
3602
+ max-width: 34vw;
3603
+ }
3604
+ }
@@ -0,0 +1,41 @@
1
+ import { chromium } from "playwright-core";
2
+ const b = await chromium.launch({ executablePath: "/usr/bin/google-chrome", args: ["--no-sandbox"] });
3
+ const pg = await b.newPage({ viewport: { width: 800, height: 1700 }, hasTouch: true, isMobile: true });
4
+ await pg.goto("http://127.0.0.1:4203/", { waitUntil: "networkidle" });
5
+ await pg.evaluate(() => {
6
+ const ws = document.querySelector(".net-workspace");
7
+ ws.innerHTML = `
8
+ <section class="chat-panel">
9
+ <header class="chat-header">
10
+ <div class="lineage-picker"><nav class="crumbs conversation-lineage">
11
+ <button class="crumb"><span class="crumb-main"><span class="device-chip">PhuongNB-Laptop</span></span></button>
12
+ <button class="crumb"><span class="crumb-main"><span class="crumb-name">New session</span></span></button>
13
+ </nav></div>
14
+ <div class="chat-header-actions"><button class="icon-button">✎</button><button class="icon-button">⌄</button></div>
15
+ </header>
16
+ <div class="chat-scroll"><div class="markdown">
17
+ <table><thead><tr><th>#</th><th>worktree</th><th>HEAD</th><th>commit</th></tr></thead>
18
+ <tbody><tr><td>4</td><td>orca/workspaces/.../redis-scan-auto-payment</td><td>(detached HEAD)</td><td>3c33a</td></tr></tbody></table>
19
+ <p><strong>Thay đổi so với lần check trước:</strong></p>
20
+ </div></div>
21
+ </section>`;
22
+ });
23
+ const r = await pg.evaluate(() => {
24
+ const hdr = document.querySelector(".chat-header");
25
+ const scr = document.querySelector(".chat-scroll");
26
+ const tbl = scr.querySelector("table");
27
+ const hr = hdr.getBoundingClientRect();
28
+ const tr = tbl.getBoundingClientRect();
29
+ const hdrCs = getComputedStyle(hdr);
30
+ return {
31
+ headerBg: hdrCs.backgroundColor,
32
+ headerPos: hdrCs.position, headerZ: hdrCs.zIndex,
33
+ headerRect: `${Math.round(hr.top)}..${Math.round(hr.bottom)}`,
34
+ tableTop: Math.round(tr.top),
35
+ OVERLAP: tr.top < hr.bottom && tr.bottom > hr.top,
36
+ scrollPaddingTop: getComputedStyle(scr).paddingTop,
37
+ };
38
+ });
39
+ console.log(JSON.stringify(r, null, 1));
40
+ await pg.screenshot({ path: "/tmp/fe-shot/repro-table.png" });
41
+ await b.close();
@@ -0,0 +1,42 @@
1
+ import { chromium } from "playwright-core";
2
+ const b = await chromium.launch({ executablePath: "/usr/bin/google-chrome", args: ["--no-sandbox"] });
3
+ for (const w of [360, 412, 800]) {
4
+ const pg = await b.newPage({ viewport: { width: w, height: 1700 }, hasTouch: true, isMobile: true });
5
+ await pg.goto("http://127.0.0.1:4203/", { waitUntil: "networkidle" });
6
+ await pg.evaluate(() => {
7
+ const ws = document.querySelector(".net-workspace");
8
+ ws.innerHTML = `
9
+ <section class="chat-panel">
10
+ <header class="chat-header">
11
+ <div class="lineage-picker"><nav class="crumbs conversation-lineage">
12
+ <button class="crumb"><span class="crumb-main"><span class="device-chip">PhuongNB-Laptop</span></span></button>
13
+ <button class="crumb"><span class="crumb-main"><span class="crumb-name">New session</span></span></button>
14
+ </nav></div>
15
+ <div class="chat-header-actions"><button class="icon-button">✎</button><button class="icon-button">⌄</button></div>
16
+ </header>
17
+ <div class="chat-scroll"><div class="markdown">
18
+ <table><thead><tr><th>#</th><th>worktree</th><th>HEAD</th><th>commit</th></tr></thead>
19
+ <tbody><tr><td>4</td><td>orca/workspaces/.../redis-scan-auto-payment-long-name</td><td>(detached HEAD)</td><td>3c33a</td></tr></tbody></table>
20
+ <p><strong>Thay đổi so với lần check trước:</strong></p>
21
+ </div></div>
22
+ </section>`;
23
+ });
24
+ const r = await pg.evaluate(() => {
25
+ const hdr = document.querySelector(".chat-header");
26
+ const crumb = document.querySelector(".crumb-main");
27
+ const tbl = document.querySelector(".markdown table");
28
+ const hr = hdr.getBoundingClientRect();
29
+ const tr = tbl.getBoundingClientRect();
30
+ return {
31
+ headerH: Math.round(hr.height),
32
+ headerBg: getComputedStyle(hdr).backgroundColor,
33
+ crumbVisible: crumb.getBoundingClientRect().right <= innerWidth,
34
+ tableInScroll: tr.top >= hr.bottom - 2,
35
+ tableScrollable: tbl.scrollWidth > tbl.clientWidth,
36
+ hOverflow: document.documentElement.scrollWidth > innerWidth,
37
+ };
38
+ });
39
+ console.log(`${w}px | header ${r.headerH}px bg:${r.headerBg} | crumb trong màn:${r.crumbVisible} | table dưới header:${r.tableInScroll} | table tự cuộn:${r.tableScrollable} | tràn trang:${r.hOverflow}`);
40
+ await pg.close();
41
+ }
42
+ await b.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-durable",
3
- "version": "0.0.100",
3
+ "version": "0.0.102",
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": {