From f90311fb9376b484f4e7f0339d6b70081202c832 Mon Sep 17 00:00:00 2001 From: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Date: Sun, 16 Aug 2026 12:30:53 +0000 Subject: [PATCH] fix: require explicit workspace group close refs #2874 --- docs/next/api/herdr-api.schema.json | 18 +- .../src/content/docs/cli-reference.mdx | 4 +- .../src/content/docs/ja/cli-reference.mdx | 4 +- .../src/content/docs/ja/socket-api.mdx | 2 + .../website/src/content/docs/socket-api.mdx | 2 + .../src/content/docs/zh-cn/cli-reference.mdx | 4 +- .../src/content/docs/zh-cn/socket-api.mdx | 2 + src/api/schema.rs | 2 +- src/api/schema/tests.rs | 28 +++ src/api/schema/workspaces.rs | 7 + src/app/actions.rs | 67 +++--- src/app/api/workspaces.rs | 200 +++++++++++++++--- src/app/input/modal.rs | 65 +++++- src/app/input/mouse.rs | 2 +- src/app/input/navigate.rs | 25 ++- src/app/mod.rs | 1 + src/app/runtime_mutations.rs | 15 +- src/app/state.rs | 3 + src/cli/runtime.rs | 11 +- src/cli/workspace.rs | 21 +- src/protocol/wire.rs | 2 +- tests/api_ping.rs | 2 +- tests/cli/sessions.rs | 12 +- tests/cli/workspace.rs | 77 +++++++ tests/support/mod.rs | 2 +- 25 files changed, 465 insertions(+), 113 deletions(-) diff --git a/docs/next/api/herdr-api.schema.json b/docs/next/api/herdr-api.schema.json index f9642ffa0d..8ff90f20de 100644 --- a/docs/next/api/herdr-api.schema.json +++ b/docs/next/api/herdr-api.schema.json @@ -1,6 +1,6 @@ { "$schema": "https://json-schema.org/draft/2020-12/schema", - "protocol": 20, + "protocol": 21, "schema_version": 1, "schemas": { "error_response": { @@ -4145,6 +4145,20 @@ ], "type": "string" }, + "WorkspaceCloseParams": { + "properties": { + "close_group": { + "type": "boolean" + }, + "workspace_id": { + "type": "string" + } + }, + "required": [ + "workspace_id" + ], + "type": "object" + }, "WorkspaceCreateParams": { "properties": { "cwd": { @@ -4722,7 +4736,7 @@ "type": "string" }, "params": { - "$ref": "#/schemas/request/$defs/WorkspaceTarget" + "$ref": "#/schemas/request/$defs/WorkspaceCloseParams" } }, "required": [ diff --git a/docs/next/website/src/content/docs/cli-reference.mdx b/docs/next/website/src/content/docs/cli-reference.mdx index a0abc54118..87d89c1f36 100644 --- a/docs/next/website/src/content/docs/cli-reference.mdx +++ b/docs/next/website/src/content/docs/cli-reference.mdx @@ -121,7 +121,7 @@ herdr workspace get herdr workspace focus herdr workspace rename