fix: improve JD01 mdtodo workbench web-probe
This commit is contained in:
@@ -190,7 +190,7 @@ lanes:
|
||||
projectManagementSource: config/hwlab-project-management/constart-71freq-mdtodo.yaml#projectManagement.sources[0]
|
||||
gatewayProfile: config/hwlab-gateway/constart-71freq-d601-v03.yaml#gateway.profile
|
||||
webProbe:
|
||||
browserProxyMode: direct
|
||||
browserProxyMode: auto
|
||||
defaultOrigin:
|
||||
mode: public
|
||||
baseUrl: https://hwlab.pikapython.com
|
||||
@@ -227,7 +227,7 @@ lanes:
|
||||
enabled: true
|
||||
blockerWindowMs: 30000
|
||||
memory:
|
||||
totalRssBlockerMb: 500
|
||||
totalRssBlockerMb: 800
|
||||
processRssBlockerMb: 500
|
||||
growthBlockerMb: 300
|
||||
responsiveness:
|
||||
|
||||
@@ -57,7 +57,7 @@ export function hwlabNodeWebProbeHelp(): Record<string, unknown> {
|
||||
"bun scripts/cli.ts web-probe observe command webobs-xxxx --type openMdtodoReportPreview --task R1 --link R1.1",
|
||||
"bun scripts/cli.ts web-probe observe command webobs-xxxx --type toggleMdtodoReportFullscreen --text toggle",
|
||||
"bun scripts/cli.ts web-probe observe command webobs-xxxx --type editMdtodoTaskInline --task R1 --field body --text 'body updated through web-probe command'",
|
||||
"bun scripts/cli.ts web-probe observe command webobs-xxxx --type launchWorkbenchFromMdtodo --task R1.1",
|
||||
"bun scripts/cli.ts web-probe observe command webobs-xxxx --type launchWorkbenchFromMdtodo --filename 20260610-LVDT-旧过程归档.md --task R5.1 --provider dsflash-go",
|
||||
"bun scripts/cli.ts web-probe observe status webobs-xxxx",
|
||||
"bun scripts/cli.ts web-probe observe collect webobs-xxxx --view turn-summary",
|
||||
"bun scripts/cli.ts web-probe observe collect webobs-xxxx --view timeline --command-id cmd-xxxx",
|
||||
|
||||
@@ -3662,6 +3662,18 @@ async function selectTaskIfCommandTargetsOne(command) {
|
||||
return selectMdtodoTask(command);
|
||||
}
|
||||
|
||||
async function selectMdtodoProviderProfileForLaunch(command) {
|
||||
const provider = commandValue(command, ["provider", "providerProfile"]);
|
||||
if (!provider) return null;
|
||||
const select = page.locator('[data-testid="mdtodo-provider-profile"]').first();
|
||||
if (!(await visibleLocator(select))) {
|
||||
return { provider, visible: false, selected: null, valuesRedacted: true };
|
||||
}
|
||||
const selected = await selectHtmlOptionByValueOrLabel(select, provider);
|
||||
await page.waitForTimeout(300);
|
||||
return { provider, visible: true, ...selected, valuesRedacted: true };
|
||||
}
|
||||
|
||||
async function saveMdtodoTaskWithButton(command, type, testId, fields) {
|
||||
ensureProjectManagementCommand(type);
|
||||
const beforeUrl = currentPageUrl();
|
||||
@@ -3897,12 +3909,24 @@ async function launchWorkbenchFromTask(command) {
|
||||
const commandType = command.type === "launchWorkbenchFromMdtodo" ? "launchWorkbenchFromMdtodo" : "launchWorkbenchFromTask";
|
||||
ensureProjectManagementCommand(commandType);
|
||||
const beforeUrl = currentPageUrl();
|
||||
const beforeProject = await projectManagementCommandSnapshot({ includeRaw: true });
|
||||
const initialProject = await projectManagementCommandSnapshot({ includeRaw: true });
|
||||
const requestedSourceId = commandValue(command, ["sourceId", "source"]);
|
||||
const requestedFileRef = commandValue(command, ["fileRef"]);
|
||||
const requestedFilename = commandValue(command, ["filename", "fileName"]);
|
||||
const requestedTaskRef = typeof command.taskRef === "string" && command.taskRef.trim() ? command.taskRef.trim() : null;
|
||||
const requestedTaskId = typeof command.taskId === "string" && command.taskId.trim() ? command.taskId.trim() : null;
|
||||
if ((requestedTaskRef && beforeProject.selectedTaskRefRaw !== requestedTaskRef) || requestedTaskId) {
|
||||
await selectMdtodoTask({ ...command, taskRef: requestedTaskRef });
|
||||
}
|
||||
const sourceSelection = requestedSourceId && initialProject.selectedSourceIdRaw !== requestedSourceId
|
||||
? await selectMdtodoSource({ ...command, type: "selectMdtodoSource", sourceId: requestedSourceId })
|
||||
: null;
|
||||
const fileProject = sourceSelection ? await projectManagementCommandSnapshot({ includeRaw: true }) : initialProject;
|
||||
const fileSelection = (requestedFileRef && fileProject.selectedFileRefRaw !== requestedFileRef) || requestedFilename
|
||||
? await selectMdtodoFile({ ...command, type: "selectMdtodoFile", fileRef: requestedFileRef || command.fileRef, filename: requestedFilename || command.filename })
|
||||
: null;
|
||||
const taskProject = fileSelection ? await projectManagementCommandSnapshot({ includeRaw: true }) : fileProject;
|
||||
const taskSelection = (requestedTaskRef && taskProject.selectedTaskRefRaw !== requestedTaskRef) || requestedTaskId
|
||||
? await selectMdtodoTask({ ...command, type: "selectMdtodoTask", taskRef: requestedTaskRef || command.taskRef, taskId: requestedTaskId || command.taskId })
|
||||
: null;
|
||||
const providerSelection = await selectMdtodoProviderProfileForLaunch(command);
|
||||
const projectBeforeClick = await projectManagementCommandSnapshot({ includeRaw: true });
|
||||
const button = page.locator('[data-testid="mdtodo-workbench-launch"], [data-action="launch-workbench"]').first();
|
||||
await button.waitFor({ state: "visible", timeout: 15000 });
|
||||
@@ -4007,6 +4031,14 @@ async function launchWorkbenchFromTask(command) {
|
||||
chat,
|
||||
workbenchSnapshot,
|
||||
selectedTask: opaqueIdSummary(projectBeforeClick.selectedTaskRefRaw),
|
||||
selection: {
|
||||
source: sourceSelection,
|
||||
file: fileSelection,
|
||||
task: taskSelection,
|
||||
provider: providerSelection,
|
||||
valuesRedacted: true
|
||||
},
|
||||
initialProject: sanitizeProjectCommandSnapshot(initialProject),
|
||||
projectBeforeClick: sanitizeProjectCommandSnapshot(projectBeforeClick),
|
||||
buttonState,
|
||||
responseParsed: payload !== null,
|
||||
|
||||
Reference in New Issue
Block a user