@ogygia/devtools 0.0.0 → 0.11.1
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/LICENSE +21 -0
- package/README.md +24 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.js +24 -0
- package/dist/devtools/BoundaryOverlay.svelte +396 -0
- package/dist/devtools/BoundaryOverlay.svelte.d.ts +19 -0
- package/dist/devtools/Devtools.svelte +663 -0
- package/dist/devtools/Devtools.svelte.d.ts +15 -0
- package/dist/devtools/HubTab.svelte +206 -0
- package/dist/devtools/HubTab.svelte.d.ts +11 -0
- package/dist/devtools/HydrationTab.svelte +237 -0
- package/dist/devtools/HydrationTab.svelte.d.ts +13 -0
- package/dist/devtools/IslandDetail.svelte +615 -0
- package/dist/devtools/IslandDetail.svelte.d.ts +15 -0
- package/dist/devtools/LedgerTab.svelte +287 -0
- package/dist/devtools/LedgerTab.svelte.d.ts +11 -0
- package/dist/devtools/LensTab.svelte +290 -0
- package/dist/devtools/LensTab.svelte.d.ts +19 -0
- package/dist/devtools/NavTab.svelte +229 -0
- package/dist/devtools/NavTab.svelte.d.ts +11 -0
- package/dist/devtools/PageTab.svelte +1122 -0
- package/dist/devtools/PageTab.svelte.d.ts +15 -0
- package/dist/devtools/ProfilerTab.svelte +755 -0
- package/dist/devtools/ProfilerTab.svelte.d.ts +15 -0
- package/dist/devtools/PropsTree.svelte +155 -0
- package/dist/devtools/PropsTree.svelte.d.ts +15 -0
- package/dist/devtools/SessionTab.svelte +796 -0
- package/dist/devtools/SessionTab.svelte.d.ts +11 -0
- package/dist/devtools/TimelineTab.svelte +267 -0
- package/dist/devtools/TimelineTab.svelte.d.ts +11 -0
- package/dist/devtools/WireTab.svelte +149 -0
- package/dist/devtools/WireTab.svelte.d.ts +11 -0
- package/dist/devtools/bytes.d.ts +70 -0
- package/dist/devtools/bytes.js +82 -0
- package/dist/devtools/cache-headers.d.ts +20 -0
- package/dist/devtools/cache-headers.js +81 -0
- package/dist/devtools/highlight.d.ts +7 -0
- package/dist/devtools/highlight.js +83 -0
- package/dist/devtools/hydration.d.ts +48 -0
- package/dist/devtools/hydration.js +93 -0
- package/dist/devtools/index.d.ts +3 -0
- package/dist/devtools/index.js +3 -0
- package/dist/devtools/ledger-dom.d.ts +7 -0
- package/dist/devtools/ledger-dom.js +151 -0
- package/dist/devtools/leftovers.d.ts +77 -0
- package/dist/devtools/leftovers.js +319 -0
- package/dist/devtools/names.d.ts +1 -0
- package/dist/devtools/names.js +34 -0
- package/dist/devtools/page.d.ts +96 -0
- package/dist/devtools/page.js +957 -0
- package/dist/devtools/profile-anchors.d.ts +22 -0
- package/dist/devtools/profile-anchors.js +135 -0
- package/dist/devtools/profile-store.d.ts +175 -0
- package/dist/devtools/profile-store.js +239 -0
- package/dist/devtools/regions.d.ts +77 -0
- package/dist/devtools/regions.js +132 -0
- package/dist/devtools/session.d.ts +31 -0
- package/dist/devtools/session.js +455 -0
- package/dist/devtools/since-load.d.ts +50 -0
- package/dist/devtools/since-load.js +89 -0
- package/dist/devtools/source-lines.d.ts +24 -0
- package/dist/devtools/source-lines.js +106 -0
- package/dist/devtools/styles.d.ts +52 -0
- package/dist/devtools/styles.js +248 -0
- package/dist/devtools/testing-engine.d.ts +83 -0
- package/dist/devtools/testing-engine.js +220 -0
- package/dist/devtools/ui-app.d.ts +5 -0
- package/dist/devtools/ui-app.js +69 -0
- package/dist/devtools/ui.d.ts +50 -0
- package/dist/devtools/ui.js +175 -0
- package/dist/profiler/alloc.d.ts +75 -0
- package/dist/profiler/alloc.js +76 -0
- package/dist/profiler/analyze.d.ts +437 -0
- package/dist/profiler/analyze.js +1941 -0
- package/dist/profiler/app-path.d.ts +7 -0
- package/dist/profiler/app-path.js +26 -0
- package/dist/profiler/async-io.d.ts +58 -0
- package/dist/profiler/async-io.js +187 -0
- package/dist/profiler/beacon-standalone.d.ts +4 -0
- package/dist/profiler/beacon-standalone.js +409 -0
- package/dist/profiler/browser-findings.d.ts +25 -0
- package/dist/profiler/browser-findings.js +260 -0
- package/dist/profiler/byte-strip.d.ts +58 -0
- package/dist/profiler/byte-strip.js +228 -0
- package/dist/profiler/client-files.d.ts +16 -0
- package/dist/profiler/client-files.js +60 -0
- package/dist/profiler/client-windows.d.ts +49 -0
- package/dist/profiler/client-windows.js +95 -0
- package/dist/profiler/client.d.ts +40 -0
- package/dist/profiler/client.js +82 -0
- package/dist/profiler/compare.d.ts +308 -0
- package/dist/profiler/compare.js +733 -0
- package/dist/profiler/compress.d.ts +10 -0
- package/dist/profiler/compress.js +36 -0
- package/dist/profiler/contention.d.ts +60 -0
- package/dist/profiler/contention.js +86 -0
- package/dist/profiler/crypto.d.ts +19 -0
- package/dist/profiler/crypto.js +101 -0
- package/dist/profiler/doc-diff.d.ts +47 -0
- package/dist/profiler/doc-diff.js +214 -0
- package/dist/profiler/dom-diff.d.ts +43 -0
- package/dist/profiler/dom-diff.js +121 -0
- package/dist/profiler/drill.d.ts +89 -0
- package/dist/profiler/drill.js +553 -0
- package/dist/profiler/embedded-maps.d.ts +37 -0
- package/dist/profiler/embedded-maps.js +135 -0
- package/dist/profiler/env.d.ts +6 -0
- package/dist/profiler/env.js +10 -0
- package/dist/profiler/forecast.d.ts +76 -0
- package/dist/profiler/forecast.js +225 -0
- package/dist/profiler/frames.d.ts +11 -0
- package/dist/profiler/frames.js +42 -0
- package/dist/profiler/gc.d.ts +144 -0
- package/dist/profiler/gc.js +271 -0
- package/dist/profiler/hole-slots.d.ts +31 -0
- package/dist/profiler/hole-slots.js +90 -0
- package/dist/profiler/index.d.ts +288 -0
- package/dist/profiler/index.js +4921 -0
- package/dist/profiler/insights.d.ts +96 -0
- package/dist/profiler/insights.js +239 -0
- package/dist/profiler/ledger.d.ts +121 -0
- package/dist/profiler/ledger.js +440 -0
- package/dist/profiler/lineage.d.ts +81 -0
- package/dist/profiler/lineage.js +359 -0
- package/dist/profiler/module-map.d.ts +12 -0
- package/dist/profiler/module-map.js +94 -0
- package/dist/profiler/net.d.ts +169 -0
- package/dist/profiler/net.js +586 -0
- package/dist/profiler/on-demand.d.ts +11 -0
- package/dist/profiler/on-demand.js +15 -0
- package/dist/profiler/own-requests.d.ts +9 -0
- package/dist/profiler/own-requests.js +17 -0
- package/dist/profiler/patterns.d.ts +476 -0
- package/dist/profiler/patterns.js +2203 -0
- package/dist/profiler/profiler-router.d.ts +245 -0
- package/dist/profiler/profiler-router.js +113 -0
- package/dist/profiler/refresh-stub.d.ts +2 -0
- package/dist/profiler/refresh-stub.js +37 -0
- package/dist/profiler/report.d.ts +1404 -0
- package/dist/profiler/report.js +2638 -0
- package/dist/profiler/river.d.ts +65 -0
- package/dist/profiler/river.js +298 -0
- package/dist/profiler/route-files.d.ts +22 -0
- package/dist/profiler/route-files.js +55 -0
- package/dist/profiler/route-imports.d.ts +14 -0
- package/dist/profiler/route-imports.js +83 -0
- package/dist/profiler/saving.d.ts +22 -0
- package/dist/profiler/saving.js +42 -0
- package/dist/profiler/score.d.ts +109 -0
- package/dist/profiler/score.js +261 -0
- package/dist/profiler/session-cookie.d.ts +28 -0
- package/dist/profiler/session-cookie.js +45 -0
- package/dist/profiler/sink.d.ts +81 -0
- package/dist/profiler/sink.js +124 -0
- package/dist/profiler/site-fixes.d.ts +25 -0
- package/dist/profiler/site-fixes.js +62 -0
- package/dist/profiler/source-scan.d.ts +210 -0
- package/dist/profiler/source-scan.js +1724 -0
- package/dist/profiler/span.d.ts +90 -0
- package/dist/profiler/span.js +109 -0
- package/dist/profiler/stacks.d.ts +43 -0
- package/dist/profiler/stacks.js +107 -0
- package/dist/profiler/standalone.d.ts +27 -0
- package/dist/profiler/standalone.js +98 -0
- package/dist/profiler/steps.d.ts +39 -0
- package/dist/profiler/steps.js +74 -0
- package/dist/profiler/storage/index.d.ts +87 -0
- package/dist/profiler/storage/index.js +76 -0
- package/dist/profiler/storage/postgres.d.ts +12 -0
- package/dist/profiler/storage/postgres.js +94 -0
- package/dist/profiler/storage/redis.d.ts +19 -0
- package/dist/profiler/storage/redis.js +148 -0
- package/dist/profiler/storage/sqlite.d.ts +2 -0
- package/dist/profiler/storage/sqlite.js +85 -0
- package/dist/profiler/storage/visits.d.ts +4 -0
- package/dist/profiler/storage/visits.js +6 -0
- package/dist/profiler/stream-tail.d.ts +26 -0
- package/dist/profiler/stream-tail.js +74 -0
- package/dist/profiler/timeline.d.ts +279 -0
- package/dist/profiler/timeline.js +690 -0
- package/dist/profiler/ui/AllocStrip.svelte +146 -0
- package/dist/profiler/ui/AllocStrip.svelte.d.ts +17 -0
- package/dist/profiler/ui/Awaits.svelte +363 -0
- package/dist/profiler/ui/Awaits.svelte.d.ts +16 -0
- package/dist/profiler/ui/ByteStrip.svelte +182 -0
- package/dist/profiler/ui/ByteStrip.svelte.d.ts +18 -0
- package/dist/profiler/ui/Compare.svelte +24 -0
- package/dist/profiler/ui/Compare.svelte.d.ts +16 -0
- package/dist/profiler/ui/CompareBody.svelte +429 -0
- package/dist/profiler/ui/CompareBody.svelte.d.ts +8 -0
- package/dist/profiler/ui/ComponentsTable.svelte +265 -0
- package/dist/profiler/ui/ComponentsTable.svelte.d.ts +20 -0
- package/dist/profiler/ui/Dashboard.svelte +492 -0
- package/dist/profiler/ui/Dashboard.svelte.d.ts +31 -0
- package/dist/profiler/ui/DataRiver.svelte +206 -0
- package/dist/profiler/ui/DataRiver.svelte.d.ts +13 -0
- package/dist/profiler/ui/DomTravel.svelte +207 -0
- package/dist/profiler/ui/DomTravel.svelte.d.ts +9 -0
- package/dist/profiler/ui/DownloadHtml.svelte +52 -0
- package/dist/profiler/ui/DownloadHtml.svelte.d.ts +10 -0
- package/dist/profiler/ui/Drill.svelte +276 -0
- package/dist/profiler/ui/Drill.svelte.d.ts +12 -0
- package/dist/profiler/ui/ExportButton.svelte +59 -0
- package/dist/profiler/ui/ExportButton.svelte.d.ts +8 -0
- package/dist/profiler/ui/Flame.svelte +222 -0
- package/dist/profiler/ui/Flame.svelte.d.ts +12 -0
- package/dist/profiler/ui/FrameDetails.svelte +308 -0
- package/dist/profiler/ui/FrameDetails.svelte.d.ts +16 -0
- package/dist/profiler/ui/FunctionsTable.svelte +156 -0
- package/dist/profiler/ui/FunctionsTable.svelte.d.ts +17 -0
- package/dist/profiler/ui/IslandHeatmap.svelte +151 -0
- package/dist/profiler/ui/IslandHeatmap.svelte.d.ts +16 -0
- package/dist/profiler/ui/IslandsTable.svelte +448 -0
- package/dist/profiler/ui/IslandsTable.svelte.d.ts +16 -0
- package/dist/profiler/ui/KeepLocal.svelte +46 -0
- package/dist/profiler/ui/KeepLocal.svelte.d.ts +8 -0
- package/dist/profiler/ui/Ledger.svelte +196 -0
- package/dist/profiler/ui/Ledger.svelte.d.ts +18 -0
- package/dist/profiler/ui/LocalCompare.svelte +48 -0
- package/dist/profiler/ui/LocalCompare.svelte.d.ts +8 -0
- package/dist/profiler/ui/LocalReports.svelte +68 -0
- package/dist/profiler/ui/LocalReports.svelte.d.ts +7 -0
- package/dist/profiler/ui/Login.svelte +13 -0
- package/dist/profiler/ui/Login.svelte.d.ts +12 -0
- package/dist/profiler/ui/LoginForm.svelte +42 -0
- package/dist/profiler/ui/LoginForm.svelte.d.ts +7 -0
- package/dist/profiler/ui/Message.svelte +10 -0
- package/dist/profiler/ui/Message.svelte.d.ts +12 -0
- package/dist/profiler/ui/OnThisPage.svelte +137 -0
- package/dist/profiler/ui/OnThisPage.svelte.d.ts +3 -0
- package/dist/profiler/ui/OneClock.svelte +297 -0
- package/dist/profiler/ui/OneClock.svelte.d.ts +27 -0
- package/dist/profiler/ui/Panel.svelte +10 -0
- package/dist/profiler/ui/Panel.svelte.d.ts +16 -0
- package/dist/profiler/ui/Paths.svelte +269 -0
- package/dist/profiler/ui/Paths.svelte.d.ts +15 -0
- package/dist/profiler/ui/Patterns.svelte +364 -0
- package/dist/profiler/ui/Patterns.svelte.d.ts +15 -0
- package/dist/profiler/ui/PermalinkGate.svelte +143 -0
- package/dist/profiler/ui/PermalinkGate.svelte.d.ts +10 -0
- package/dist/profiler/ui/RenderSteps.svelte +218 -0
- package/dist/profiler/ui/RenderSteps.svelte.d.ts +13 -0
- package/dist/profiler/ui/Report.svelte +28 -0
- package/dist/profiler/ui/Report.svelte.d.ts +20 -0
- package/dist/profiler/ui/ReportBody.svelte +2592 -0
- package/dist/profiler/ui/ReportBody.svelte.d.ts +21 -0
- package/dist/profiler/ui/Run.svelte +17 -0
- package/dist/profiler/ui/Run.svelte.d.ts +14 -0
- package/dist/profiler/ui/RunView.svelte +146 -0
- package/dist/profiler/ui/RunView.svelte.d.ts +10 -0
- package/dist/profiler/ui/ScoreCard.svelte +197 -0
- package/dist/profiler/ui/ScoreCard.svelte.d.ts +7 -0
- package/dist/profiler/ui/Scrub.svelte +293 -0
- package/dist/profiler/ui/Scrub.svelte.d.ts +18 -0
- package/dist/profiler/ui/SeedExplainer.svelte +193 -0
- package/dist/profiler/ui/SeedExplainer.svelte.d.ts +16 -0
- package/dist/profiler/ui/ShareLink.svelte +148 -0
- package/dist/profiler/ui/ShareLink.svelte.d.ts +8 -0
- package/dist/profiler/ui/Shell.svelte +50 -0
- package/dist/profiler/ui/Shell.svelte.d.ts +27 -0
- package/dist/profiler/ui/Sidebar.svelte +312 -0
- package/dist/profiler/ui/Sidebar.svelte.d.ts +7 -0
- package/dist/profiler/ui/Site.svelte +20 -0
- package/dist/profiler/ui/Site.svelte.d.ts +23 -0
- package/dist/profiler/ui/SiteView.svelte +385 -0
- package/dist/profiler/ui/SiteView.svelte.d.ts +27 -0
- package/dist/profiler/ui/ThemeSwitch.svelte +78 -0
- package/dist/profiler/ui/ThemeSwitch.svelte.d.ts +3 -0
- package/dist/profiler/ui/Timeline.svelte +672 -0
- package/dist/profiler/ui/Timeline.svelte.d.ts +22 -0
- package/dist/profiler/ui/Treemap.svelte +278 -0
- package/dist/profiler/ui/Treemap.svelte.d.ts +20 -0
- package/dist/profiler/ui/Upload.svelte +19 -0
- package/dist/profiler/ui/Upload.svelte.d.ts +10 -0
- package/dist/profiler/ui/UploadForm.svelte +59 -0
- package/dist/profiler/ui/UploadForm.svelte.d.ts +6 -0
- package/dist/profiler/ui/WaitingTable.svelte +55 -0
- package/dist/profiler/ui/WaitingTable.svelte.d.ts +14 -0
- package/dist/profiler/ui/Waterfall.svelte +371 -0
- package/dist/profiler/ui/Waterfall.svelte.d.ts +7 -0
- package/dist/profiler/ui/WhatIf.svelte +87 -0
- package/dist/profiler/ui/WhatIf.svelte.d.ts +18 -0
- package/dist/profiler/ui/fake-progress.svelte.d.ts +15 -0
- package/dist/profiler/ui/fake-progress.svelte.js +38 -0
- package/dist/profiler/ui/format.d.ts +20 -0
- package/dist/profiler/ui/format.js +71 -0
- package/dist/profiler/ui/permalink.d.ts +9 -0
- package/dist/profiler/ui/permalink.js +108 -0
- package/dist/profiler/ui/press.d.ts +5 -0
- package/dist/profiler/ui/press.js +19 -0
- package/dist/profiler/ui/profiler.css +650 -0
- package/dist/profiler/ui/report-data.d.ts +189 -0
- package/dist/profiler/ui/report-data.js +393 -0
- package/dist/profiler/ui/report-request.d.ts +6 -0
- package/dist/profiler/ui/report-request.js +50 -0
- package/dist/profiler/ui/row-anchor.svelte.d.ts +12 -0
- package/dist/profiler/ui/row-anchor.svelte.js +44 -0
- package/dist/profiler/ui/sort.svelte.d.ts +14 -0
- package/dist/profiler/ui/sort.svelte.js +37 -0
- package/dist/profiler/ui/store.d.ts +45 -0
- package/dist/profiler/ui/store.js +92 -0
- package/dist/profiler/visit.d.ts +389 -0
- package/dist/profiler/visit.js +1002 -0
- package/dist/report.d.ts +5 -0
- package/dist/report.js +4 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +38 -0
- package/dist/vite.d.ts +12 -0
- package/dist/vite.js +78 -0
- package/package.json +99 -6
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
<!-- (its CSS injected into the dock's shadow root: see Devtools.svelte) -->
|
|
2
|
+
<svelte:options css="injected" />
|
|
3
|
+
|
|
4
|
+
<script>
|
|
5
|
+
/**
|
|
6
|
+
* The Nav tab (nav lab, internal/notes/devtools.md, Rung 5 · 4): makes an SPA navigation
|
|
7
|
+
* observable. ogygia navs DIFF the body in place — matched regions keep their live island, changed
|
|
8
|
+
* ones re-mount, the shell morphs. This tab shows the LAST navigation's per-region decision by
|
|
9
|
+
* COMPONENT NAME (keep / patch / mount / remove) + its timing (reconciled vs full-swap, View
|
|
10
|
+
* Transition, how many deferred holes were single-flighted), and a short history. Reads
|
|
11
|
+
* nav.start/finish/reconcile/batch off the bus. The decision-based counterpart to the Timeline.
|
|
12
|
+
*/
|
|
13
|
+
import { snapshot } from '@ogygia/core/events';
|
|
14
|
+
import { region_name, region_name_by_fp } from './regions.js';
|
|
15
|
+
|
|
16
|
+
let { tick = 0 } = $props();
|
|
17
|
+
|
|
18
|
+
const DECISION = {
|
|
19
|
+
keep: { c: '#22c55e', help: 'same island reused — its live state survived the nav' },
|
|
20
|
+
patch: { c: '#f59e0b', help: 'same slot, inputs changed — re-mounted in place' },
|
|
21
|
+
mount: { c: '#38bdf8', help: 'new island — appeared on this page' },
|
|
22
|
+
remove: { c: '#ef4444', help: 'island gone — left with the old page' }
|
|
23
|
+
};
|
|
24
|
+
const ORDER = ['keep', 'patch', 'mount', 'remove'];
|
|
25
|
+
|
|
26
|
+
// The reconcile key is `<type>\0<value>`: k = keep-marker name, p = persist signature, r = props fp.
|
|
27
|
+
function label_of(d) {
|
|
28
|
+
if (d.entry) return region_name(d.entry);
|
|
29
|
+
const nul = (d.key || '').indexOf('\0');
|
|
30
|
+
const type = nul >= 0 ? d.key.slice(0, nul) : '';
|
|
31
|
+
const val = nul >= 0 ? d.key.slice(nul + 1) : d.key || '';
|
|
32
|
+
if (type === 'k') return val || '(kept)';
|
|
33
|
+
if (type === 'r') return region_name_by_fp(val);
|
|
34
|
+
if (type === 'p') return 'persisted region';
|
|
35
|
+
return val || '—';
|
|
36
|
+
}
|
|
37
|
+
function origin_of(d) {
|
|
38
|
+
const t = (d.key || '').slice(0, (d.key || '').indexOf('\0'));
|
|
39
|
+
return t === 'k' ? 'keep' : t === 'p' ? 'persist' : '';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const model = $derived.by(() => {
|
|
43
|
+
void tick; // refresh with the panel tick
|
|
44
|
+
const ev = snapshot();
|
|
45
|
+
const finishes = ev.filter((e) => e.name === 'nav.finish');
|
|
46
|
+
if (finishes.length === 0) return { hasNav: false };
|
|
47
|
+
|
|
48
|
+
const last = finishes[finishes.length - 1];
|
|
49
|
+
const start = ev.filter((e) => e.name === 'nav.start' && e.seq < last.seq).at(-1);
|
|
50
|
+
const from = start?.seq ?? -1;
|
|
51
|
+
const decisions = ev
|
|
52
|
+
.filter((e) => e.name === 'nav.reconcile' && e.seq > from && e.seq < last.seq)
|
|
53
|
+
.slice()
|
|
54
|
+
.sort((a, b) => ORDER.indexOf(a.decision) - ORDER.indexOf(b.decision));
|
|
55
|
+
const batch = ev
|
|
56
|
+
.filter((e) => e.name === 'nav.batch' && e.seq > from && e.seq <= last.seq)
|
|
57
|
+
.at(-1);
|
|
58
|
+
const counts = { keep: 0, patch: 0, mount: 0, remove: 0 };
|
|
59
|
+
for (const d of decisions) counts[d.decision]++;
|
|
60
|
+
const history = finishes
|
|
61
|
+
.slice(-8)
|
|
62
|
+
.reverse()
|
|
63
|
+
.map((f) => ({ to: f.to, ms: f.ms, reconciled: f.reconciled, vt: f.vt, seq: f.seq }));
|
|
64
|
+
return { hasNav: true, last, from: start?.from, decisions, counts, batch, history };
|
|
65
|
+
});
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<div class="cap">
|
|
69
|
+
nav lab <span class="muted">· the last SPA navigation's per-island decisions</span>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
{#if !model.hasNav}
|
|
73
|
+
<div class="muted">no navigation yet — click a link (SPA nav) and reopen this tab.</div>
|
|
74
|
+
{:else}
|
|
75
|
+
<div class="summary">
|
|
76
|
+
<span class="path">{model.from ?? '?'} → <b>{model.last.to}</b></span>
|
|
77
|
+
<span class="pill" class:good={model.last.reconciled}
|
|
78
|
+
>{model.last.reconciled ? 'reconciled in place' : 'full swap'}</span
|
|
79
|
+
>
|
|
80
|
+
<span class="pill">{model.last.ms.toFixed(1)} ms</span>
|
|
81
|
+
<span class="pill">VT {model.last.vt ? 'on' : 'off'}</span>
|
|
82
|
+
{#if model.batch}<span class="pill">single-flight ×{model.batch.count}</span>{/if}
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<div class="counts">
|
|
86
|
+
{#each ORDER as name}
|
|
87
|
+
<span
|
|
88
|
+
class="chip"
|
|
89
|
+
class:zero={!model.counts[name]}
|
|
90
|
+
style:--c={DECISION[name].c}
|
|
91
|
+
title={DECISION[name].help}
|
|
92
|
+
>
|
|
93
|
+
{name}
|
|
94
|
+
{model.counts[name]}
|
|
95
|
+
</span>
|
|
96
|
+
{/each}
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
{#if model.decisions.length}
|
|
100
|
+
<table>
|
|
101
|
+
<thead><tr><th>island</th><th>wake</th><th>fate</th></tr></thead>
|
|
102
|
+
<tbody>
|
|
103
|
+
{#each model.decisions as d (d.seq)}
|
|
104
|
+
<tr>
|
|
105
|
+
<td title={d.key}>
|
|
106
|
+
<span class="nm">{label_of(d)}</span>
|
|
107
|
+
{#if origin_of(d)}<span class="via">via {origin_of(d)}</span>{/if}
|
|
108
|
+
</td>
|
|
109
|
+
<td>{d.wake || '—'}</td>
|
|
110
|
+
<td title={DECISION[d.decision].help}>
|
|
111
|
+
<span class="dot" style:background={DECISION[d.decision].c}></span>{d.decision}
|
|
112
|
+
</td>
|
|
113
|
+
</tr>
|
|
114
|
+
{/each}
|
|
115
|
+
</tbody>
|
|
116
|
+
</table>
|
|
117
|
+
{:else}
|
|
118
|
+
<div class="muted">
|
|
119
|
+
this nav was a full swap (no per-region diff) — decisions only exist on the reconcile path.
|
|
120
|
+
</div>
|
|
121
|
+
{/if}
|
|
122
|
+
|
|
123
|
+
<div class="sec">recent navigations</div>
|
|
124
|
+
<table>
|
|
125
|
+
<thead><tr><th>to</th><th>ms</th><th>path</th></tr></thead>
|
|
126
|
+
<tbody>
|
|
127
|
+
{#each model.history as h (h.seq)}
|
|
128
|
+
<tr
|
|
129
|
+
><td class="nm">{h.to}</td><td>{h.ms.toFixed(1)}</td><td
|
|
130
|
+
>{h.reconciled ? 'reconciled' : 'full swap'}</td
|
|
131
|
+
></tr
|
|
132
|
+
>
|
|
133
|
+
{/each}
|
|
134
|
+
</tbody>
|
|
135
|
+
</table>
|
|
136
|
+
{/if}
|
|
137
|
+
|
|
138
|
+
<style>
|
|
139
|
+
.cap {
|
|
140
|
+
font-size: 12px;
|
|
141
|
+
color: #5eead4;
|
|
142
|
+
margin-bottom: 8px;
|
|
143
|
+
}
|
|
144
|
+
.muted {
|
|
145
|
+
color: #94a3b8;
|
|
146
|
+
}
|
|
147
|
+
.summary {
|
|
148
|
+
display: flex;
|
|
149
|
+
flex-wrap: wrap;
|
|
150
|
+
align-items: center;
|
|
151
|
+
gap: 8px;
|
|
152
|
+
margin-bottom: 10px;
|
|
153
|
+
}
|
|
154
|
+
.path {
|
|
155
|
+
color: #94a3b8;
|
|
156
|
+
}
|
|
157
|
+
.path b {
|
|
158
|
+
color: #e2e8f0;
|
|
159
|
+
}
|
|
160
|
+
.pill {
|
|
161
|
+
padding: 2px 8px;
|
|
162
|
+
border-radius: 999px;
|
|
163
|
+
border: 1px solid rgba(148, 163, 184, 0.3);
|
|
164
|
+
color: #94a3b8;
|
|
165
|
+
}
|
|
166
|
+
.pill.good {
|
|
167
|
+
border-color: rgba(34, 197, 94, 0.4);
|
|
168
|
+
color: #4ade80;
|
|
169
|
+
}
|
|
170
|
+
.counts {
|
|
171
|
+
display: flex;
|
|
172
|
+
gap: 8px;
|
|
173
|
+
margin-bottom: 12px;
|
|
174
|
+
}
|
|
175
|
+
.chip {
|
|
176
|
+
padding: 2px 9px;
|
|
177
|
+
border-radius: 999px;
|
|
178
|
+
background: color-mix(in srgb, var(--c) 18%, transparent);
|
|
179
|
+
color: var(--c);
|
|
180
|
+
font-weight: 600;
|
|
181
|
+
cursor: default;
|
|
182
|
+
}
|
|
183
|
+
.chip.zero {
|
|
184
|
+
background: none;
|
|
185
|
+
color: #475569;
|
|
186
|
+
}
|
|
187
|
+
.dot {
|
|
188
|
+
display: inline-block;
|
|
189
|
+
width: 8px;
|
|
190
|
+
height: 8px;
|
|
191
|
+
border-radius: 50%;
|
|
192
|
+
margin-right: 6px;
|
|
193
|
+
vertical-align: 0;
|
|
194
|
+
}
|
|
195
|
+
.nm {
|
|
196
|
+
color: #e2e8f0;
|
|
197
|
+
font-weight: 600;
|
|
198
|
+
}
|
|
199
|
+
.via {
|
|
200
|
+
margin-left: 7px;
|
|
201
|
+
color: #94a3b8;
|
|
202
|
+
font-size: 10px;
|
|
203
|
+
}
|
|
204
|
+
table {
|
|
205
|
+
border-collapse: collapse;
|
|
206
|
+
width: 100%;
|
|
207
|
+
}
|
|
208
|
+
th,
|
|
209
|
+
td {
|
|
210
|
+
text-align: right;
|
|
211
|
+
padding: 3px 8px;
|
|
212
|
+
white-space: nowrap;
|
|
213
|
+
}
|
|
214
|
+
th:first-child,
|
|
215
|
+
td:first-child,
|
|
216
|
+
th:nth-child(2),
|
|
217
|
+
td:nth-child(2) {
|
|
218
|
+
text-align: left;
|
|
219
|
+
}
|
|
220
|
+
thead th {
|
|
221
|
+
color: #94a3b8;
|
|
222
|
+
border-bottom: 1px solid rgba(148, 163, 184, 0.2);
|
|
223
|
+
}
|
|
224
|
+
.sec {
|
|
225
|
+
margin: 14px 0 4px;
|
|
226
|
+
color: #94a3b8;
|
|
227
|
+
font-weight: 600;
|
|
228
|
+
}
|
|
229
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default NavTab;
|
|
2
|
+
type NavTab = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const NavTab: import("svelte").Component<{
|
|
7
|
+
tick?: number;
|
|
8
|
+
}, {}, "">;
|
|
9
|
+
type $$ComponentProps = {
|
|
10
|
+
tick?: number;
|
|
11
|
+
};
|