refactor(session): auto-create named browser sessions

- create and register named browser sessions on open/exec when missing

- align scenario step DTO/entity/service by removing sessionName usage

- update MCP scenario-step schemas to use optional title fields
This commit is contained in:
2026-04-10 21:06:00 +03:00
parent 1627733701
commit b45f95d8cf
9 changed files with 54 additions and 28 deletions
@@ -5,6 +5,7 @@ export class AddScenarioCredentialDto {
@ApiProperty({ example: "uuid-here" })
@IsUUID()
credentialId: string;
@ApiProperty({ example: "api_key" })
@IsString()
@IsNotEmpty()
@@ -7,16 +7,6 @@ export class CreateScenarioStepDto {
@IsString()
title?: string;
@ApiPropertyOptional({
description:
"Session name (deprecated — browser is created automatically per run).",
example: "my-session",
})
@IsOptional()
@IsString()
@IsNotEmpty()
sessionName?: string;
@ApiPropertyOptional({ example: "return await page.title();" })
@IsOptional()
@IsString()
@@ -13,12 +13,6 @@ export class UpdateScenarioStepDto {
@Min(0)
order?: number;
@ApiPropertyOptional()
@IsOptional()
@IsString()
@IsNotEmpty()
sessionName?: string;
@ApiPropertyOptional()
@IsOptional()
@IsString()