refactor: enhance pane split and stack actions with explicit action identifiers
- commit
- 2ef39d4ef7023b90aaaa5368e06b39033e3b8a8f
- author
- bamen · · 2025-09-26 05:06 UTC
- parent
- 103eec0
- signature
- unsigned
1 file · +5 -5
M gui/src/injected/modules/workspace.ts +5 -5
| @@ -309,7 +309,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||
| 309 | 309 | direction: "right", | |
| 310 | 310 | config: this.config, | |
| 311 | 311 | }); | |
| 312 | - | this.bridge({ event: "pane-split", direction: "right" }); | |
| 312 | + | this.bridge({ event: "pane-split", direction: "right", action: "split-right" }); | |
| 313 | 313 | this.showToast("Split pane to the right"); | |
| 314 | 314 | this.exitPaneMode("split-right"); | |
| 315 | 315 | break; | |
| @@ -318,7 +318,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||
| 318 | 318 | direction: "left", | |
| 319 | 319 | config: this.config, | |
| 320 | 320 | }); | |
| 321 | - | this.bridge({ event: "pane-split", direction: "left" }); | |
| 321 | + | this.bridge({ event: "pane-split", direction: "left", action: "split-left" }); | |
| 322 | 322 | this.showToast("Split pane to the left"); | |
| 323 | 323 | this.exitPaneMode("split-left"); | |
| 324 | 324 | break; | |
| @@ -327,7 +327,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||
| 327 | 327 | direction: "up", | |
| 328 | 328 | config: this.config, | |
| 329 | 329 | }); | |
| 330 | - | this.bridge({ event: "pane-split", direction: "up" }); | |
| 330 | + | this.bridge({ event: "pane-split", direction: "up", action: "split-up" }); | |
| 331 | 331 | this.showToast("Split pane upwards"); | |
| 332 | 332 | this.exitPaneMode("split-up"); | |
| 333 | 333 | break; | |
| @@ -336,7 +336,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||
| 336 | 336 | direction: "down", | |
| 337 | 337 | config: this.config, | |
| 338 | 338 | }); | |
| 339 | - | this.bridge({ event: "pane-split", direction: "down" }); | |
| 339 | + | this.bridge({ event: "pane-split", direction: "down", action: "split-down" }); | |
| 340 | 340 | this.showToast("Split pane downwards"); | |
| 341 | 341 | this.exitPaneMode("split-down"); | |
| 342 | 342 | break; | |
| @@ -344,7 +344,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||
| 344 | 344 | this.emitWorkspaceEvent("pane-stack", { | |
| 345 | 345 | config: this.config, | |
| 346 | 346 | }); | |
| 347 | - | this.bridge({ event: "pane-stack" }); | |
| 347 | + | this.bridge({ event: "pane-stack", action: "stack-pane" }); | |
| 348 | 348 | this.showToast("Stacked pane"); | |
| 349 | 349 | this.exitPaneMode("stack-pane"); | |
| 350 | 350 | break; | |
| @@ -309,7 +309,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||||
| 309 | direction: "right", | 309 | direction: "right", | ||
| 310 | config: this.config, | 310 | config: this.config, | ||
| 311 | }); | 311 | }); | ||
| 312 | - | this.bridge({ event: "pane-split", direction: "right" }); | 312 | + | this.bridge({ event: "pane-split", direction: "right", action: "split-right" }); |
| 313 | this.showToast("Split pane to the right"); | 313 | this.showToast("Split pane to the right"); | ||
| 314 | this.exitPaneMode("split-right"); | 314 | this.exitPaneMode("split-right"); | ||
| 315 | break; | 315 | break; | ||
| @@ -318,7 +318,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||||
| 318 | direction: "left", | 318 | direction: "left", | ||
| 319 | config: this.config, | 319 | config: this.config, | ||
| 320 | }); | 320 | }); | ||
| 321 | - | this.bridge({ event: "pane-split", direction: "left" }); | 321 | + | this.bridge({ event: "pane-split", direction: "left", action: "split-left" }); |
| 322 | this.showToast("Split pane to the left"); | 322 | this.showToast("Split pane to the left"); | ||
| 323 | this.exitPaneMode("split-left"); | 323 | this.exitPaneMode("split-left"); | ||
| 324 | break; | 324 | break; | ||
| @@ -327,7 +327,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||||
| 327 | direction: "up", | 327 | direction: "up", | ||
| 328 | config: this.config, | 328 | config: this.config, | ||
| 329 | }); | 329 | }); | ||
| 330 | - | this.bridge({ event: "pane-split", direction: "up" }); | 330 | + | this.bridge({ event: "pane-split", direction: "up", action: "split-up" }); |
| 331 | this.showToast("Split pane upwards"); | 331 | this.showToast("Split pane upwards"); | ||
| 332 | this.exitPaneMode("split-up"); | 332 | this.exitPaneMode("split-up"); | ||
| 333 | break; | 333 | break; | ||
| @@ -336,7 +336,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||||
| 336 | direction: "down", | 336 | direction: "down", | ||
| 337 | config: this.config, | 337 | config: this.config, | ||
| 338 | }); | 338 | }); | ||
| 339 | - | this.bridge({ event: "pane-split", direction: "down" }); | 339 | + | this.bridge({ event: "pane-split", direction: "down", action: "split-down" }); |
| 340 | this.showToast("Split pane downwards"); | 340 | this.showToast("Split pane downwards"); | ||
| 341 | this.exitPaneMode("split-down"); | 341 | this.exitPaneMode("split-down"); | ||
| 342 | break; | 342 | break; | ||
| @@ -344,7 +344,7 @@ class WorkspaceController implements WorkspaceRuntime { | |||||
| 344 | this.emitWorkspaceEvent("pane-stack", { | 344 | this.emitWorkspaceEvent("pane-stack", { | ||
| 345 | config: this.config, | 345 | config: this.config, | ||
| 346 | }); | 346 | }); | ||
| 347 | - | this.bridge({ event: "pane-stack" }); | 347 | + | this.bridge({ event: "pane-stack", action: "stack-pane" }); |
| 348 | this.showToast("Stacked pane"); | 348 | this.showToast("Stacked pane"); | ||
| 349 | this.exitPaneMode("stack-pane"); | 349 | this.exitPaneMode("stack-pane"); | ||
| 350 | break; | 350 | break; | ||