mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-20 09:50:48 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - The QA Cloud product journeys check real user paths on a hosted test stack > - #19360 (2026-11-05) made the Coordinator workspace standard; its task side panel starts with no tabs, and the header control opens a tab chooser > - The journeys were written for the classic panel, which opened straight on Properties, and for older inbox and plan controls > - On QA the smoke suite passed 8 of 24 journeys; 13 failures trace to these out-of-date journey steps > - This pull request updates the journeys to use the shipped Coordinator controls the way a person does > - The benefit is that the QA journeys test the product again instead of failing on removed controls ## Linked Issues or Issue Description **What happened?** The QA staging smoke suite passed 8 of 24 journeys. 13 failures come from journey steps that target the classic UI: - Task side panel: the journeys click "Show properties" and expect property rows. In Coordinator the click opens a tab chooser ("Open a side panel tab"), and the user picks Properties or Artifacts. The product's own e2e tests (`tests/e2e/artifact-tab-arrival.spec.ts`, `artifact-uploads.spec.ts`, `disconnect-resilience.spec.ts`) and the chat-catalog runtime cases already use the chooser. - Inbox: desktop Coordinator inbox rows show unread state as a bold title and have no per-row "Mark as read" button (`doc/plans/2026-11-06-chat-contacts-pins.md`). The `r` shortcut marks the hovered row read on the Mine view. - Plan: the Coordinator Plan chip is named "Open Plan revision N in task sidebar", not "Open Plan revision N". **Steps to reproduce** 1. Run `pnpm test:e2e:runner -- --target-config <managed local config>` with task-properties, task-edit-lifecycle, task-document-persistence and project-task-context. 2. See 0/4 pass on master; each stops at the tab chooser. **Expected behavior** The journeys reach the same saved-state checks as before through the shipped controls. ## What Changed - New `product-journeys/task-panel.ts` helper: opens the side panel and selects a tab (Properties or Artifacts) from the chooser, an open tab, or the "Open a new tab" button. It waits for the page instead of a single non-waiting visibility check, and does not close an already open panel. - task-properties, task-edit-lifecycle, task-dependency-resume, project-task-context and task-document-persistence (and routine/agent journeys that reuse `openDocumentAuthoring`) use the helper. task-properties reopens the panel after reload before it checks "You". - inbox-triage: when the row has no visible "Mark as read" button, open the Mine view, blur search, hover the row and press `r` (as `tests/e2e/coordinator-inbox-views.spec.ts` does). - Plan journey: `planPreviewLabel()` accepts the optional " in task sidebar" suffix and still requires the exact revision. - No product code changes. An earlier revision of this PR changed "Show properties" to select Properties; it is reverted because the product e2e suite asserts the chooser is the intended design. All saved-state assertions are unchanged: assignment, labels, status, documents, read state and plan revision are still read back through the API, so a broken feature still fails. ## Verification - Real browser journeys on a managed local instance against unmodified master UI: 4/4 pass (task-edit-lifecycle, task-properties, task-document-persistence, project-task-context); 0/4 before. - Inbox fallback checked by hand on a local instance: an unread task on the Mine view became `isUnreadForMe=false` after blur + hover + `r`. - `tests/runner-e2e` unit tests for product-journeys and plan-revision: 47 files, 1240 tests pass. The task-properties contract test now models the chooser and asserts the opener and the Properties option are used before assignment and after reload. New `planPreviewLabel` test covers revision 12 vs 1 and a missing revision. - QA Cloud rerun follows once the QA harness pin moves to a master commit that contains this change. ## Risks - Low risk: test code only. If the chooser changes again, the helper fails visibly at the panel step. ## Model Used - Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use and code 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 - [ ] 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 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
2.7 KiB
TypeScript
48 lines
2.7 KiB
TypeScript
import { expect, type Page } from "@playwright/test";
|
|
import { showPropertyRow } from "./task-panel.js";
|
|
import { JourneyError } from "./types.js";
|
|
|
|
type BrowserStage = "project_list" | "project_open" | "project_task_open" | "project_property";
|
|
async function browserStep<T>(stage: BrowserStage, action: () => Promise<T>): Promise<T> {
|
|
try { return await action(); }
|
|
catch (error) {
|
|
if (error instanceof JourneyError) throw error;
|
|
// Playwright errors can contain page content. Retain only the closed stage.
|
|
throw new JourneyError("failed", `project_context_${stage}_failed`);
|
|
}
|
|
}
|
|
|
|
export async function reopenProjectThroughList(input: { page: Page; origin: string; issuePrefix: string; projectName: string; projectRef: string }) {
|
|
const { page, origin, issuePrefix, projectName, projectRef } = input;
|
|
await browserStep("project_list", () => page.goto(`${origin}/${issuePrefix}/projects`));
|
|
await browserStep("project_open", async () => {
|
|
const link = page.locator("main#main-content").getByRole("link").filter({ hasText: projectName });
|
|
await expect(link).toHaveCount(1);
|
|
await link.click();
|
|
const expected = `${origin}/${issuePrefix}/projects/${encodeURIComponent(projectRef)}/issues`;
|
|
await expect.poll(() => { const url = new URL(page.url()); return `${url.origin}${url.pathname}`; }).toBe(expected);
|
|
await page.reload();
|
|
await expect(page.locator("main#main-content").getByRole("heading", { name: projectName, exact: true })).toBeVisible();
|
|
});
|
|
}
|
|
|
|
export async function openProjectTaskThroughList(input: { page: Page; origin: string; issuePrefix: string; projectName: string; taskTitle: string; taskRef: string; prompt: string }) {
|
|
const { page, origin, issuePrefix, projectName, taskTitle, taskRef, prompt } = input;
|
|
await browserStep("project_task_open", async () => {
|
|
const link = page.locator("main#main-content").getByRole("link").filter({ hasText: taskTitle });
|
|
await expect(link).toHaveCount(1);
|
|
await link.click();
|
|
const expected = `${origin}/${issuePrefix}/issues/${encodeURIComponent(taskRef)}`;
|
|
await expect.poll(() => { const url = new URL(page.url()); return `${url.origin}${url.pathname}`; }).toBe(expected);
|
|
await page.reload();
|
|
const main = page.locator("main#main-content");
|
|
await expect(main.getByText(taskTitle, { exact: true }).filter({ visible: true }).first()).toBeVisible();
|
|
await expect(main.getByText(prompt, { exact: true }).filter({ visible: true }).first()).toBeVisible();
|
|
});
|
|
await browserStep("project_property", async () => {
|
|
const projectProperty = await showPropertyRow(page, "Project");
|
|
await expect(projectProperty).toHaveCount(1);
|
|
await expect(projectProperty.locator("[data-property-value]")).toContainText(projectName);
|
|
});
|
|
}
|