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(cos): show all completed agents with paginated Show More button

Adam Eivy097f45916dd2
diff --git a/.changelog/v0.16.x.md b/.changelog/v0.16.x.md
index 3fc84564b6..6877a9716a 100644
--- a/.changelog/v0.16.x.md
+++ b/.changelog/v0.16.x.md
@@ -26,6 +26,11 @@ Agent persistence, reliability, and decision transparency improvements.
- **8 agents with legacy metadata format normalized** -- older metadata files using `agentId` instead of `id` and missing `status` field are now properly loaded into the cache
- **Zombie-cleaned agents now persist to disk** -- `cleanupZombieAgents()` previously only updated in-memory state; now writes `metadata.json` and updates the cache so zombie-cleaned agents survive state resets
+### Completed agents now fully visible in UI
+- **Replaced hard limit of 15 with paginated "Show More"** -- previously the Agents tab showed only the 15 most recent completed agents with a static "+ N more" message and no way to see the rest; now shows 50 at a time with a "Show more (N remaining)" button to load the next batch
+- **Search results also paginated** -- filtered results use the same incremental loading, and visible count resets when the search query changes
+- **Fixed missing `socket.off('cos:agent:updated')` cleanup** -- the WebSocket event listener was never unregistered on component unmount
+
## Improvements
### CoS now records every no-action decision with reasons
diff --git a/client/src/components/cos/tabs/AgentsTab.jsx b/client/src/components/cos/tabs/AgentsTab.jsx
index 5dcbcd5681..aac2bf6936 100644
--- a/client/src/components/cos/tabs/AgentsTab.jsx
+++ b/client/src/components/cos/tabs/AgentsTab.jsx
@@ -5,10 +5,13 @@ import * as api from '../../../services/api';
import AgentCard from './AgentCard';
import ResumeAgentModal from './ResumeAgentModal';
+const PAGE_SIZE = 50;
+
export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, apps }) {
const [resumingAgent, setResumingAgent] = useState(null);
const [durations, setDurations] = useState(null);
const [searchQuery, setSearchQuery] = useState('');
+ const [visibleCount, setVisibleCount] = useState(PAGE_SIZE);
// Fetch duration estimates for progress indicators
useEffect(() => {
@@ -72,6 +75,11 @@ export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, a
});
}, [completedAgents, searchQuery]);
+ // Reset visible count when search changes
+ useEffect(() => {
+ setVisibleCount(PAGE_SIZE);
+ }, [searchQuery]);
+
return (
<div className="space-y-6">
{/* Active Agents */}
@@ -150,13 +158,16 @@ export default function AgentsTab({ agents, onRefresh, liveOutputs, providers, a
</div>
)}
<div className="space-y-2">
- {(searchQuery ? filteredCompletedAgents : filteredCompletedAgents.slice(0, 15)).map(agent => (
+ {filteredCompletedAgents.slice(0, visibleCount).map(agent => (
<AgentCard key={agent.id} agent={agent} completed onDelete={handleDelete} onResume={handleResumeClick} onFeedbackChange={onRefresh} />
))}
- {!searchQuery && completedAgents.length > 15 && (
- <div className="text-center text-sm text-gray-500 py-2">
- + {completedAgents.length - 15} more completed agents
- </div>
+ {filteredCompletedAgents.length > visibleCount && (
+ <button
+ onClick={() => setVisibleCount(prev => prev + PAGE_SIZE)}
+ className="w-full py-2 text-sm text-port-accent hover:text-white bg-port-card border border-port-border rounded-lg transition-colors"
+ >
+ Show more ({filteredCompletedAgents.length - visibleCount} remaining)
+ </button>
)}
{searchQuery && filteredCompletedAgents.length === 0 && (
<div className="bg-port-card border border-port-border rounded-lg p-6 text-center text-gray-500">
diff --git a/client/src/pages/ChiefOfStaff.jsx b/client/src/pages/ChiefOfStaff.jsx
index 68dcf0f3af..dbf9795588 100644
--- a/client/src/pages/ChiefOfStaff.jsx
+++ b/client/src/pages/ChiefOfStaff.jsx
@@ -246,6 +246,7 @@ export default function ChiefOfStaff() {
socket.off('cos:status');
socket.off('cos:tasks:user:changed');
socket.off('cos:agent:spawned');
+ socket.off('cos:agent:updated');
socket.off('cos:agent:output');
socket.off('cos:agent:completed');
socket.off('cos:health:check');