Keep the unselected In Progress status option still (#23008)

## Thinking Path

> - People use Paperclip to manage work with AI agents.
> - The task status picker shows the current status and the other
choices.
> - A spinning ring indicates a task is in progress.
> - The ring also spun when a task was in review and the user opened the
picker.
> - Keep that option still until the user selects In Progress.

## Linked Issues or Issue Description

**What happened?**

The In Progress option rotated while In Review was selected.

**Expected behavior**

Only an active In Progress status should rotate. Reduced motion should
keep the ring still.

**Steps to reproduce**

1. Open a task in review.
2. Open Change status with reduced motion turned off.
3. Watch the blue ring beside In Progress.

**Paperclip version or commit**

Reproduced at `e18fe61c8f`.

Related work includes the shared task glyph mapping in #19329 and the
empty Kanban column case in #15805.

## What Changed

- Apply the static animation class to the unselected In Progress menu
option.
- Add a regression test for the trigger and option with In Review and In
Progress selected.

## Verification

- Ran the focused component test. The inactive row failed on the
baseline. Both cases passed with the fix.
- Used Chromium on the task detail page. The inactive ring went from one
running CSS animation to zero. The selected option and trigger still
rotated with normal motion and stopped with reduced motion.
- Changed the task to In Progress and back to In Review. Both changes
persisted.
- Local affected UI checks had 3,938 passes and one skip. Three CLI
worktree tests failed while initializing embedded PostgreSQL on the
local host. The remaining 534 CLI tests passed.

## Risks

- The visual change is limited to the unused In Progress row in the
status picker. The test covers the selected row and the trigger.

## Model Used

- OpenAI Codex (GPT-6) with local code execution and browser
verification.

## 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 searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [ ] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

Co-authored-by: Scott Tong <1504818+scotttong@users.noreply.github.com>
This commit is contained in:
scotttongandScott Tong authored and GitHub committed 2026-11-26 00:41:10 +00:00
1 parent 17f9105a23
commit 8aface6cc3
2 files changed
+29 -1

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
// @vitest-environment jsdom
import { act } from "react";
import { createRoot } from "react-dom/client";
import { expect, it, vi } from "vitest";
import { StatusIcon } from "./StatusIcon";
it.each(["in_review", "in_progress"])("animates only the current in-progress glyph when picking a status from %s", async (status) => {
const host = document.body.appendChild(document.createElement("div"));
const root = createRoot(host);
try {
await act(async () => root.render(<StatusIcon status={status} onChange={vi.fn()} />));
const trigger = host.querySelector("button")!;
await act(async () => trigger.click());
const option = document.querySelector('[role="dialog"] svg[aria-label="In Progress"]');
expect(option).toBeTruthy();
const isInProgress = status === "in_progress";
expect(option!.classList.contains("motion-safe:animate-spin")).toBe(isInProgress);
expect(trigger.querySelector("svg")!.classList.contains("motion-safe:animate-spin")).toBe(isInProgress);
} finally {
await act(async () => root.unmount());
host.remove();
}
});
+5 -1
View File
@@ -101,7 +101,11 @@ export function StatusIcon({ status, displayStatus: presentationStatus, external
}}
>
{/* The current row is the task's state: draw it exactly like the trigger. */}
<StatusIcon {...(s === status ? presentation : { status: s })} size="lg" />
<StatusIcon
{...(s === status ? presentation : { status: s })}
size="lg"
className={s === "in_progress" && s !== status ? "motion-safe:animate-none" : undefined}
/>
{taskStatusLabel(s)}
</Button>
))}