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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
perf: stop System Resources > Queues from downloading the full completed-task history
[._.]/ Adam Eivydf581af0e10d
diff --git a/client/src/components/system-resources/QueuesPanel.jsx b/client/src/components/system-resources/QueuesPanel.jsxindex 8ff197c1bd..ec15b2cdeb 100644--- a/client/src/components/system-resources/QueuesPanel.jsx+++ b/client/src/components/system-resources/QueuesPanel.jsx@@ -27,8 +27,13 @@ function CountCard({ label, value, tone = 'text-white' }) {export default function QueuesPanel() {const [spawningId, setSpawningId] = useState(null);+ // `view: 'queue'` keeps every non-completed task whole and drops the completed+ // history. The bare endpoint returns that history twice (`tasks` and+ // `grouped`) with each task's full prompt — ~144 MB on an install with a few+ // thousand finished tasks — and this resource refetches on every task/agent+ // event. The panel only reads pending, running and spawning tasks.const { data, loading, error: queueError, refetch, updateData } = useSocketResource(- () => api.getCosTasks({ silent: true }),+ () => api.getCosTasks({ view: 'queue', silent: true }),{ namespace: 'cos', events: QUEUE_EVENTS },);const tasks = useMemo(() => {diff --git a/client/src/components/system-resources/QueuesPanel.test.jsx b/client/src/components/system-resources/QueuesPanel.test.jsxindex b2e7b13a34..faeb0b71dc 100644--- a/client/src/components/system-resources/QueuesPanel.test.jsx+++ b/client/src/components/system-resources/QueuesPanel.test.jsx@@ -71,6 +71,19 @@ describe('QueuesPanel', () => {);});+ // The bare `/api/cos/tasks` carries every completed task's full prompt twice+ // (~144 MB on a long-lived install) and this panel refetches it on each task+ // or agent event. The mocked API above cannot notice a dropped `view`, so pin+ // the request itself: the queue projection is what keeps the read bounded.+ it('reads the bounded queue projection, never the full completed history', async () => {+ api.getCosTasks.mockResolvedValue({ user: { tasks: [] }, cos: { tasks: [] } });++ renderPanel();+ await screen.findByText('No pending agent tasks.');++ expect(api.getCosTasks).toHaveBeenCalledWith(expect.objectContaining({ view: 'queue' }));+ });+// The spawn window: a task keeps `status: 'pending'` for a beat after its// agent registers as running, so the one task being worked was counted on BOTH// cards and still offered a "Run now" button for a run already underway. The