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: auto-recalculate CoS productivity data on first visit

Adam Eivy7a5b8ff05133
diff --git a/.changelog/v1.25.x.md b/.changelog/v1.25.x.md
index bec337a78c..89795e40cf 100644
--- a/.changelog/v1.25.x.md
+++ b/.changelog/v1.25.x.md
@@ -14,6 +14,7 @@ Reusable ProcessesTab component with per-app process views and a bug fix for cle
## 🐛 Fixes
- **Clear Failed Runs**: Fixed "Only filter=failed is supported" error when clicking Clear Failed on the DevTools Runs page — client was sending wrong query parameter
+- **CoS Productivity Tab**: Auto-recalculate productivity data from agent history on first visit instead of showing empty state when `productivity.json` hasn't been generated yet
## 🔧 Improvements
diff --git a/client/src/components/cos/tabs/ProductivityTab.jsx b/client/src/components/cos/tabs/ProductivityTab.jsx
index 7c9cda12b8..d412a340b9 100644
--- a/client/src/components/cos/tabs/ProductivityTab.jsx
+++ b/client/src/components/cos/tabs/ProductivityTab.jsx
@@ -32,15 +32,22 @@ export default function ProductivityTab() {
milestones: false
});
- const loadData = useCallback(async () => {
+ const loadData = useCallback(async (autoRecalculate = false) => {
setLoading(true);
const productivity = await api.getCosProductivity().catch(() => null);
- setData(productivity);
+ if (!productivity?.totals?.totalTasks && autoRecalculate) {
+ // No productivity.json yet — build it from agent history
+ await api.recalculateCosProductivity().catch(() => null);
+ const refreshed = await api.getCosProductivity().catch(() => null);
+ setData(refreshed);
+ } else {
+ setData(productivity);
+ }
setLoading(false);
}, []);
useEffect(() => {
- loadData();
+ loadData(true);
}, [loadData]);
const handleRecalculate = useCallback(async () => {
diff --git a/package-lock.json b/package-lock.json
index 02d51dde48..d2db0ce31d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos",
- "version": "1.25.0",
+ "version": "1.25.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos",
- "version": "1.25.0",
+ "version": "1.25.1",
"license": "MIT",
"dependencies": {
"express": "^4.21.2",
diff --git a/package.json b/package.json
index 52dc875230..320b8c9051 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portos",
- "version": "1.25.0",
+ "version": "1.25.1",
"private": true,
"description": "Local dev machine App OS portal",
"author": "Adam Eivy (@antic|@atomantic)",