Skip to content

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

TypeScript

fix(control-ui): cr2-h1 widen gfs action cell target

Josué9285e500d6b1
diff --git a/control-ui/app/globals.css b/control-ui/app/globals.css
index a68ab7bd6..1fa37ab6b 100644
--- a/control-ui/app/globals.css
+++ b/control-ui/app/globals.css
@@ -12654,10 +12654,13 @@ button.cu-gfs-tree__button:focus-visible,
.cu-gfs-list__actions {
display: flex;
align-items: center;
+ align-self: stretch;
gap: var(--cu-space-1);
grid-column: auto;
- justify-self: end;
+ justify-content: flex-end;
+ justify-self: stretch;
flex-wrap: nowrap;
+ cursor: pointer;
}
.cu-gfs-list__row .cu-gfs-list__row-action.cu-btn {
@@ -14115,7 +14118,7 @@ button.cu-gfs-tree__button:focus-visible,
.cu-gfs-list__actions {
grid-column: auto;
- justify-self: end;
+ justify-self: stretch;
}
.cu-gfs-manage-dialog__header {
diff --git a/control-ui/components/GfsBrowser.tsx b/control-ui/components/GfsBrowser.tsx
index 2e231b9f6..fc90488e7 100644
--- a/control-ui/components/GfsBrowser.tsx
+++ b/control-ui/components/GfsBrowser.tsx
@@ -1326,7 +1326,23 @@ export function GfsBrowser(): React.JSX.Element {
<span className="cu-gfs-list__value">
{child.kind === 'directory' ? '—' : formatBytes(child.bytes)}
</span>
- <span className="cu-gfs-list__actions">
+ <span
+ className="cu-gfs-list__actions"
+ onClick={event => {
+ const target = event.target
+ if (target instanceof Element) {
+ const interactive = target.closest(
+ 'button, a, input, select, textarea, [tabindex]'
+ )
+ if (interactive && event.currentTarget.contains(interactive)) return
+ }
+ event.preventDefault()
+ event.stopPropagation()
+ event.currentTarget
+ .querySelector<HTMLButtonElement>('button[aria-haspopup="menu"]')
+ ?.click()
+ }}
+ >
<GfsResourceMenu
resourceName={child.name}
resourceUri={child.gfsUri}
diff --git a/control-ui/components/__tests__/GfsBrowser.test.tsx b/control-ui/components/__tests__/GfsBrowser.test.tsx
index ec113992a..6f8721e80 100644
--- a/control-ui/components/__tests__/GfsBrowser.test.tsx
+++ b/control-ui/components/__tests__/GfsBrowser.test.tsx
@@ -1169,7 +1169,10 @@ describe('GfsBrowser', () => {
button.getAttribute('aria-label')
)
).toEqual(['Actions for report.md'])
- await openResourceMenu('report.md')
+ const actionsCell = reportRow!.querySelector('.cu-gfs-list__actions')
+ expect(actionsCell).not.toBeNull()
+ expect(actionsCell).not.toHaveAttribute('tabindex')
+ fireEvent.click(actionsCell!)
expect(screen.getByRole('menuitem', { name: 'Share' })).toBeVisible()
expect(screen.getByRole('menuitem', { name: 'Download' })).toBeVisible()
expect(screen.getByRole('menuitem', { name: 'Rename' })).toBeVisible()
diff --git a/control-ui/package-lock.json b/control-ui/package-lock.json
index a17f30e52..8c1d392f1 100644
--- a/control-ui/package-lock.json
+++ b/control-ui/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-ui",
- "version": "0.1.620",
+ "version": "0.1.621",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-ui",
- "version": "0.1.620",
+ "version": "0.1.621",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/frontend-components": "file:../packages/frontend-components",
diff --git a/control-ui/package.json b/control-ui/package.json
index c4f2888bc..c92638a06 100644
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-ui",
- "version": "0.1.620",
+ "version": "0.1.621",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",