Pin Plugins by default in workspace navigation (#23578)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - People browse available integrations on the Plugins page.
> - A fresh Coordinator sidebar puts that page inside More.
> - People who look in Settings can miss it.
> - This pull request pins Plugins until a person chooses their own
layout.

## Linked Issues or Issue Description

**What existing behavior does this improve?**

Finding the Plugins catalog on a first visit to the Coordinator
workspace.

**Current behavior**

Open a workspace in a fresh browser profile. The sidebar shows Inbox
followed by More. Open More to find Plugins.

**Proposed behavior**

Show Plugins below Inbox on the first visit. Honor saved pins and their
order, including an empty list.

Related discussion about navigation for individual plugin pages: #21807.

## What Changed

- Use the Plugins route as the default when the signed-in user has no
saved pin list in this browser.
- Add a browser regression for unpinning and re-pinning across reloads.
Update the AgentMail browser journey to use the visible Plugins link.
- Document the default and how to change it.

## Verification

- `pnpm exec vitest run ui/src/hooks/usePinnedNavigation.test.tsx`
passed.
- `pnpm exec playwright test -c tests/e2e/playwright.config.ts
tests/e2e/plugins-browse.spec.ts tests/e2e/agentmail.spec.ts` passed all
four Chromium tests against the built app and a disposable database.
- Compared the parent and feature commits in fresh Chromium sessions.
Confirmed the pin control in More and the unpin and reorder controls on
the pinned row.

## Risks

An existing user who has never saved pins in this browser also receives
the new default. A saved empty list keeps the sidebar empty of pins.

## Model Used

OpenAI GPT-6 (Codex), with repository editing and Chromium test
execution.

## 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 any 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: Scott Tong <scott@scotts-mbp-m5-max.local>
This commit is contained in:
scotttongandScott Tong authored and GitHub committed 2026-12-02 18:30:20 -08:00
1 parent a93d971eed
commit 8379dedd93
4 files changed
+32 -3

No files matched your search

+2
View File
@@ -126,6 +126,8 @@ completed tasks remain eligible. Opening a recent task moves its row to the top
of Recents. of Recents.
Standard Recents also shows recent chats and projects. Standard Recents also shows recent chats and projects.
The Coordinator sidebar pins **Plugins** above **More** by default. Users can
unpin it there and pin it again from **More**. The browser remembers their choice.
Coordinator Recents lets you pin tasks, agent chats, and projects above More. Coordinator Recents lets you pin tasks, agent chats, and projects above More.
The pin button appears on the current row or when a row is hovered or focused The pin button appears on the current row or when a row is hovered or focused
with the keyboard. Shortcuts share the saved order with pinned pages and stay with the keyboard. Shortcuts share the saved order with pinned pages and stay
+1 -2
View File
@@ -260,8 +260,7 @@ test("AgentMail setup and email work through the normal task conversation", asyn
await expect(page.getByText("Internal server error", { exact: true })).toHaveCount(0); await expect(page.getByText("Internal server error", { exact: true })).toHaveCount(0);
await expect(page.getByRole("heading", { name: "Your agent’s email is ready" })).toHaveCount(0); await expect(page.getByRole("heading", { name: "Your agent’s email is ready" })).toHaveCount(0);
await page.screenshot({ path: test.info().outputPath("agentmail-permission-denied.png"), fullPage: true }); await page.screenshot({ path: test.info().outputPath("agentmail-permission-denied.png"), fullPage: true });
await page.getByRole("button", { name: "More workspace pages", exact: true }).click(); await page.getByRole("navigation", { name: "Workspace navigation" }).getByRole("link", { name: "Plugins", exact: true }).click();
await page.getByRole("link", { name: "Plugins", exact: true }).click();
// Installed lists plugins as tiles; account rows, including one waiting on setup, are on the plugin page. // Installed lists plugins as tiles; account rows, including one waiting on setup, are on the plugin page.
await page.getByRole("radio", { name: "Installed", exact: true }).click(); await page.getByRole("radio", { name: "Installed", exact: true }).click();
await page.locator('[data-app-slug="agentmail"] h3 button').click(); await page.locator('[data-app-slug="agentmail"] h3 button').click();
+27
View File
@@ -1,5 +1,32 @@
import { expect, test } from "@playwright/test"; import { expect, test } from "@playwright/test";
test("Plugins is pinned on first visit and remembers unpinning and re-pinning", async ({ page, request }) => {
const response = await request.post("/api/companies", { data: { name: `plugin pins ${Date.now()}` } });
expect(response.ok()).toBe(true);
const company = await response.json();
const navigation = page.getByRole("navigation", { name: "Workspace navigation" });
const plugins = navigation.getByRole("link", { name: "Plugins", exact: true });
try {
await page.goto(`/${company.issuePrefix}/issues`);
await expect(plugins).toBeVisible();
await expect(plugins).toHaveAttribute("href", `/${company.issuePrefix}/apps`);
await plugins.hover();
await navigation.getByRole("button", { name: "Unpin Plugins" }).click();
await expect(plugins).toHaveCount(0);
await page.reload();
await navigation.getByRole("button", { name: "More workspace pages" }).click();
const pin = page.getByRole("button", { name: "Pin Plugins", exact: true });
await expect(pin).toBeEnabled();
await expect(plugins).toHaveCount(0);
await pin.click();
await page.reload();
await expect(plugins).toBeVisible();
} finally {
await request.delete(`/api/companies/${company.id}`);
}
});
test("browse shows capped category blocks that open a full category page", async ({ page, request }) => { test("browse shows capped category blocks that open a full category page", async ({ page, request }) => {
const res = await request.post("/api/companies", { data: { name: `plugins browse ${Date.now()}` } }); const res = await request.post("/api/companies", { data: { name: `plugins browse ${Date.now()}` } });
expect(res.ok(), `create company failed ${res.status()}: ${await res.text()}`).toBe(true); expect(res.ok(), `create company failed ${res.status()}: ${await res.text()}`).toBe(true);
+2 -1
View File
@@ -6,9 +6,10 @@ export function projectPinKey(project: { companyId: string; id: string }) {
const UPDATED = "paperclip:pinned-navigation-updated"; const UPDATED = "paperclip:pinned-navigation-updated";
const EMPTY = "[]"; const EMPTY = "[]";
const DEFAULT_PINS = JSON.stringify(["/apps"]);
function read(key: string | null) { function read(key: string | null) {
try { return key ? localStorage.getItem(key) ?? EMPTY : EMPTY; } try { return key ? localStorage.getItem(key) ?? DEFAULT_PINS : EMPTY; }
catch { return EMPTY; } catch { return EMPTY; }
} }