Fix desktop header and popover smoke checks

Restore channel descriptions in the header and make the profile popover smoke test target the profile popover explicitly.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Thomas Petersen
2026-05-06 14:19:44 -04:00
parent 4433e47038
commit 4188f31326
3 changed files with 14 additions and 6 deletions

View File

@@ -99,6 +99,14 @@ export function ChatHeader({
</div>
) : null}
</div>
{trimmedDescription ? (
<p
className="truncate text-sm text-muted-foreground"
data-testid="chat-description"
>
{trimmedDescription}
</p>
) : null}
</div>
{actions ? <div className="shrink-0">{actions}</div> : null}

View File

@@ -121,6 +121,7 @@ export function UserProfilePopover({
clearHoverTimer();
if (openProfilePanel) {
event.preventDefault();
event.stopPropagation();
setOpen(false);
openProfilePanel(pubkey);
}
@@ -143,6 +144,7 @@ export function UserProfilePopover({
onKeyDown={(e) => {
if ((e.key === "Enter" || e.key === " ") && openProfilePanel) {
e.preventDefault();
e.stopPropagation();
clearHoverTimer();
setOpen(false);
openProfilePanel(pubkey);
@@ -158,6 +160,7 @@ export function UserProfilePopover({
<PopoverContent
align="start"
className="w-80"
data-testid="user-profile-popover"
onMouseEnter={handleContentMouseEnter}
onMouseLeave={handleMouseLeave}
side="top"

View File

@@ -157,14 +157,11 @@ test("hovering avatar opens popover, clicking opens profile panel", async ({
// Hover should open the popover
await avatarButton.hover();
await expect(
page.locator("[data-radix-popper-content-wrapper]"),
).toBeVisible();
const profilePopover = page.getByTestId("user-profile-popover");
await expect(profilePopover).toBeVisible();
// Click should close the popover and open the profile panel
await avatarButton.click();
await expect(
page.locator("[data-radix-popper-content-wrapper]"),
).not.toBeVisible();
await expect(profilePopover).not.toBeVisible();
await expect(page.getByTestId("user-profile-panel")).toBeVisible();
});