Pass workspace ownership when creating terminals

This commit is contained in:
Mohamed Boudra
2026-06-16 17:35:16 +07:00
parent 10664487fb
commit 3cf3a63423
8 changed files with 159 additions and 59 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ export interface SeedDaemonClient {
cwd: string,
name?: string,
requestId?: string,
options?: { agentId?: string; command?: string; args?: string[] },
options?: { agentId?: string; command?: string; args?: string[]; workspaceId?: string },
): Promise<{
terminal: { id: string; name: string; cwd: string; activity?: TerminalActivity | null } | null;
error: string | null;
+5 -2
View File
@@ -67,8 +67,9 @@ export class TerminalE2EHarness {
? {
command: input.command,
args: input.args,
workspaceId: this.workspaceId,
}
: undefined;
: { workspaceId: this.workspaceId };
const result = await this.client.createTerminal(
this.tempRepo.path,
input.name,
@@ -90,7 +91,9 @@ export class TerminalE2EHarness {
const timeoutMs = input.timeoutMs ?? 10_000;
const deadline = Date.now() + timeoutMs;
while (Date.now() < deadline) {
const result = await this.client.listTerminals(this.tempRepo.path);
const result = await this.client.listTerminals(this.tempRepo.path, undefined, {
workspaceId: this.workspaceId,
});
const terminal = result.terminals.find((entry) => entry.id === input.terminalId);
const activity = terminal?.activity ?? null;
const attentionMatches =
+16 -2
View File
@@ -108,7 +108,14 @@ test.describe("Terminal title propagation", () => {
test.skip("terminal tab title updates from OSC title escape sequence", async ({ page }) => {
test.setTimeout(60_000);
const result = await workspace.client.createTerminal(workspace.repoPath, "title-test");
const result = await workspace.client.createTerminal(
workspace.repoPath,
"title-test",
undefined,
{
workspaceId: workspace.workspaceId,
},
);
if (!result.terminal) throw new Error(`Failed to create terminal: ${result.error}`);
const terminalId = result.terminal.id;
@@ -138,7 +145,14 @@ test.describe("Terminal title propagation", () => {
test.skip("title debouncing coalesces rapid changes", async ({ page }) => {
test.setTimeout(60_000);
const result = await workspace.client.createTerminal(workspace.repoPath, "debounce-test");
const result = await workspace.client.createTerminal(
workspace.repoPath,
"debounce-test",
undefined,
{
workspaceId: workspace.workspaceId,
},
);
if (!result.terminal) throw new Error(`Failed to create terminal: ${result.error}`);
const terminalId = result.terminal.id;