Files
PaperClipAI/ui/src/pages
TonioandClaude Fable 5.2 5ea8c99717 fix(ui): close the Plugins review follow-ups and add the Reviews page (#23005)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - The Plugins page is where a person connects tools to agents and
approves the actions that those tools request
> - #22869 turned Connectors into a Plugins marketplace. Three review
findings stayed open after the merge
> - The page also did not show clearly which account needs attention,
and the Reviews page was a plain queue
> - A person must see what waits for a decision and must be able to
leave a setup step
> - This pull request fixes the three findings, adds a review chip and a
Reviews page with decision cards, marks the account rows that need
attention, and adds a Close button to the chat connection purpose step
> - The benefit is a Plugins page that shows pending work, and
permission controls that do not accept changes on stale data

## Linked Issues or Issue Description

Refs #22869

**What existing behavior does this improve?**

The Plugins marketplace pages under `ui/src/pages/apps`: the plugin
page, the header, the Reviews page, and the chat connection setup.

**Subsystem affected**

UI, Plugins (Apps catalog) pages.

**Current behavior**

- After a failed refresh of the permissions, the menus stay enabled and
work on stale data.
- The plugin page shows a different category from Browse for Composio
and Arcade apps.
- Browse classifies each plugin one time for each category on each
render.
- A chat connection that needs attention shows only text in its row.
- The header shows a count only. The Reviews page shows a plain queue.
- The "Choose how to connect" step has no control to leave the flow.

**Proposed behavior**

- After a failed refresh, the actions stay visible, the menus are
disabled, and a status line offers "Try again".
- The plugin page uses the same category as Browse.
- Browse classifies each plugin one time for each render.
- A chat connection row that needs attention shows a small warning glyph
with a text alternative.
- The header shows the logos of the plugins with pending requests
(maximum four), an "N to review" chip, and a chevron. It opens the
Reviews page.
- The Reviews page shows a back button, a title, a count sentence, and
one decision card for each request with "Decline" and "Allow once".
- The "Choose how to connect" step has a Close button that returns to
Plugins.

**Reason and benefit**

A person sees what waits for a decision and where. Permission changes do
not run on stale data. The render cost of Browse does not grow with the
number of categories.

**Breaking changes**

None. The default layout of the review queue on the app detail page does
not change.

## What Changed

- `plugin-categories.ts`: add `groupPluginsByCategory`, a single pass
that classifies each row one time. `Browse.tsx` uses it.
- `Browse.tsx`: the plugin page reads its category label from the same
function as Browse. Chat connection rows show a warning glyph when
`chatEndpointAttention` returns a reason.
- `PluginPermissions.tsx`: `staleReads` finds the reads with an error.
The menus are disabled while a read is stale, and a status line with
"Try again" refetches the stale queries.
- `useReviewCount.ts`: add `useReviewQueue`, which returns the count and
the application names from the same query.
- `PluginsHeader.tsx`: the review button shows stacked plugin logos, the
count chip, and a chevron.
- `AppsReview.tsx` and `ReviewQueueCard.tsx`: the Reviews page has a
header and a `decisions` layout that reuses the coordinator decision
card parts.
- `ChatEndpointSetup.tsx`: `ChatConnectionPurpose` accepts `onClose` and
shows a Close button.
- `Browse.tsx`, `PluginMarketplace.tsx`, `AssistantConnection.tsx`: the
Installed tab shows the same tiles as the rest of the page. The account
rows stay on the plugin page. Assistant Connection (MCP) has a tile of
its own.
- `ReviewQueueCard.tsx` (review fixes): linked requests use the compact
decision presentation of the interaction card, the fallback card is
masked as a whole, and the agents list is indexed by id one time.
- Specs: `connection-reviews` reads the "Deny" label. `agentmail`,
`ai-connections-app`, and `runner-e2e/connection-flow` open the plugin
page from an Installed tile.

## Verification

These checks ran on the change before the rebase onto current master.
The rebase did not touch `ui/src/pages/apps`.

- `cd ui && pnpm typecheck`: pass.
- `cd ui && npx vitest run src/pages/apps src/features/connections
src/lib/analytics`: 539 tests pass.
- `pnpm run check:token-gates`: pass.
- `node scripts/check-query-error-rendering.mjs`: 0 findings.
- Playwright specs `connection-reviews`, `plugins-browse`, and
`one-click-connect`: 7 tests pass.
- Manual check in a browser with four sample requests: the header chip
and the Reviews page render the logos, the count, and the cards.
- After the Installed tiles change: 478 unit tests in `src/pages/apps`,
`src/lib/analytics`, and the deep-link routing test pass. The
`agentmail`, `plugins-browse`, and `one-click-connect` Playwright specs
pass. A manual check in a browser shows the tiles on the Installed tab.

Not run or not seen:

- The full UI Vitest suite and the Storybook build did not run locally.
CI supplies that coverage.
- The Close button and the row warning glyph were not seen in a browser.
Unit tests cover them.
- The decision card layout has no unit test of its own.
- The stale-permissions state is tested through the `staleReads` helper
only.
- The edits to `tests/ai-connections-app/app.spec.ts` and
`tests/runner-e2e/connection-flow.ts` did not run locally.

## Risks

Low risk. The change is UI only, with no schema or API change.

- The decision cards say "Decline", and the "Always allow" action is in
a menu. This differs from the design exploration, because the product
has no snooze and requests carry no written summary.
- The review chip counts pending requests only. It does not count
accounts that need attention.
- The Installed tab no longer lists account rows. A person opens the
plugin page to manage an account or to set a default model account. The
"Manage connectors" link on an agent opens the Installed tab.
- On an instance without the assistant connection route, the Assistant
Connection tile shows the attention mark.

## Model Used

Claude Fable 5.2 (`claude-fable-5-2`) in Claude Code, with tool use,
code execution, and extended thinking.

## 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)
- [ ] 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
- [ ] 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
- [ ] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-26 02:23:18 +00:00
..
…
…
…
…