Skip to content

Agent Zero AI framework

Polish Files and Memory selection toolbars

Alessandroa3f20e739eeb
diff --git a/plugins/_memory/AGENTS.md b/plugins/_memory/AGENTS.md
index eb86db63c..4da0a4a8e 100644
--- a/plugins/_memory/AGENTS.md
+++ b/plugins/_memory/AGENTS.md
@@ -26,6 +26,7 @@
## Work Guidance
+- Both dashboard selection toolbars use icon-only actions with accessible labels and the shared borderless close control before the selection count.
- Dashboard selection checkboxes reuse the shared native theme from `webui/index.css`; keep header and row controls 16px and centered in their table cells.
- Keep dashboard metadata JSON-safe without changing shared API serialization.
- Coordinate tool, prompt, and consolidation changes so saved memories remain useful and bounded.
diff --git a/plugins/_memory/webui/memory-dashboard.html b/plugins/_memory/webui/memory-dashboard.html
index 2859bd3c1..debae0942 100644
--- a/plugins/_memory/webui/memory-dashboard.html
+++ b/plugins/_memory/webui/memory-dashboard.html
@@ -130,35 +130,33 @@
<!-- Mass action toolbar -->
<div x-show="$store.memoryDashboardStore.selectedCount > 0" class="mass-action-toolbar">
- <div class="selection-info">
- <span x-text="$store.memoryDashboardStore.selectedCount"></span> memories selected
+ <div class="selection-summary">
+ <button type="button" class="selection-close"
+ @click="$store.memoryDashboardStore.clearSelection()"
+ title="Clear Selection" aria-label="Clear selection">
+ <x-icon name="close"></x-icon>
+ </button>
+ <div class="selection-info">
+ <span x-text="$store.memoryDashboardStore.selectedCount"></span> memories selected
+ </div>
</div>
<div class="mass-actions">
<button class="btn btn-mass copy" @click="$store.memoryDashboardStore.bulkCopyMemories()"
- title="Copy Selected Content">
+ title="Copy Selected Content" aria-label="Copy Selected Content">
<x-icon name="content_copy"></x-icon>
- Copy
</button>
<button class="btn btn-mass export"
@click="$store.memoryDashboardStore.bulkExportMemories()"
- title="Export Selected Memories">
+ title="Export Selected Memories" aria-label="Export Selected Memories">
<x-icon name="download"></x-icon>
- Export
</button>
<button class="btn btn-mass delete"
@click="$confirmClick($event, () => $store.memoryDashboardStore.bulkDeleteMemories())"
- title="Delete Selected Memories">
+ title="Delete Selected Memories" aria-label="Delete Selected Memories">
<x-icon name="delete"></x-icon>
- Delete
- </button>
-
- <button class="btn btn-mass clear" @click="$store.memoryDashboardStore.clearSelection()"
- title="Clear Selection">
- <x-icon name="close"></x-icon>
- Clear
</button>
</div>
</div>
@@ -253,35 +251,33 @@
<!-- Mass action toolbar -->
<div x-show="$store.memoryDashboardStore.selectedCount > 0" class="mass-action-toolbar">
- <div class="selection-info">
- <span x-text="$store.memoryDashboardStore.selectedCount"></span> memories selected
+ <div class="selection-summary">
+ <button type="button" class="selection-close"
+ @click="$store.memoryDashboardStore.clearSelection()"
+ title="Clear Selection" aria-label="Clear selection">
+ <x-icon name="close"></x-icon>
+ </button>
+ <div class="selection-info">
+ <span x-text="$store.memoryDashboardStore.selectedCount"></span> memories selected
+ </div>
</div>
<div class="mass-actions">
<button class="btn btn-mass copy" @click="$store.memoryDashboardStore.bulkCopyMemories()"
- title="Copy Selected Content">
+ title="Copy Selected Content" aria-label="Copy Selected Content">
<x-icon name="content_copy"></x-icon>
- Copy
</button>
<button class="btn btn-mass export"
@click="$store.memoryDashboardStore.bulkExportMemories()"
- title="Export Selected Memories">
+ title="Export Selected Memories" aria-label="Export Selected Memories">
<x-icon name="download"></x-icon>
- Export
</button>
<button class="btn btn-mass delete"
@click="$confirmClick($event, () => $store.memoryDashboardStore.bulkDeleteMemories())"
- title="Delete Selected Memories">
+ title="Delete Selected Memories" aria-label="Delete Selected Memories">
<x-icon name="delete"></x-icon>
- Delete
- </button>
-
- <button class="btn btn-mass clear" @click="$store.memoryDashboardStore.clearSelection()"
- title="Clear Selection">
- <x-icon name="close"></x-icon>
- Clear
</button>
</div>
</div>
@@ -355,6 +351,10 @@
</div>
<style>
+ .memory-dashboard .mass-action-toolbar { flex-flow: row wrap; gap: 0.75rem 1rem; }
+ .memory-dashboard .selection-info { white-space: nowrap; }
+ .memory-dashboard .btn-mass { padding-inline: 0.5rem; }
+
/* Modal footer layout */
.modal-inner.modal-with-footer {
display: flex;
diff --git a/webui/components/modals/file-browser/AGENTS.md b/webui/components/modals/file-browser/AGENTS.md
index d7de37f72..2c9e66a70 100644
--- a/webui/components/modals/file-browser/AGENTS.md
+++ b/webui/components/modals/file-browser/AGENTS.md
@@ -25,7 +25,7 @@
- Keep Extract available for supported archive files; extraction must create a new sibling folder and reject unsafe member paths and links.
- The dropdown tracks its originating `.file-actions` row, so hidden canvas/modal copies cannot open duplicate teleported menus or plugin entries.
- Keep row action menus visible without disabling file-list scrolling; menus may float outside the scroll container but must still close on outside click, Escape, action click, and list scroll.
-- The selection toolbar provides Download ZIP, Delete, and Clear and spans the full width below the path header and above the list/tree split. Keep the count and each button label on one line; wrap whole controls with explicit horizontal and vertical gaps on narrow panels.
+- The selection toolbar provides Download ZIP, an icon-only Delete action, and a borderless/backgroundless Clear selection close button before the selection count. The toolbar spans the full width below the path header and above the list/tree split. Keep the count and each button label on one line; wrap whole controls with explicit horizontal and vertical gaps on narrow panels.
- Keep the file list readable in narrow canvas/modal containers by hiding the Modified date column before sacrificing the Name or Size columns.
- Use the shared `surface-workspace` lighter palette, 32px flat toolbar controls, and separators between action groups; the file-tree toggle stays available in the path header.
- The list pane uses `padding: 0 6px`, a borderless list container/header bottom, and square file rows. Folder rows use the same `folder` Material Symbol as the tree; file-type SVGs remain for files. All list icons use a fixed 22px slot, with a 22px folder glyph, so folder and file names align. Folder glyphs match the muted gray in `webui/public/file.svg`.
diff --git a/webui/components/modals/file-browser/file-browser.html b/webui/components/modals/file-browser/file-browser.html
index 207bfe3ec..8155bd331 100644
--- a/webui/components/modals/file-browser/file-browser.html
+++ b/webui/components/modals/file-browser/file-browser.html
@@ -105,7 +105,19 @@
</template>
</div>
<div x-show="$store.fileBrowser.selectedCount > 0 && !$store.fileBrowser.isPickerMode()" class="mass-action-toolbar file-mass-toolbar">
- <div class="selection-info" x-text="$store.fileBrowser.selectedCountLabel"></div>
+ <div class="selection-summary">
+ <button
+ type="button"
+ class="selection-close"
+ @click="$store.fileBrowser.clearSelection()"
+ :disabled="$store.fileBrowser.isBulkBusy"
+ title="Clear Selection"
+ aria-label="Clear selection"
+ >
+ <x-icon name="close"></x-icon>
+ </button>
+ <div class="selection-info" x-text="$store.fileBrowser.selectedCountLabel"></div>
+ </div>
<div class="mass-actions">
<button
@@ -125,20 +137,9 @@
@click="$confirmClick($event, () => $store.fileBrowser.bulkDeleteFiles())"
:disabled="$store.fileBrowser.isBulkBusy"
title="Delete Selected Items"
+ aria-label="Delete selected items"
>
<x-icon name="delete"></x-icon>
- Delete
- </button>
-
- <button
- type="button"
- class="btn btn-mass clear"
- @click="$store.fileBrowser.clearSelection()"
- :disabled="$store.fileBrowser.isBulkBusy"
- title="Clear Selection"
- >
- <x-icon name="close"></x-icon>
- Clear
</button>
</div>
</div>
@@ -724,6 +725,7 @@
}
.file-mass-toolbar {
+ border-radius: 8px;
border-left: 1px solid var(--color-border);
border-right: 1px solid var(--color-border);
border-bottom: 1px solid var(--color-border);
@@ -957,6 +959,7 @@
flex-shrink: 0;
white-space: nowrap;
}
+ .file-mass-toolbar .btn-mass.delete { padding-inline: 0.5rem; }
.file-browser-workspace { display: flex; flex: 1; min-height: 0; min-width: 0; position: relative; overflow: hidden; }
.file-browser-list-pane { container: file-browser / inline-size; display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; padding: 0 6px; }
.btn-secondary {
diff --git a/webui/css/AGENTS.md b/webui/css/AGENTS.md
index 403e7e9ae..abbc82c35 100644
--- a/webui/css/AGENTS.md
+++ b/webui/css/AGENTS.md
@@ -14,6 +14,8 @@
- `surfaces.css` owns surface modal switchers, action rails, draggable header affordances, focus-button state, and right-canvas surface primitives. Files, Editor, and Browser opt into `surface-workspace` for the lighter panel palette, common toolbar chrome, flat `surface-control` buttons, and group separators. Surface modal headers share a 48px border-box height with centered titles and controls; component styles must not override their sizing. Surface modal header controls are borderless in normal, hover, and active states; preserve group separators and keyboard focus outlines. Tab bars and toolbars share a 48px baseline with vertically centered controls. File trees use `--color-background` to contrast with the lighter `--color-panel` workspace. Keep these styles opt-in and preserve viewer/content themes; primary empty-state actions such as Open Browser retain their existing button styling.
- `index.css` defines global theme variables such as `--color-*`, `--spacing-*`, `--font-size-*`, and `--transition-speed`.
+- `tables.css` owns the shared selection summary and borderless close control used by Files and Memory.
+
## Local Contracts
- Use existing CSS variables and naming patterns before introducing new global tokens.
diff --git a/webui/css/tables.css b/webui/css/tables.css
index d20fe818e..97633bf3b 100644
--- a/webui/css/tables.css
+++ b/webui/css/tables.css
@@ -464,3 +464,22 @@
}
}
+
+/* Selection dismiss controls shared by Files and Memory. */
+.selection-summary { display: flex; align-items: center; gap: 0.5rem; }
+.selection-close {
+ flex-shrink: 0;
+ display: inline-grid;
+ place-items: center;
+ width: 32px;
+ height: 32px;
+ padding: 0;
+ border: 0;
+ background: transparent;
+ color: var(--color-text);
+ cursor: pointer;
+ opacity: 0.7;
+}
+.selection-close:hover:not(:disabled) { opacity: 1; }
+.selection-close:disabled { opacity: 0.5; cursor: default; }
+.selection-close:focus-visible { outline: 1px solid var(--color-text); outline-offset: -2px; }