Files
PaperClipAI/doc
Devin FoleyandPaperclip 63e6e56407 fix(onboarding): disable unsupported browser sign-in (#22695)
## Thinking Path

> - Paperclip lets people manage AI agents and connect their AI
accounts.
> - Onboarding connects the first agent to a provider account.
> - Some execution environments cannot start browser sign-in.
> - The wizard showed this limitation but left Connect enabled.
> - This pull request uses that same state to block Connect and keyboard
submission.
> - Users get a clear reason and can go back to use an API key or
another model.

## Linked Issues or Issue Description

**What happened?**

Onboarding showed that browser sign-in was unsupported. Connect remained
enabled when no saved subscription was available. Repeated clicks could
test a connection that the user could not establish.

**Expected behavior**

Disable Connect and keyboard submission while browser sign-in is
unsupported and no saved subscription is available. Show the reason.
Keep saved subscriptions and API-key connections usable.

**Steps to reproduce**

1. Open the onboarding Connect step in an environment without browser
sign-in support.
2. Select Claude or OpenAI with subscription authentication and no saved
subscription.
3. Observe the unsupported sign-in notice and press Connect or
Cmd/Ctrl+Enter.

**Paperclip version or commit**

Reproduced in component tests on master at
`8ce422e45d0c47ede1c8ea905575b93879c1854b`.

**Deployment mode**

Authenticated setup with a sandbox provider that reports
`supportsLoginPty: false`. Tests use the real wizard with simulated API
responses.

Related: #19336 fixes shared sign-in actions and retry behavior. #17615
addresses a platform-specific login transport error. This change guards
the onboarding submission action when browser sign-in is unavailable.

## What Changed

- Use one unsupported sign-in state for the notice and the Connect
submission guard.
- Block mouse and keyboard submission before connection testing or
hiring.
- Keep saved subscriptions and API-key authentication available.
- Add regressions for Claude, Codex, saved subscriptions, and returning
to API-key setup.
- Give existing hire tests usable authentication fixtures and document
the behavior.

## Verification

- Baseline on unchanged master: both unsupported-sign-in regressions
fail because Connect is enabled. Both alternate-authentication tests
pass.
- Patched focused run: 4 tests pass with `pnpm exec vitest run
ui/src/components/OnboardingWizard.test.tsx -t 'browser sign-in is
unsupported'`.
- Full onboarding component group: 290 tests pass across the wizard,
step, adapter, and variant suites.
- `pnpm -r typecheck` passes for all workspace packages.
- `pnpm build` passes for all workspace packages.
- `pnpm test:run` stopped in the chat integration shard: 315 passed, 5
failed, 1,633 skipped, and one unhandled error. The failures include
`ENFILE: file table overflow` and SQLite database-open errors. The
server, packages, and test-runner sources match the base commit. The
focused rerun below passes; this full-suite attempt is still not a pass.
- Token gates and `git diff --check` pass.
- Focused chat-failure check: 67 tests pass, including all five
failures, without source changes. Command: `pnpm exec vitest run
server/src/__tests__/chat-channels.integration.test.ts -t 'retains HTTP
Retry under the endpoint authorization row lock|retries the newer saved
github request instead of the failed request after a budget hold'
--maxWorkers=1`. This establishes recovery in isolation, not completion
of the full local suite.
- CI attempt 1: [serialized server suites
(1/9)](https://github.com/paperclipai/paperclip/actions/runs/45265381027/job/138011142554),
[Runner Vitest package
(3/3)](https://github.com/paperclipai/paperclip/actions/runs/45265381027/job/138011141444),
[server tests
(7/12)](https://github.com/paperclipai/paperclip/actions/runs/45265381027/job/138011143258),
and [server tests
(9/12)](https://github.com/paperclipai/paperclip/actions/runs/45265381027/job/138011143086)
stopped after their runners received shutdown signals. The repository
runner-loss workflow retried these jobs once after the attempt
completed. The interrupted first-attempt jobs are not passes.
- [Automatic CI
recovery](https://github.com/paperclipai/paperclip/actions/runs/45268368345)
confirmed that all four failed jobs lost their runners and requested
their rerun. The initial aggregate `ci / verify` failed because a
dependency was cancelled. [CI attempt
2](https://github.com/paperclipai/paperclip/actions/runs/45265381027/attempts/2)
passed for `b92ea53b5322e2d32bf8235db96ce94087fffde4`. The current PR
has 58 successful checks, 3 skipped checks, no failures or pending
checks, and no merge conflicts.
- [Greptile
review](https://github.com/paperclipai/paperclip/pull/22695#issuecomment-7113951912):
5/5 on `b92ea53b5322e2d32bf8235db96ce94087fffde4`, with no actionable
issues.
- No live provider sign-in or browser acceptance is claimed.

## Risks

- The gate must keep saved credentials usable. Regression tests cover
saved subscriptions and API keys.
- Authentication and environment capability reads keep their existing
behavior. This change adds no API, schema, or deployment-policy changes.

## Model Used

- OpenAI `gpt-6.1-sol` through the Codex harness in T3 Code, with xhigh
reasoning effort, code execution, and tool use. The harness does not
expose the context-window size.

## 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: Paperclip <noreply@paperclip.ing>
2026-11-23 14:38:00 -08:00
..
…
…
…
…