diff --git a/npm_modules/cli/debugger/README.md b/npm_modules/cli/debugger/README.md index d8d8f02d..7cad1589 100644 --- a/npm_modules/cli/debugger/README.md +++ b/npm_modules/cli/debugger/README.md @@ -98,6 +98,26 @@ serialized `/api/devtools/targets` response is independently capped at 512 KiB. The legacy `/api/status` route intentionally keeps its prior port probing and forwarding behavior and does not run registry discovery. +The DevTools panel has two mutually exclusive identity modes. An extension-opened +inspected page keeps using its exact `sessionId`, `inspectedUrl`, and +`targetNonce` tuple and never requests the target registry. A directly opened +panel receives one opaque `targetId`, discovers at most 256 registry entries, +and never falls back to the first, only, attached, or newly discovered target. +Only attachable `target-id` entries using the `valdi-daemon` transport and +advertising both `components` and `snapshot` can be selected. Inspected-page, +waiting, and unsupported entries remain visible with a disabled explanation. +Direct snapshot and capability-supported tool requests send only the selected +opaque `targetId`. + +Target changes close the old Console stream before installing the replacement, +invalidate outstanding snapshot, highlight, Console, and Performance work, and +clear all target-owned presentation. Console and Performance tabs are enabled +only when the selected descriptor advertises their capability. A target change +is blocked while a Performance operation or recording owns the selected target; +if registry removal forces a detach, the exact previous Performance owner stays +available solely so the recording can be stopped and retrieved. Registry +removal never selects another target automatically. + The Data section discovers target-owned providers through a generic custom message contract. The persistence module registers its bounded web snapshot as the `persistent-store` Storage provider and reports it unavailable on platforms diff --git a/npm_modules/cli/debugger/devtools-panel.css b/npm_modules/cli/debugger/devtools-panel.css index 749ec4ec..54b15a20 100644 --- a/npm_modules/cli/debugger/devtools-panel.css +++ b/npm_modules/cli/debugger/devtools-panel.css @@ -137,6 +137,13 @@ button { background: var(--surface-hover); } +.main-tab:disabled { + background: transparent; + color: var(--muted); + cursor: not-allowed; + opacity: 0.55; +} + .main-tab.selected, .detail-tab.selected { color: var(--accent); @@ -209,6 +216,38 @@ button { white-space: nowrap; } +.target-select-label { + color: var(--muted); + font-size: 11px; + white-space: nowrap; +} + +.target-select { + width: min(320px, 42vw); + min-width: 120px; + height: 22px; + overflow: hidden; + border: 1px solid var(--border); + border-radius: 3px; + background: var(--surface); + color: var(--text); + font: inherit; + text-overflow: ellipsis; +} + +.target-select[hidden], +.target-select-label[hidden] { + display: none; +} + +.target-picker-status { + min-width: 0; + overflow: hidden; + color: var(--muted); + text-overflow: ellipsis; + white-space: nowrap; +} + .target-metadata { overflow: hidden; color: var(--muted); @@ -1023,4 +1062,21 @@ button { .target-metadata { display: none; } + + .target-picker-status { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + border: 0; + clip: rect(0 0 0 0); + clip-path: inset(50%); + white-space: nowrap; + } + + .target-select { + width: min(230px, 52vw); + } } diff --git a/npm_modules/cli/debugger/devtools-panel.html b/npm_modules/cli/debugger/devtools-panel.html index bb07b7af..9436bbbc 100644 --- a/npm_modules/cli/debugger/devtools-panel.html +++ b/npm_modules/cli/debugger/devtools-panel.html @@ -18,6 +18,7 @@ role="tab" aria-controls="elementsSection" aria-selected="true" + tabindex="0" > Elements @@ -29,6 +30,7 @@ role="tab" aria-controls="performanceSection" aria-selected="false" + tabindex="-1" > Performance @@ -40,6 +42,7 @@ role="tab" aria-controls="consoleSection" aria-selected="false" + tabindex="-1" > Console @@ -53,9 +56,14 @@