Files
PaperClipAI/ui
DottaandPaperclip a30541b793 fix(ui): fade out task status update caret unless hovered (#23402)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - On a task page, the activity thread shows status update rows such as
"Ran commands, searched files" and their expanded activity rows.
> - In `TaskChatRunnerActivityGroup`, the disclosure caret on the right
edge stays at full opacity even when the user does not hover over the
row.
> - Other collapsible rows in the task thread (`TaskChatThinking`,
`TaskChatProtocolActivityRow`) hide their disclosure carets at rest
while preserving touch-device discoverability
(`tc-hover-disclosure-caret`) and keeping expanded carets legible
(`rotate-90 opacity-80`).
> - This pull request fades out the right-side caret on runner activity
phase toggles, folded read runs, and expandable activity rows unless
hovered, keyboard-focused, or expanded, while sharing the repository's
`.tc-hover-disclosure-caret` touch fallback.
> - The benefit is a calmer task thread with no layout shift on hover,
full keyboard accessibility, and consistent disclosure behavior across
all task-chat rows.

## Linked Issues or Issue Description

**What existing behavior does this improve?**

The disclosure carets on the right side of task status update rows in
`TaskChatRunnerActivityGroup` on the task page.

**Subsystem affected**

ui/ — React + Vite board UI

**Current behavior**

Activity status update rows such as "Ran commands, searched files",
folded file-read rows, and expandable activity rows keep their
right-side chevron caret visible at full opacity at rest.

**Proposed behavior**

When collapsed and not hovered, the right-side caret stays faded out
(`opacity-0`). It fades in smoothly with the shared motion tokens
(`--motion-duration-fast` and `--motion-ease-standard`) on row hover or
keyboard `focus-visible`, and fades back out when hover or focus ends.
While a row is expanded, the caret stays visible (`rotate-90
opacity-80`, brightening to `opacity-100` on hover/focus). All three
carets include the shared `.tc-hover-disclosure-caret` class so
touch-only devices (`@media (hover: none)`) keep the disclosure
affordance discoverable.

**Reason and benefit**

Hiding the right-side caret at rest removes visual noise across activity
updates in the task thread and aligns `TaskChatRunnerActivityGroup` with
the existing hover-disclosure pattern in `TaskChatThinking`,
`TaskChatProtocolActivityRow`, and `ui/src/index.css` (related: #12640,
#15048). Using opacity instead of unmounting keeps row alignment stable
on hover.

**Breaking changes**

None.

## What Changed

- Extract a shared `DISCLOSURE_CARET_CLASS` constant in
`ui/src/components/task-chat/TaskChatRunnerActivityGroup.tsx` including
`tc-hover-disclosure-caret` and the shared motion tokens
(`--motion-duration-fast`, `--motion-ease-standard`,
`motion-reduce:transition-none`).
- Add named group hooks (`group/activity-phase`, `group/read-run`,
`group/activity-row`) to the three disclosure buttons in
`TaskChatRunnerActivityGroup.tsx`.
- Fade out each right-side `ChevronRight` caret at rest (`opacity-0`),
reveal it on hover or keyboard focus (`group-hover/...:opacity-100`,
`group-focus-visible/...:opacity-100`), and keep it visible while open
(`rotate-90 opacity-80`).
- Add unit tests in
`ui/src/components/task-chat/TaskChatRunnerActivityGroup.test.tsx`
covering completed summaries, active toggles, folded read runs, expanded
activity rows, open/close state transitions, and
`tc-hover-disclosure-caret`.

## Verification

- Local focused Vitest on `0b46f7cf99`: `node
node_modules/vitest/vitest.mjs run
ui/src/components/task-chat/TaskChatRunnerActivityGroup.test.tsx
ui/src/components/task-chat/antigravity-thread.test.tsx
ui/src/components/task-chat/completed-activity-summary.test.ts` — 36/36
tests passed.
- Local focused Vitest on `0b46f7cf99`: `node
node_modules/vitest/vitest.mjs run
ui/src/components/TaskChatThread.test.tsx` — 436 passed, 1 skipped.
- Local token gates on `0b46f7cf99`: `pnpm check:token-gates` — all 4
token gates clean.
- Local UI build on `0b46f7cf99`: `pnpm --filter @paperclipai/ui build`
— built cleanly and verified compiled CSS emits `@media
(hover:none){.tc-hover-disclosure-caret{opacity:1}}` and scoped
`group-hover/*:opacity-100` rules.
- GitHub Actions CI on `0b46f7cf99` ([run
46734780674](https://github.com/paperclipai/paperclip/actions/runs/46734780674)):
all 30 checks passed (`ci / verify`, `ci / Build`, `ci / Typecheck +
Release Registry`, `ci / General tests`, `ci / policy`, all 16 `ci /
e2e` shards, `commitperclip PR Review`, `Socket Security`, `Superagent
Security`, and `security/snyk`).
- Automated reviews on `0b46f7cf99`: `ponytail-paperclip-review` (5/5,
ship), `feynman-nuclear-review` (5/5), and `Greptile Review` (5/5; P2
note about `tc-hover-disclosure-caret` answered and resolved in-thread).

## Risks

- Low risk. Only the opacity, rotation, and transition classes on the
right-side disclosure carets change; click, expand/collapse, keyboard,
and touch-device discoverability semantics stay intact.

> This is a small UI polish change and does not overlap with planned
core features in `ROADMAP.md`.

## Model Used

- Google DeepMind Antigravity coding agent (Gemini model with
reasoning/thinking mode, file editing, shell execution, and GitHub CLI
tools; exact model ID and context window are not exposed by the runner
environment).

## 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
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented risks above
- [x] All Paperclip CI gates are green
- [x] 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: Paperclip <noreply@paperclip.ing>
2026-12-03 21:18:38 -06:00
..
…

@paperclipai/ui

Published static assets for the Paperclip board UI.

What gets published

The npm package contains the production build under dist/. It does not ship the UI source tree or workspace-only dependencies.

Storybook

Storybook config, stories, and fixtures live under ui/storybook/.

pnpm --filter @paperclipai/ui storybook
pnpm --filter @paperclipai/ui build-storybook

Typical use

Install the package, then serve or copy the built files from node_modules/@paperclipai/ui/dist.

Editor dependency identity

Keep the root and workspace overrides for @codemirror/state, @codemirror/view, and @lezer/common aligned. CodeMirror requires shared extension identity, while Lezer parsers and syntax highlighters require shared NodeProp IDs. Multiple Lezer copies can crash code-block highlighting with tags is not iterable. src/lib/codemirror-single-instance.test.ts checks the installed dependency graph and highlights sample code through the editor's real language dependencies. GitHub Actions owns regeneration of pnpm-lock.yaml.