paperclip/tests/e2e
Dotta e3eed3a3ae
Keep browser startup explicitly opt-in (#12435)
## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - The CLI can save a configuration and start the local server in one
command.
> - The onboarding path set a browser-open environment variable without
an explicit user request.
> - Headless test servers use the same onboarding path.
> - Each server restart could therefore open a system browser.
> - This pull request removes the implicit browser-open request and
fixes test servers to disable it explicitly.
> - The benefit is predictable foreground and test startup without
unsolicited browser windows.

## Linked Issues or Issue Description

This is stack 11 of 11. It depends on stack 10.

**What happened?**

`paperclipai onboard --yes --run` set `PAPERCLIP_OPEN_ON_LISTEN=true`.
Headless server users, including browser test runners, opened the system
browser on each server restart.

**Expected behavior**

Server startup must not open a browser unless the caller explicitly sets
`PAPERCLIP_OPEN_ON_LISTEN=true`.

**Steps to reproduce**

1. Run `paperclipai onboard --yes --run` from a clean source checkout.
2. Wait for the server to listen.
3. Observe that the default system browser opens.

**Paperclip version or commit**

Reproduced on `dbf052577` plus the dependent stack.

**Deployment mode**

Local dev from source.

## What Changed

- Stop onboarding from setting `PAPERCLIP_OPEN_ON_LISTEN=true` for
foreground startup.
- Set `PAPERCLIP_OPEN_ON_LISTEN=false` in E2E and issue-detail
performance test servers as defense in depth.
- Preserve the existing explicit environment opt-in in the server.

## Verification

- `pnpm exec vitest run cli/src/__tests__/onboard.test.ts` — 10 tests
passed.
- `pnpm --filter paperclipai typecheck` — passed.
- `pnpm -r typecheck` — passed on the stacked head.
- `pnpm build` — passed on the stacked head.
- Playwright was not run locally by request.

## Risks

- Low risk. The only behavior change removes an unsolicited side effect.
- A caller that wants browser startup can still set
`PAPERCLIP_OPEN_ON_LISTEN=true` explicitly.
- No database or migration change exists in this layer.

> 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. The exact deployment suffix and context window
are not exposed. The model used reasoning, repository tools, code
execution, Git, and GitHub API access.

## 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
2026-08-29 12:08:35 -05:00
..
helpers
app-not-connected.spec.ts feat(apps): add connection intent setup experience (#12347) 2026-08-29 12:08:35 -05:00
application-delete-screenshot.spec.ts feat(apps): add connection intent setup experience (#12347) 2026-08-29 12:08:35 -05:00
applications-crud.spec.ts feat(apps): add connection intent setup experience (#12347) 2026-08-29 12:08:35 -05:00
apps-dark-mode-shots.spec.ts feat(apps): add connection intent setup experience (#12347) 2026-08-29 12:08:35 -05:00
apps-prosumer-mcp-flow.spec.ts feat(apps): add connection intent setup experience (#12347) 2026-08-29 12:08:35 -05:00
archived-company-url.spec.ts
conference-room-typing-intro.spec.ts copy: unify user-facing "company" wording to "organization" (#12243) 2026-08-27 01:04:55 -07:00
connection-intents.spec.ts feat(apps): add connection intent setup experience (#12347) 2026-08-29 12:08:35 -05:00
fetch-allowed-port.ts
mcp-user-stories.catalog.ts
mcp-user-stories.spec.ts feat(apps): add connection grants and delegated identities (#12341) 2026-08-29 12:08:33 -05:00
multi-user-authenticated.spec.ts
multi-user.spec.ts
nux-phase4-screenshots.spec.ts copy: unify user-facing "company" wording to "organization" (#12243) 2026-08-27 01:04:55 -07:00
onboarding.spec.ts feat(onboarding): sign in to an agent provider during onboarding (#12440) 2026-08-28 10:20:37 -07:00
pipelines-tutorial-flow.spec.ts
planning-mode-visual-verification.spec.ts copy: unify user-facing "company" wording to "organization" (#12243) 2026-08-27 01:04:55 -07:00
playwright-multiuser-authenticated.config.ts
playwright-multiuser.config.ts
playwright.config.ts Keep browser startup explicitly opt-in (#12435) 2026-08-29 12:08:35 -05:00
sidebar-takeover.spec.ts
signoff-policy.spec.ts
smoke-lab-browser-runner.mts
smoke-lab-routine-classifier.test.mts
smoke-lab-routine.mts
smoke-lab.catalog.ts
smoke-lab.spec.ts feat(sandbox): add the duplex bridge broker, gated transport selection, and fixed observability (#11769) 2026-08-22 09:01:31 -07:00