Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(toast): prevent duplicate toast instances on rapid triggers

Steven Enamakel99be0c417ed9
diff --git a/app/src/components/intelligence/Toast.tsx b/app/src/components/intelligence/Toast.tsx
index 96a25735ed..dfb20e1e43 100644
--- a/app/src/components/intelligence/Toast.tsx
+++ b/app/src/components/intelligence/Toast.tsx
@@ -131,7 +131,7 @@ function Toast({ notification, onRemove }: ToastProps) {
variant="tertiary"
size="xs"
iconOnly
- aria-label="Dismiss notification"
+ aria-label={t('notifications.card.dismiss', 'Dismiss notification')}
onClick={handleRemove}
className="shrink-0 text-content-faint hover:text-content-secondary">
<CloseIcon className="w-4 h-4" />
diff --git a/app/src/components/settings/panels/__tests__/MigrationPanel.test.tsx b/app/src/components/settings/panels/__tests__/MigrationPanel.test.tsx
index 12687a4ebd..f23880d90e 100644
--- a/app/src/components/settings/panels/__tests__/MigrationPanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/MigrationPanel.test.tsx
@@ -184,8 +184,7 @@ describe('MigrationPanel (#1440)', () => {
fireEvent.click(screen.getByTestId('migration-preview-button'));
await waitFor(() => expect(apply).not.toBeDisabled());
- const select = screen.getByTestId('migration-vendor-select') as HTMLSelectElement;
- fireEvent.change(select, { target: { value: 'hermes' } });
+ fireEvent.click(screen.getByTestId('migration-vendor-option-hermes'));
expect(apply).toBeDisabled();
});
diff --git a/app/src/components/settings/panels/__tests__/UsagePanel.test.tsx b/app/src/components/settings/panels/__tests__/UsagePanel.test.tsx
index 24d9d3f9ad..5ec52f3cc8 100644
--- a/app/src/components/settings/panels/__tests__/UsagePanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/UsagePanel.test.tsx
@@ -14,15 +14,21 @@ vi.mock('../../../dashboard/CostDashboardPanel', () => ({
),
}));
-vi.mock('../AIPanel', () => ({
- BackgroundLoopControls: ({ view, hideHeader }: { view?: string; hideHeader?: boolean }) => (
+// UsagePanel imports the loop-map component directly from its extracted
+// module (`./ai/BackgroundLoopControls`), not through the `AIPanel` re-export
+// — stub that module so this suite stays focused on the hash <-> tab mapping
+// UsagePanel owns, rather than mounting the real component (and its
+// RPC-backed data fetches).
+vi.mock('../ai/BackgroundLoopControls', () => {
+ const Stub = ({ view, hideHeader }: { view?: string; hideHeader?: boolean }) => (
<div
data-testid="stub-background-loops"
data-view={view}
data-hide-header={String(hideHeader ?? false)}
/>
- ),
-}));
+ );
+ return { BackgroundLoopControls: Stub, default: Stub };
+});
vi.mock('../TokenUsagePanel', () => ({
default: ({ embedded }: { embedded?: boolean }) => (