my-durable 0.0.99 → 0.0.101
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.
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/{index-CG14fSPe.js → index-Bw8TO6FR.js} +1 -1
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/assets/{index-BRW4XEPC.css → index-D2389FUA.css} +1 -1
- package/apps/dpi-playground/apps/dpi-playground-fe/dist/index.html +2 -2
- package/apps/dpi-playground/apps/dpi-playground-fe/src/style.css +81 -0
- package/apps/dpi-playground/probe-shot.tmp.mjs +37 -0
- package/apps/dpi-playground/probe-tbl.tmp.mjs +41 -0
- package/apps/dpi-playground/probe-tbl2.tmp.mjs +42 -0
- package/package.json +1 -1
|
@@ -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.
|
|
3
|
+
"version": "0.0.101",
|
|
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": {
|