feat(runs): record playwright traces with per-run trace mode, bump to 1.15.0

- record a trace for each scenario run and upload it as trace.zip
- add PLAYWRIGHT_TRACE_MODE (on, retain-on-failure, off) as the default
- add a trace mode option to the run modal, stored per run and reused
  by repeat run; expose the default via GET /scenarios/run-defaults
- accept traceMode in POST /scenarios/:id/run and run_scenario MCP tool
- share one run modal component between scenario list and detail pages
- git-ignore server/data
This commit is contained in:
ars9 committed 2026-09-30 14:58:07 +03:00
1 parent 7d366e6368
commit a328ef5ea7
24 files changed
+525 -99

No files matched your search

+9 -1
View File
@@ -7,6 +7,7 @@ import { SessionService } from "../session/session.service";
import { SessionContextService } from "../session/session-context.service";
import { EnvironmentService } from "../environment/environment.service";
import type { EnvironmentData } from "../environment/environment.entity";
import { TraceMode } from "../config/app.config";
import { CredentialService } from "../credential/credential.service";
import { BrowserService } from "../browser/browser.service";
import { CodeExecutorService } from "../code-executor/code-executor.service";
@@ -939,14 +940,21 @@ export class McpService {
.boolean()
.optional()
.describe("Save session after run completes"),
traceMode: z
.enum(TraceMode)
.optional()
.describe(
"Playwright trace recording: on (keep every trace), retain-on-failure, or off. Defaults to the server's PLAYWRIGHT_TRACE_MODE",
),
},
},
async ({ id, environmentId, saveSession }) => {
async ({ id, environmentId, saveSession, traceMode }) => {
try {
const run = await this.scenarioService.createRun(
id,
environmentId,
saveSession,
traceMode,
);
return {
content: [{ type: "text" as const, text: JSON.stringify(run) }],