Merge pull request #1361 from pikasTech/fix/1356-deeplink-selection-contract

fix: accept deep-linked memory detail selection
This commit is contained in:
Lyon
2026-07-01 11:14:38 +08:00
committed by GitHub
+4 -5
View File
@@ -595,15 +595,14 @@ if (requestedRunId) {
&& document.querySelectorAll(".memory-chart [data-memory-axis-x-tick='true']").length >= 3
&& document.querySelectorAll(".memory-chart [data-memory-axis-y-tick='true']").length >= 3;
const pageLinesOk = pageCount > 0 && curveCount === pageCount;
if (memoryChart?.getAttribute("data-memory-run-id") === runId
&& (!(selected instanceof HTMLElement) || selected.classList.contains("selected"))
&& axesOk
&& pageLinesOk) {
const memoryMatchesRun = memoryChart?.getAttribute("data-memory-run-id") === runId;
const rowSelected = selected instanceof HTMLElement && selected.classList.contains("selected");
if (memoryMatchesRun && axesOk && pageLinesOk) {
if (memoryChart instanceof HTMLElement) {
memoryChart.scrollIntoView({ block: "center", inline: "nearest", behavior: "auto" });
await wait(250);
}
return { requestedRunId: runId, ok: true, reason: "selected-memory-ready" };
return { requestedRunId: runId, ok: true, reason: rowSelected ? "selected-memory-ready" : "deeplink-memory-ready" };
}
await wait(150);
}