fix: classify MDTODO empty-detail pane gaps
This commit is contained in:
@@ -1084,7 +1084,9 @@ function buildProjectManagementReport(samples, control, network, pagePerformance
|
||||
const hwpodBlockerSamples = projectManagementHwpodBlockerRows(projectSamples);
|
||||
const projectionReportSamples = projectManagementProjectionReportRows(projectSamples);
|
||||
const hwpodApiFailures = projectManagementHwpodApiFailureRows(projectApiFailures);
|
||||
const severePaneGapSamples = projectManagementPaneGapRows(projectSamples);
|
||||
const paneGapRows = projectManagementPaneGapRows(projectSamples);
|
||||
const severePaneGapSamples = paneGapRows.actionable;
|
||||
const ignoredPaneGapSamples = paneGapRows.ignored;
|
||||
const previewCommands = commandRows.filter((item) => item.type === "openMdtodoReportPreview" || item.type === "toggleMdtodoReportFullscreen");
|
||||
const launchNonEmpty = launchSuccess.filter((item) => item.chatObserved === true && (Number(item.workbenchMessageCount ?? 0) > 0 || Number(item.workbenchTraceRowCount ?? 0) > 0));
|
||||
const launchEmpty = launchSuccess.filter((item) => item.chatObserved !== true || (Number(item.workbenchMessageCount ?? 0) === 0 && Number(item.workbenchTraceRowCount ?? 0) === 0));
|
||||
@@ -1128,6 +1130,7 @@ function buildProjectManagementReport(samples, control, network, pagePerformance
|
||||
projectionReportSampleCount: projectionReportSamples.length,
|
||||
hwpodApiFailureCount: hwpodApiFailures.length,
|
||||
severePaneGapSampleCount: severePaneGapSamples.length,
|
||||
ignoredPaneGapSampleCount: ignoredPaneGapSamples.length,
|
||||
maxPaneBottomGapPx: maxNumber(severePaneGapSamples.map((item) => item.maxBottomGapPx)),
|
||||
maxPaneBottomGapRatio: maxNumber(severePaneGapSamples.map((item) => item.maxBottomGapRatio)),
|
||||
launchButtonVisibleSamples: launchVisibleSamples.length,
|
||||
@@ -1194,6 +1197,7 @@ function buildProjectManagementReport(samples, control, network, pagePerformance
|
||||
projectionReportSamples: projectionReportSamples.slice(0, 40),
|
||||
hwpodApiFailures: hwpodApiFailures.slice(0, 40),
|
||||
severePaneGapSamples: severePaneGapSamples.slice(0, 40),
|
||||
ignoredPaneGapSamples: ignoredPaneGapSamples.slice(0, 40),
|
||||
projectApiPerformance,
|
||||
slowProjectApiPerformance,
|
||||
valuesRedacted: true
|
||||
@@ -1265,6 +1269,8 @@ function compactProjectManagementForOutput(report) {
|
||||
path: item?.path ?? null,
|
||||
selectedTaskRefHash: item?.selectedTaskRefHash ?? null,
|
||||
selectedFileLabelPreview: item?.selectedFileLabelPreview ?? null,
|
||||
pageKind: item?.pageKind ?? null,
|
||||
reason: item?.reason ?? null,
|
||||
severePaneCount: item?.severePaneCount ?? null,
|
||||
maxBottomGapPx: item?.maxBottomGapPx ?? null,
|
||||
maxBottomGapRatio: item?.maxBottomGapRatio ?? null,
|
||||
@@ -1281,6 +1287,7 @@ function compactProjectManagementForOutput(report) {
|
||||
projectionReportSamples: Array.isArray(report.projectionReportSamples) ? report.projectionReportSamples.slice(0, 8).map(compactSample) : [],
|
||||
hwpodApiFailures: Array.isArray(report.hwpodApiFailures) ? report.hwpodApiFailures.slice(0, 8).map(compactApiGroup) : [],
|
||||
severePaneGapSamples: Array.isArray(report.severePaneGapSamples) ? report.severePaneGapSamples.slice(0, 8).map(compactSample) : [],
|
||||
ignoredPaneGapSamples: Array.isArray(report.ignoredPaneGapSamples) ? report.ignoredPaneGapSamples.slice(0, 8).map(compactSample) : [],
|
||||
projectApiPerformance: Array.isArray(report.projectApiPerformance) ? report.projectApiPerformance.slice(0, 8).map(compactPerformance) : [],
|
||||
slowProjectApiPerformance: Array.isArray(report.slowProjectApiPerformance) ? report.slowProjectApiPerformance.slice(0, 8).map(compactPerformance) : [],
|
||||
valuesRedacted: true
|
||||
@@ -1372,6 +1379,7 @@ function projectManagementSampleRef(sample) {
|
||||
ts: sample?.ts ?? null,
|
||||
pageRole: sample?.pageRole ?? null,
|
||||
path: sample?.path ?? null,
|
||||
pageKind: sample?.projectManagement?.pageKind ?? null,
|
||||
selectedTaskRefHash: sample?.projectManagement?.selectedTaskRef?.hash ?? null,
|
||||
selectedFileLabelPreview: sample?.projectManagement?.selectedFileLabel?.textPreview ?? null,
|
||||
valuesRedacted: true
|
||||
@@ -1427,7 +1435,8 @@ function projectManagementHwpodApiFailureRows(projectApiFailures) {
|
||||
}
|
||||
|
||||
function projectManagementPaneGapRows(projectSamples) {
|
||||
const rows = [];
|
||||
const actionable = [];
|
||||
const ignored = [];
|
||||
for (const sample of projectSamples || []) {
|
||||
const paneGaps = Array.isArray(sample?.projectManagement?.paneGaps) ? sample.projectManagement.paneGaps : [];
|
||||
const severeGaps = paneGaps
|
||||
@@ -1453,16 +1462,28 @@ function projectManagementPaneGapRows(projectSamples) {
|
||||
const multiPane = severeGaps.length >= 2;
|
||||
const singleExtreme = maxGapPx >= 240 && maxGapRatio >= 0.45;
|
||||
if (!multiPane && !singleExtreme) continue;
|
||||
rows.push({
|
||||
const selectedTaskRefHash = sample?.projectManagement?.selectedTaskRef?.hash ?? null;
|
||||
const isMdtodo = sample?.projectManagement?.pageKind === "project-management-mdtodo";
|
||||
const isInitialEmptyDetail = isMdtodo && !selectedTaskRefHash;
|
||||
const row = {
|
||||
...projectManagementSampleRef(sample),
|
||||
severePaneCount: severeGaps.length,
|
||||
maxBottomGapPx: maxGapPx,
|
||||
maxBottomGapRatio: maxGapRatio,
|
||||
paneGaps: severeGaps.slice(0, 4),
|
||||
valuesRedacted: true
|
||||
});
|
||||
};
|
||||
if (isInitialEmptyDetail) {
|
||||
ignored.push({
|
||||
...row,
|
||||
reason: "mdtodo-initial-empty-detail-no-selected-task",
|
||||
valuesRedacted: true
|
||||
});
|
||||
continue;
|
||||
}
|
||||
actionable.push(row);
|
||||
}
|
||||
return rows;
|
||||
return { actionable, ignored, valuesRedacted: true };
|
||||
}
|
||||
|
||||
function buildProjectManagementFindings(report) {
|
||||
@@ -1507,7 +1528,7 @@ function buildProjectManagementFindings(report) {
|
||||
findings.push({ id: "mdtodo-task-count-diverged", severity: "amber", summary: "MDTODO task count varied sharply during observation; compare control commands and observer samples for projection divergence", minTaskCount: summary.mdtodoTaskCountMin, maxTaskCount: summary.mdtodoTaskCountMax, samples: report.samples.slice(-20), valuesRedacted: true });
|
||||
}
|
||||
if (Number(summary.severePaneGapSampleCount ?? 0) > 0) {
|
||||
findings.push({ id: "mdtodo-pane-bottom-gap", severity: "red", summary: "MDTODO task tree, main detail, or report sidebar left large unused bottom gaps when the visible task set was small", count: summary.severePaneGapSampleCount, maxBottomGapPx: summary.maxPaneBottomGapPx, maxBottomGapRatio: summary.maxPaneBottomGapRatio, samples: report.severePaneGapSamples.slice(0, 12), valuesRedacted: true });
|
||||
findings.push({ id: "mdtodo-pane-bottom-gap", severity: "red", summary: "MDTODO task tree, main detail, or report sidebar left large unused bottom gaps in actionable selected-task samples", count: summary.severePaneGapSampleCount, ignoredInitialEmptyDetailCount: summary.ignoredPaneGapSampleCount, maxBottomGapPx: summary.maxPaneBottomGapPx, maxBottomGapRatio: summary.maxPaneBottomGapRatio, samples: report.severePaneGapSamples.slice(0, 12), valuesRedacted: true });
|
||||
}
|
||||
if (Number(summary.hwpodApiFailureCount ?? 0) > 0) {
|
||||
findings.push({ id: "project-management-hwpod-api-failed", severity: "red", summary: "HWPOD-backed MDTODO task detail or report preview API returned a server error during natural page use", count: summary.hwpodApiFailureCount, failures: report.hwpodApiFailures.slice(0, 12), valuesRedacted: true });
|
||||
|
||||
Reference in New Issue
Block a user