Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: remove Run Now button on Tasks page

[._.]/ Adam Eivyb77c1f260258
diff --git a/client/src/components/cos/tabs/TasksTab.jsx b/client/src/components/cos/tabs/TasksTab.jsx
index a62a9c778c..92be582063 100644
--- a/client/src/components/cos/tabs/TasksTab.jsx
+++ b/client/src/components/cos/tabs/TasksTab.jsx
@@ -2,7 +2,7 @@ import { usePagedCollection } from '../../../hooks/usePagedCollection';
import InfiniteScrollFooter from '../../ui/InfiniteScrollFooter';
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
import { useSearchParams } from 'react-router';
-import { Play, ChevronDown, ChevronRight } from 'lucide-react';
+import { ChevronDown, ChevronRight } from 'lucide-react';
import toast from '../../ui/Toast';
import {
DndContext,
@@ -227,24 +227,8 @@ export default function TasksTab({ completedRevision = 0, tasks, agents = [], li
<div className="space-y-6">
{/* User Tasks */}
<div>
- <div className="flex items-center justify-between mb-3">
+ <div className="mb-3">
<h3 className="text-lg font-semibold text-white">Task queue</h3>
- <button
- onClick={async () => {
- // Only toast success after the evaluate request resolves.
- try {
- await api.forceCosEvaluate({ silent: true });
- toast.success('Evaluation triggered');
- } catch (err) {
- toast.error(err.message);
- }
- }}
- className="flex items-center gap-1 text-sm bg-port-success/20 hover:bg-port-success/30 text-port-success px-3 py-1.5 rounded-lg transition-colors"
- aria-label="Run tasks now"
- >
- <Play size={16} aria-hidden="true" />
- Run Now
- </button>
</div>
<p className="mb-3 text-sm text-gray-400" aria-label="Queue status">
diff --git a/client/src/components/cos/tabs/TasksTab.test.jsx b/client/src/components/cos/tabs/TasksTab.test.jsx
index 50f7f19afd..d69301d36b 100644
--- a/client/src/components/cos/tabs/TasksTab.test.jsx
+++ b/client/src/components/cos/tabs/TasksTab.test.jsx
@@ -2,11 +2,8 @@ import { describe, it, expect, vi, beforeEach } from 'vitest';
import { fireEvent, render, screen, waitFor } from '@testing-library/react';
import { MemoryRouter } from 'react-router';
-// Regression coverage for #2519 — the "Run Now" evaluate button must only toast
-// success after the request resolves.
vi.mock('../../../hooks/useAssignableInstances', () => ({ default: () => ({ instances: [], isFederated: false }) }));
const api = vi.hoisted(() => ({
- forceCosEvaluate: vi.fn(),
getCosTasks: vi.fn(),
getCosLearningDurations: vi.fn(),
}));
@@ -32,38 +29,14 @@ beforeEach(() => {
api.getCosLearningDurations.mockResolvedValue(null);
});
-describe('TasksTab Run Now', () => {
- it('does not toast success when the evaluate request fails', async () => {
- api.forceCosEvaluate.mockRejectedValue(new Error('offline'));
- renderTab();
-
- fireEvent.click(screen.getByRole('button', { name: /Run tasks now/i }));
-
- await waitFor(() => expect(toast.error).toHaveBeenCalledWith('offline'));
- expect(toast.success).not.toHaveBeenCalled();
- });
-
- it('toasts success only after the evaluate request resolves', async () => {
- api.forceCosEvaluate.mockResolvedValue({ success: true });
- renderTab();
-
- fireEvent.click(screen.getByRole('button', { name: /Run tasks now/i }));
-
- await waitFor(() => expect(toast.success).toHaveBeenCalledWith('Evaluation triggered'));
- expect(toast.error).not.toHaveBeenCalled();
- // Must pass { silent: true } so the custom catch is the only error toast.
- expect(api.forceCosEvaluate).toHaveBeenCalledWith({ silent: true });
- });
-
- it('opens and focuses the task identified by the queue deep link', async () => {
- const task = { id: 'task-example', description: 'Review an example task', status: 'completed', metadata: {} };
- renderTab({ tasks: { user: { tasks: [task] }, cos: { tasks: [] } } }, '/cos/tasks?task=task-example&source=user');
+it('opens and focuses the task identified by the queue deep link', async () => {
+ const task = { id: 'task-example', description: 'Review an example task', status: 'completed', metadata: {} };
+ renderTab({ tasks: { user: { tasks: [task] }, cos: { tasks: [] } } }, '/cos/tasks?task=task-example&source=user');
- await waitFor(() => expect(document.getElementById('cos-task-user-task-example')).not.toBeNull());
- const row = document.getElementById('cos-task-user-task-example');
- expect(row).toHaveAttribute('aria-current', 'true');
- expect(row).toHaveFocus();
- });
+ await waitFor(() => expect(document.getElementById('cos-task-user-task-example')).not.toBeNull());
+ const row = document.getElementById('cos-task-user-task-example');
+ expect(row).toHaveAttribute('aria-current', 'true');
+ expect(row).toHaveFocus();
});
// The server registers an agent as `running` BEFORE it flips the agent's task