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 @@ -1949,7 +1949,6 @@ const SessionsSection: React.FC<SessionsSectionProps> = ({
key={session.sessionId}
content={tooltipContent}
placement="right"
followCursor
disabled={isEditing || openMenuSessionId !== null}
>
{row}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ function readSessionsSectionStylesheet(): string {
return stylesheet.replace(/\r\n/g, '\n');
}

function readSessionsSectionSource(): string {
const source = readFileSync(
fileURLToPath(new URL('./SessionsSection.tsx', import.meta.url)),
'utf8',
);
return source.replace(/\r\n/g, '\n');
}

function extractInlineItemActionsBlock(stylesheet: string): string {
const match = stylesheet.match(/&__inline-item-actions\s*\{(?<body>[\s\S]*?)\n\s*\}/);
return match?.groups?.body ?? '';
Expand Down Expand Up @@ -71,6 +79,17 @@ describe('SessionsSection layout styles', () => {
expect(actionButtonBlock).toContain('height: 20px;');
});

it('anchors session detail tooltips beside the row instead of over adjacent sessions', () => {
const source = readSessionsSectionSource();
const sessionTooltip = source.match(
/<Tooltip\s+key=\{session\.sessionId\}[\s\S]*?disabled=\{isEditing \|\| openMenuSessionId !== null\}\s*>/,
)?.[0] ?? '';

expect(sessionTooltip).toContain('content={tooltipContent}');
expect(sessionTooltip).toContain('placement="right"');
expect(sessionTooltip).not.toContain('followCursor');
});

it('centers empty and session expansion helper content', () => {
const stylesheet = readSessionsSectionStylesheet();
const emptyBlock = extractBlock(stylesheet, '&__inline-empty');
Expand Down
Loading
Loading