Commit Graph

1 Commits

Author SHA1 Message Date
Dotta f42a66bf04
test: port pipelines tutorial e2e (#9149)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - Pipelines are a control-plane workflow surface where operators need
confidence that setup, intake, board movement, review, and learning
flows keep working.
> - The tutorial flow is broad enough that regressions can slip through
unit tests when UI state, route behavior, and workflow fixtures drift
apart.
> - End-to-end coverage gives reviewers a realistic smoke path through
the pipelines tutorial experience.
> - This pull request ports the pipelines tutorial flow into Playwright
and updates the variable flow covered by the scenario.
> - The benefit is stronger browser-level regression coverage for a
high-value onboarding/workflow path.

## Linked Issues or Issue Description

No public GitHub issue exists. Inline feature request:

**Subsystem affected**

Cross-cutting: `tests/e2e`, server startup, and the pipelines UI
workflow.

**Problem or motivation**

The pipelines tutorial flow lacked focused browser-level regression
coverage for setup, intake, board movement, detail/review surfaces, and
learning flow behavior. This left a broad user-facing workflow dependent
on narrower unit coverage.

**Proposed solution**

Add a Playwright spec that boots a throwaway Paperclip instance and
exercises the tutorial flow across setup, intake, board movement, item
detail, review queue, learnings, agent fan-out, drift acknowledgement
gates, child-terminal gates, and stale approvals.

**Alternatives considered**

Unit tests alone are faster but do not validate the integrated browser
workflow. A release-smoke-only path would be broader than necessary for
this tutorial-specific coverage.

**Roadmap alignment**

This supports the roadmap theme of easier onboarding and stronger
first-run confidence without adding a new core feature surface.

**Additional context**

The local host used for this PR is missing Chromium’s `libatk-1.0.so.0`
dependency, so the full browser run needs CI or a machine with
Playwright system dependencies installed.

## What Changed

- Added a Playwright e2e spec covering the pipelines tutorial flow.
- Covered agent fan-out, drift acknowledgement gates, child-terminal
gates, stale approvals, setup/intake, board movement, item detail,
review queue, and learnings.
- Added Playwright config support needed by the new tutorial flow.
- Updated the tutorial variable flow assertions in the ported spec.

## Verification

- Attempted
`/srv/paperclip/home/paperclipai/paperclip/node_modules/.bin/playwright
test --config tests/e2e/playwright.config.ts
tests/e2e/pipelines-tutorial-flow.spec.ts`
- Local result: the throwaway Paperclip server booted and `covers agent
fan-out, drift acknowledgement gates, child-terminal gates, and stale
approvals` passed.
- Local blocker: the second Chromium test failed before executing
because this host is missing the Playwright system library
`libatk-1.0.so.0`. CI should run this on an image with browser
dependencies installed.

## Risks

Medium risk for CI duration/flakiness because this adds browser-level
coverage over a broad workflow. The test is intentionally scoped to one
spec file and uses the dedicated e2e config/server path.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

OpenAI Codex, GPT-5.5 coding agent with repository tool use and local
shell execution. Context window was not surfaced by the runtime.

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

---------

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-07-07 05:54:26 -05:00