Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

fix(desktop): show a pointer cursor on interactive chat pills (TASK-172)

Mffba178cc7a2
diff --git a/desktop-app/ui/src/components/Common/Pill/__tests__/Pill.test.tsx b/desktop-app/ui/src/components/Common/Pill/__tests__/Pill.test.tsx
new file mode 100644
index 000000000..af3cd9ac5
--- /dev/null
+++ b/desktop-app/ui/src/components/Common/Pill/__tests__/Pill.test.tsx
@@ -0,0 +1,48 @@
+// @vitest-environment jsdom
+// TASK-172 — the interactive pill elements used across the chat view (model
+// selector chip, context-window indicator, …) are `<span role="button">`, so
+// the stylesheet must give them a pointer cursor like any other control.
+import { afterEach, describe, expect, it } from 'vitest'
+import { cleanup, render, screen } from '@testing-library/react'
+import { readFileSync } from 'node:fs'
+import { resolve } from 'node:path'
+import { Pill } from '../index'
+
+const styles = readFileSync(resolve(__dirname, '../../../../styles.css'), 'utf8')
+
+function injectStyles() {
+ const style = document.createElement('style')
+ style.textContent = styles
+ document.head.appendChild(style)
+ return style
+}
+
+afterEach(() => {
+ cleanup()
+ document.head.querySelectorAll('style').forEach(style => style.remove())
+})
+
+describe('Pill', () => {
+ it('shows the pointer cursor on interactive pills', () => {
+ injectStyles()
+ render(
+ <Pill interactive onClick={() => undefined}>
+ glm-5.3-flash
+ </Pill>
+ )
+
+ const pill = screen.getByRole('button', { name: 'glm-5.3-flash' })
+ expect(pill.className).toContain('ui-pill--interactive')
+ expect(getComputedStyle(pill).cursor).toBe('pointer')
+ })
+
+ it('keeps static pills cursor-neutral and non-button semantics', () => {
+ injectStyles()
+ render(<Pill tone="success">Running</Pill>)
+
+ const pill = screen.getByText('Running')
+ expect(pill.className).not.toContain('ui-pill--interactive')
+ expect(pill.getAttribute('role')).toBeNull()
+ expect(getComputedStyle(pill).cursor).not.toBe('pointer')
+ })
+})
diff --git a/desktop-app/ui/src/styles.css b/desktop-app/ui/src/styles.css
index 793519dfd..390c3348e 100644
--- a/desktop-app/ui/src/styles.css
+++ b/desktop-app/ui/src/styles.css
@@ -10455,6 +10455,11 @@ button.page-breadcrumb-link--plain-action:hover:enabled {
color: var(--text);
}
+/* TASK-172 — an interactive pill acts as a button, so it must read as one. */
+.ui-pill--interactive {
+ cursor: pointer;
+}
+
.ui-pill--interactive:hover {
background: var(--surface-hover);
border-color: rgba(var(--accent-rgb), 0.42);