@pylonsync/functions 0.3.302 → 0.3.303
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/package.json +1 -1
- package/src/ssr-runtime.ts +32 -8
package/package.json
CHANGED
package/src/ssr-runtime.ts
CHANGED
|
@@ -1362,11 +1362,14 @@ function pylonDevHud() {
|
|
|
1362
1362
|
};
|
|
1363
1363
|
|
|
1364
1364
|
// A row; pass `key` to make it click-to-expand the matching drawer section.
|
|
1365
|
-
|
|
1365
|
+
// Each row hover-explains itself via a native `title` (the terse labels are
|
|
1366
|
+
// cryptic otherwise). `key` makes the row click-to-expand its drawer.
|
|
1367
|
+
const rowEl = (label: string, tip: string, key?: string) => {
|
|
1366
1368
|
const r = make(
|
|
1367
1369
|
"div",
|
|
1368
1370
|
"display:flex;align-items:flex-start;gap:8px;margin:3px 0" + (key ? ";cursor:pointer" : ""),
|
|
1369
1371
|
);
|
|
1372
|
+
r.title = key ? tip + " (click to expand)" : tip;
|
|
1370
1373
|
r.appendChild(make("span", "color:#8b949e;flex:0 0 60px", key ? label + " ▸" : label));
|
|
1371
1374
|
const v = make("span", "color:#e6edf3;word-break:break-word;flex:1");
|
|
1372
1375
|
r.appendChild(v);
|
|
@@ -1385,18 +1388,39 @@ function pylonDevHud() {
|
|
|
1385
1388
|
cache.verdict === "dynamic"
|
|
1386
1389
|
? "dynamic"
|
|
1387
1390
|
: cache.verdict + (cache.secs ? " · " + cache.secs + "s" : "");
|
|
1388
|
-
rowEl("route").textContent = info.route || "—";
|
|
1389
|
-
rowEl("page"
|
|
1390
|
-
|
|
1391
|
+
rowEl("route", "The request path being server-rendered.").textContent = info.route || "—";
|
|
1392
|
+
rowEl("page", "The page component (app/…/page.tsx) that matched this route.").textContent =
|
|
1393
|
+
info.component || "—";
|
|
1394
|
+
const cacheV = rowEl(
|
|
1395
|
+
"cache",
|
|
1396
|
+
"SSR output-cache verdict — dynamic = re-rendered every request; cacheable = shared anonymous cache; bucketed = cached per signed-in/out shell. Shows the single reason it's dynamic.",
|
|
1397
|
+
"cache",
|
|
1398
|
+
);
|
|
1391
1399
|
cacheV.textContent = cacheLabel + (cache.reason ? " · " + cache.reason : "");
|
|
1392
1400
|
cacheV.style.color = cache.verdict === "dynamic" ? C.warn : C.ok;
|
|
1393
|
-
rowEl(
|
|
1401
|
+
rowEl(
|
|
1402
|
+
"render",
|
|
1403
|
+
"How the page rendered (buffered vs streaming) and the server render time, end to end.",
|
|
1404
|
+
).textContent =
|
|
1394
1405
|
(info.renderMode || "ssr") + (info.renderMs != null ? " · " + info.renderMs + "ms" : "");
|
|
1395
|
-
const syncV = rowEl(
|
|
1396
|
-
|
|
1397
|
-
|
|
1406
|
+
const syncV = rowEl(
|
|
1407
|
+
"sync",
|
|
1408
|
+
"Local-first sync engine — connection status · queued offline writes (outbox) · rows in the local replica.",
|
|
1409
|
+
);
|
|
1410
|
+
const apiV = rowEl(
|
|
1411
|
+
"api",
|
|
1412
|
+
"Recent /api/* calls this page made: status + timing. 403s show the policy reason.",
|
|
1413
|
+
"api",
|
|
1414
|
+
);
|
|
1415
|
+
const errV = rowEl(
|
|
1416
|
+
"errors",
|
|
1417
|
+
"Uncaught client errors + unhandled promise rejections captured on this page.",
|
|
1418
|
+
"errors",
|
|
1419
|
+
);
|
|
1398
1420
|
panel.appendChild(drawer);
|
|
1399
1421
|
|
|
1422
|
+
pill.title =
|
|
1423
|
+
"Pylon dev HUD — cache verdict, render timing, sync + /api activity, errors. Click to expand.";
|
|
1400
1424
|
pill.appendChild(dot(cache.verdict === "dynamic" ? C.warn : C.ok));
|
|
1401
1425
|
pill.appendChild(make("span", "font-weight:600;color:#e6edf3", "pylon"));
|
|
1402
1426
|
const pillSyncDot = dot(C.dim);
|