Skip to content

Commit 900a787

Browse files
authored
Merge pull request #3843 from bobleer/fix/companion-bubbles-remove-tooltip
fix(web-ui): remove the hover tooltip from companion pet bubbles
2 parents 437c798 + b270632 commit 900a787

3 files changed

Lines changed: 18 additions & 5 deletions

File tree

‎src/web-ui/src/app/components/AgentCompanionDesktopPet/AgentCompanionDesktopPet.scss‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,7 @@
463463
font-weight: var(--openbitfun-type-label-selected-font-weight);
464464
}
465465

466-
/* The words behind the glyph stay for assistive tech; sighted users get
467-
them in the bubble's tooltip. */
466+
/* The words behind the glyph stay for assistive tech. */
468467
&__bubble-status {
469468
position: absolute;
470469
width: 1px;

‎src/web-ui/src/app/components/AgentCompanionDesktopPet/AgentCompanionDesktopPet.test.tsx‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,21 @@ describe('AgentCompanionDesktopPet', () => {
632632
);
633633
});
634634

635+
it('shows no tooltip on a session bubble while keeping its status for assistive tech', () => {
636+
pushActivity({
637+
mood: 'working',
638+
tasks: [task()],
639+
sequence: 1,
640+
emittedAt: 1,
641+
});
642+
643+
const bubble = query('.openbitfun-agent-companion-window__bubble');
644+
645+
expect(bubble?.hasAttribute('title')).toBe(false);
646+
expect(query('.openbitfun-agent-companion-window__bubble-title')?.getAttribute('data-overflow-tooltip')).toBeNull();
647+
expect(bubble?.querySelector('.openbitfun-agent-companion-window__bubble-status')?.textContent).toBeTruthy();
648+
});
649+
635650
it('hides the composer entry for sessions that cannot be replied to directly', () => {
636651
pushActivity({
637652
mood: 'working',

‎src/web-ui/src/app/components/AgentCompanionDesktopPet/AgentCompanionDesktopPet.tsx‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function menuAnchorFromEvent(event: React.MouseEvent): MenuAnchor {
114114
};
115115
}
116116

117-
/** A bubble states its task with a glyph; the words stay for tooltips and assistive tech. */
117+
/** A bubble states its task with a glyph; the words stay for assistive tech. */
118118
const TASK_STATE_GLYPHS: Record<AgentCompanionTaskState, LucideIcon> = {
119119
running: LucideLoaderCircle,
120120
waiting: LucideHourglass,
@@ -1128,7 +1128,7 @@ export const AgentCompanionDesktopPet: React.FC = () => {
11281128
strokeWidth={2.25}
11291129
aria-hidden="true"
11301130
/>
1131-
{/* The bubble's own tooltip carries title and status together. */}
1131+
{/* Bubbles show no tooltip; an overflowing title scrolls on hover instead. */}
11321132
<OverflowText className="openbitfun-agent-companion-window__bubble-title" title="" data-openbitfun-component="agent-companion-desktop-pet" data-openbitfun-part="bubbleTitle">
11331133
{task.title}
11341134
</OverflowText>
@@ -1215,7 +1215,6 @@ export const AgentCompanionDesktopPet: React.FC = () => {
12151215
<button
12161216
type="button"
12171217
className={bubbleClassName}
1218-
title={`${task.title} · ${statusLabel}`}
12191218
onClick={() => void openTaskSession(task)}
12201219
data-openbitfun-component="agent-companion-desktop-pet"
12211220
data-openbitfun-part="bubble"

0 commit comments

Comments
 (0)