mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-04 19:28:46 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Slack connections let people talk to their assigned agents. > - Setup saves a completed state after the connection is ready. > - A saved setup link can still open Success after completion. > - Done submits completion again, which the server rejects. > - This pull request opens settings when the Slack setup is already complete. > - Users can close the saved setup without changing the bot's lifecycle. ## Linked Issues or Issue Description **What happened?** Reopening a completed Slack setup shows Success. Done then shows “Couldn't finish setup: This connection is not waiting for a setup test.” The user stays in the wizard. **Expected behavior** Done opens the saved connection settings. A paused bot stays paused. A setup that is still awaiting completion must use the existing verification request. **Steps to reproduce** 1. Finish a Slack connection. 2. Reopen its saved chat/connect link with provider=slack and its resume parameter. 3. Click Done on Success. 4. Observe the completion error instead of the settings page. **Paperclip version or commit** Reproduced live on Coreda77c1bcfa. The handler is unchanged on this branch's base51d1d4ce07. Related: #18837 and #18722. Also inspected #15828; it changes required tests for other providers and explicitly excludes Slack. This fix covers reopening a completed Slack setup. ## What Changed - Done opens settings for a Slack setup whose saved step is complete. Both the provisioned Success view and manual Try view use the same action. Unfinished setups retain the existing completion request. - Add active and paused completion cases for managed, automatic and manual setup. Keep positive cases for unfinished setup. - Extend the managed and automatic browser journeys to reopen the saved link, reject duplicate completion requests, click Done, and reload settings. - Add completed-state previews and make the Slack fixture reject duplicate completion, as the real server does. Update the provider guide. Maps are unchanged. ## Verification - Six component regressions failed on the original handler because it submitted completion again. - All 38 wizard/clipboard component cases passed after the handler change. All 284 related chat UI tests across 19 files passed. The final fixtures add the required welcome-status field. - Repository typecheck and build passed. UI token gates and Storybook catalog checks passed (3076 stories; structural only). All 9 Slack browser cases passed in 1.5 minutes on Node 24, including completed-link exit and settings reload for managed and automatic setup. Their provider responses are mocked. Fresh deployed acceptance remains pending. Full CI [41734669956](https://github.com/paperclipai/paperclip/actions/runs/41734669956) passed on attempt 2 for exact head `4a3bf180929df57350389f45e4c6acfa822e8ddc`. Greptile and Ponytail both give this head 5/5 with no actionable findings. - Completed-state production previews passed for managed and automatic setup. These previews check the rendered state and Slack handoff; exact Done navigation is covered by the browser journeys. One preview text-locator wait timed out; fresh accessibility state and the saved image then showed Story status Pass with all three assertions passed. - CI attempt 1 lost its typecheck runner while unpacking the Rust dependency cache. Typechecking had not started. The log is retained. All test jobs passed in attempt 1; its verify summary failed only because typecheck had failed. The failed-only retry passed on the same commit. - The initial typecheck found two new fixtures missing welcomeStatus. Those fixtures were corrected; the failure log is retained. - The live returning-user attempt is preserved as failed. The Slack bot answered the fresh probe, but Done returned the error above. The original toast expired before its journey screenshot; a separate ordinary-UI reproduction captured the visible toast. This is not a live pass of the new fix. - The full local server Vitest suite was not repeated for this UI-only change. Full CI passed before merge. ## Risks The action uses the server-reported completed setup state to leave the wizard. It does not activate, unpause or repair a bot. Settings load the saved connection through the existing access checks. Unfinished setups still use server verification. API contracts, credentials and provider permissions do not change. Concurrent completion from another tab is unchanged: a stale test-step tab can still need a reload after a conflict. ## Model Used OpenAI Codex, GPT-6 family, with reasoning, repository editing, browser use and command execution. The runtime does not expose a more precise model ID or 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>