Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ describe("ThreadEnvironmentSummary", () => {

fireEvent.focus(
screen.getByRole("button", {
name: "Create new thread in this worktree",
name: "Create thread in worktree",
}),
);

expect((await screen.findByRole("tooltip")).textContent).toBe(
"Create new thread in this worktree",
"Create thread in worktree",
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ export const ThreadEnvironmentSummary = memo(function ThreadEnvironmentSummary({
<TooltipTrigger asChild>
<button
type="button"
aria-label="Create new thread in this worktree"
aria-label="Create thread in worktree"
onClick={onCreateNewThreadInWorktree}
className="-ml-1 inline-flex cursor-pointer shrink-0 items-center justify-center rounded-md px-1 py-0.5 text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground"
>
<Icon name="MessageSquarePlus" className="size-4" />
</button>
</TooltipTrigger>
<TooltipContent>Create new thread in this worktree</TooltipContent>
<TooltipContent>Create thread in worktree</TooltipContent>
</Tooltip>
) : null}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe("ThreadMetadataCard", () => {
describe("EnvironmentRow", () => {
it("shows the create-thread action for a provisioned worktree", () => {
expect(renderEnvironmentRow(makeEnvironment())).toContain(
'aria-label="Create new thread in this worktree"',
'aria-label="Create thread in worktree"',
);
});

Expand All @@ -137,12 +137,12 @@ describe("EnvironmentRow", () => {

fireEvent.focus(
screen.getByRole("button", {
name: "Create new thread in this worktree",
name: "Create thread in worktree",
}),
);

expect((await screen.findByRole("tooltip")).textContent).toBe(
"Create new thread in this worktree",
"Create thread in worktree",
);
});

Expand All @@ -155,9 +155,7 @@ describe("EnvironmentRow", () => {
}),
);

expect(markup).not.toContain(
'aria-label="Create new thread in this worktree"',
);
expect(markup).not.toContain('aria-label="Create thread in worktree"');
});

it("hides the create-thread action before a prepared worktree has a path", () => {
Expand All @@ -168,9 +166,7 @@ describe("EnvironmentRow", () => {
}),
);

expect(markup).not.toContain(
'aria-label="Create new thread in this worktree"',
);
expect(markup).not.toContain('aria-label="Create thread in worktree"');
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,14 @@ export function EnvironmentRow({
<TooltipTrigger asChild>
<button
type="button"
aria-label="Create new thread in this worktree"
aria-label="Create thread in worktree"
onClick={createThreadInWorktree}
className="inline-flex shrink-0 items-center justify-center rounded-md p-0.5 text-muted-foreground transition-colors hover:bg-state-hover hover:text-foreground"
>
<Icon name="MessageSquarePlus" className="size-4" />
</button>
</TooltipTrigger>
<TooltipContent>Create new thread in this worktree</TooltipContent>
<TooltipContent>Create thread in worktree</TooltipContent>
</Tooltip>
) : null}
</span>
Expand Down
Loading