mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 10:50:38 +09:00
## Summary - Fix [PAP-3154](/PAP/issues/PAP-3154): the Sidebar's "Dashboard NN live" badge showed a constant 50 in every company because `GET /api/companies/:companyId/live-runs` was padding its response with up to 50 recent (non-live) heartbeat runs whenever the caller did not pass `minCount`. - Regression introduced by [#4875](https://github.com/paperclipai/paperclip/pull/4875) (commit `6445bef9`), which capped both `minCount` and `limit` at 50 with a fallback of 50 for omitted values. The cap is correct for `limit` (real unboundedness guard); for `minCount` it conflates "no padding" with "pad to the cap". - Default `minCount` to 0 so callers asking for "live runs" only get actually-live runs unless they explicitly request padding (`ActiveAgentsPanel` is the only caller that does). Keep `limit` capped at 50 by default. ## Test plan - [x] `pnpm exec vitest run server/src/__tests__/agent-live-run-routes.test.ts` — 7/7 pass, including new tests for the no-pad default and explicit padding. - [x] `pnpm exec vitest run ui/src/components/Sidebar.test.tsx ui/src/components/ActiveAgentsPanel.test.tsx ui/src/api/heartbeats.test.ts` — 6/6 pass. - [ ] Verify in dev: with ~8 truly-live runs in a company, the sidebar Dashboard badge shows the real count (not 50). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Paperclip <noreply@paperclip.ing> |
||
|---|---|---|
| .. | ||
| access.ts | ||
| activity.ts | ||
| adapters.ts | ||
| agents.ts | ||
| approvals.ts | ||
| assets.ts | ||
| auth.ts | ||
| authz.ts | ||
| companies.ts | ||
| company-skills.ts | ||
| costs.ts | ||
| dashboard.ts | ||
| environment-selection.ts | ||
| environments.ts | ||
| execution-workspaces.ts | ||
| goals.ts | ||
| health.ts | ||
| inbox-dismissals.ts | ||
| index.ts | ||
| instance-database-backups.ts | ||
| instance-settings.ts | ||
| issue-tree-control.ts | ||
| issues-checkout-wakeup.ts | ||
| issues.ts | ||
| llms.ts | ||
| org-chart-svg.ts | ||
| plugin-ui-static.ts | ||
| plugins.ts | ||
| projects.ts | ||
| routines.ts | ||
| secrets.ts | ||
| sidebar-badges.ts | ||
| sidebar-preferences.ts | ||
| user-profiles.ts | ||
| workspace-command-authz.ts | ||
| workspace-runtime-service-authz.ts | ||