paperclip/docs
Dotta 43b0f2ae58
Add pause and resume actions to sidebar agents (#4616)
## Thinking Path

> - Paperclip operators need fast control over the agents running their
company.
> - The sidebar is the persistent place operators scan agent state while
navigating the board UI.
> - Agent pause and resume already exist as control-plane actions, but
sidebar users had to navigate away to use them.
> - This pull request adds a compact per-agent action menu in the
sidebar.
> - It keeps edit, pause, and resume close to the visible agent list
while preserving existing navigation behavior.
> - The benefit is faster operator intervention when an agent needs to
be paused or restarted.

## What Changed

- Refactored sidebar agent rows into a small item component with a
hover/focus action menu.
- Added edit, pause, and resume actions using existing agent API calls
and cache invalidation keys.
- Added success/error toasts for pause and resume mutations.
- Tracked pause/resume pending state per agent so one active mutation
does not disable every sidebar row.
- Disabled direct sidebar resume for budget-paused agents and labeled
that state clearly.
- Added jsdom coverage for active-agent pause, paused-agent resume,
per-agent pending state, and budget-paused resume protection.
- Added visual review artifacts for the default row and opened action
menu:
  - [Sidebar row](docs/pr-screenshots/pr-4616/sidebar-agent-row.png)
- [Sidebar action
menu](docs/pr-screenshots/pr-4616/sidebar-agent-actions.png)

## Verification

- `pnpm exec vitest run ui/src/components/SidebarAgents.test.tsx`
- `pnpm --filter @paperclipai/server prepare:ui-dist`
- Browser screenshot pass against a temporary local trusted instance at
`http://127.0.0.1:3102` using Playwright.

## Risks

- Low risk: UI-only addition using existing agent pause/resume
endpoints. The main risk is layout crowding for very narrow sidebars,
mitigated by the icon-only trigger and existing truncation.
- Budget-paused agents now require a non-sidebar path to resume, which
is intentional to avoid accidentally restarting agents stopped by budget
enforcement.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

- OpenAI Codex coding agent based on GPT-5, tool-enabled local
repository and shell/browser access, Paperclip heartbeat context.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] If this change affects the UI, I have included before/after
screenshots
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [x] I will address all Greptile and reviewer comments before
requesting merge

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-04-27 20:03:54 -05:00
..
adapters feat(adapters): add capability flags to ServerAdapterModule (#3540) 2026-04-15 07:10:52 -05:00
api [codex] Add structured issue-thread interactions (#4244) 2026-04-21 20:15:11 -05:00
cli Introduce bind presets for deployment setup 2026-04-11 07:09:07 -05:00
companies Add routine support to recurring task portability 2026-03-23 16:57:38 -05:00
deploy docs: AWS ECS Fargate deployment runbook (#3897) 2026-04-27 08:41:47 -05:00
guides [codex] Harden recovery issue handling (#4600) 2026-04-27 15:02:47 -05:00
images fix: restore docs deleted in v0.2.3 release, add Paperclip branding 2026-03-03 15:49:43 -06:00
plans feat(issues): add issue documents and inline editing 2026-03-13 21:30:48 -05:00
pr-screenshots/pr-4616 Add pause and resume actions to sidebar agents (#4616) 2026-04-27 20:03:54 -05:00
specs Add company import export v2 plan 2026-03-13 21:10:45 -05:00
start [codex] Harden recovery issue handling (#4600) 2026-04-27 15:02:47 -05:00
agents-runtime.md [codex] Add run liveness continuations (#4083) 2026-04-20 06:01:49 -05:00
docs.json feat: implement multi-user access and invite flows (#3784) 2026-04-17 09:44:19 -05:00
favicon.svg fix: restore docs deleted in v0.2.3 release, add Paperclip branding 2026-03-03 15:49:43 -06:00
feedback-voting.md Restore feedback trace export fixes 2026-04-03 15:59:42 -05:00