mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 20:09:33 +01:00
9aaeae40bfd39b234a09659fb429cee5f46eb643
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
90bf446ad5 |
Guard release onboarding with scoped source E2E (#23432)
## Thinking Path > - Paperclip helps people manage work with AI agents. > - A release must pass onboarding before it reaches nightly. > - Onboarding changes already run source browser tests on PRs. > - The published release smoke used a separate scenario, which could drift from those tests. > - That drift blocked the December 1 nightly after onboarding succeeded. > - This PR fixes the stale welcome assertion and shares the scenario between release smoke and relevant PR E2E runs. ## Linked Issues or Issue Description Refs #23334 and #22259. **What happened?** [The December 1 nightly release](https://github.com/paperclipai/paperclip/actions/runs/46614290688) failed twice at `The onboarding chat must queue the lead's live welcome`. PR #23334 changed the welcome to a saved message and a question card. The greeting endpoint succeeded with `started: true` and `runId: null`, but the release test still required a model run. PR browser tests did not run those release expectations against the changed source. **Expected behavior** Onboarding PRs and changes to their shared dependencies must run the release scenario before merge. Known unrelated leaf-page changes and source-unit-test-only changes can omit the extra case. Shared and unfamiliar source paths must keep coverage. The scenario must check the lead's welcome and all three first-chat choices, with no model run before the user sends a choice or message. A mismatch must fail the required `ci / e2e` check. **Steps to reproduce** 1. Start the Docker onboarding harness with `PAPERCLIPAI_VERSION=2026.1130.0-canary.873300` and its provider verification mock. 2. Run the original release smoke test. 3. Observe successful login, setup, hire, and chat entry, followed by a timeout because the run list stays empty. **Paperclip version or commit** Failed release source: `7ce7d99f8af81ae90f97650ef7a8692a86c63a35`. Published package: `2026.1130.0-canary.873300`. **Deployment mode** The release test uses authenticated private Docker mode. The new PR test uses the existing disposable source E2E instance and provider verification fixture. ## What Changed - Check the saved welcome and the three visible choices, then require an empty agent run list. - Move the complete wizard, hire, and chat assertions into one shared onboarding scenario. Keep sign-in in the authenticated release wrapper. - Add the shared scenario to the normal PR E2E suite. Omit only this extra case when eligible source changes are confined to the Costs or Approvals UI page, source unit tests, and audited prose. Shared components, hooks, libraries, server code, mixed changes, and unfamiliar source paths keep it. The repository rules require `ci / e2e` before merge. - Pass the trusted CI change plan to shard selection and bind it to the checked-out commit. Reuse the existing lightweight source-diff eligibility gate for both Vitest and E2E, with the old Vitest export preserved. Full and shadow CI, broad or deleted inputs, invalid plans, and stale plans keep the case. No extra browser job or matrix is added. - Add release smoke files to the E2E and typecheck task inputs. Test that onboarding changes select E2E and that smoke-only changes select their two owners without forcing unrelated lanes. - Document the shared test command and the source and installation coverage. ## Verification The shared browser scenario is unchanged from `2044ada98e953504af68febe4c196f414d0bb1ae`. The selector review fix is based on master’s hosted-shard speed improvement. Selector and eligibility verification covers `236640e419d1177aafb64f3f7dd1ee49848ee707`. - Reproduced the original nightly timeout locally against the exact published canary. - The extracted release scenario passed against that canary in 22.1 seconds. - The new source E2E passed against PR source and the built UI in 32.3 seconds. - Restored the obsolete model-run assertion temporarily. The new source E2E failed with the same `Expected: > 0 / Received: 0` timeout. Restored the correct assertion. The final source confirmation passed in 31.7 seconds. - `node --test scripts/__tests__/e2e-shard.test.mjs .github/scripts/tests/ci-plan.test.mjs scripts/ci/test-selection-workflow.test.mjs`: all 52 tests passed after rebase. Coverage includes unrelated changes, relevant dependencies, rename paths, full/invalid/stale plans, exact CLI shard partitions, and both hosted shard policies. The unrelated-change and wiring tests failed before the filter was implemented. - Regression selection tests failed on `TaskChatComposer.tsx` and shadow mode before this review fix. They now keep the composer, new-agent runtime configuration, AI connection components, hooks, libraries, and mixed source changes. - The 3 existing source-diff eligibility contract tests passed after extraction into the shared module. - `actionlint .github/workflows/pr-trusted.yml` passed. - `node --test scripts/ci/test-selection-inputs.test.mjs`: 4 tests passed. - The Playwright program and focused source scenario typechecks passed. The test-budget check and `git diff --check` passed. - The default local source bootstrap could not load the macOS embedded PostgreSQL binary because its distribution lacked `libzstd.1.dylib`. Source browser verification used a separate disposable Docker PostgreSQL 16 instance. Linux CI will cover the normal embedded database path. - Earlier [hosted release smoke](https://github.com/paperclipai/paperclip/actions/runs/46776940022) passed both Docker onboarding and Linux background-service onboarding at the first fix commit. The service job first hit npm package propagation and passed on retry after publication completed. - `pnpm verify --explain` requested broader CI coverage because the CI task inputs changed. The focused checks above passed; the required CI jobs will provide broad coverage. - [Final-revision CI](https://github.com/paperclipai/paperclip/actions/runs/46782167000) passed on `236640e419d1177aafb64f3f7dd1ee49848ee707`. Both required aggregates, all 16 browser shards, and all selected typecheck, build, server, Runner, and canary dry-run jobs passed. [Incremental CI qualification](https://github.com/paperclipai/paperclip/actions/runs/46782166749) also passed. - [The new source onboarding case](https://github.com/paperclipai/paperclip/actions/runs/46782167000/job/143123174120) ran on the hosted Linux runner and passed in 20.8 seconds. - [Greptile review](https://github.com/paperclipai/paperclip/pull/23432#issuecomment-7330325410) scored `236640e419d1177aafb64f3f7dd1ee49848ee707` 5/5 and confirmed the shared-dependency finding is fixed. There are no unresolved review threads. ## Risks - This changes test coverage and CI selection. It does not change application behavior, release permissions, or publication rules. - The source case stays on for shared and unfamiliar source changes. It skips only the documented leaf pages and source-unit-test-only edits in eligible plans. Local full E2E still includes it. Extend exclusions only after checking that a path cannot affect onboarding. - The trusted PR workflow is loaded from master. Before merge, the current workflow keeps the full fallback because it does not yet pass the change plan to the shard command. The unit and CLI tests qualify the filtered path; after merge, the new workflow environment activates it. - The source test uses local trusted authentication. The authenticated published-package test remains responsible for login and installation checks. Neither run needs paid model completions. - GitHub master rules require code-owner approval for the protected CI changes. Those review requests are already open. There are no conflicts or unresolved review threads. - A replacement nightly still needs a successful release run after this reaches master. This PR does not bypass qualification or promote beta or stable. ## Model Used OpenAI Codex, `gpt-6.1-sol`, with xhigh reasoning effort, terminal tools, GitHub CLI, and Playwright. The harness does not report 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> |
||
|
|
fb6632530d |
feat(onboarding): start the first chat with a welcome and choices (#23334)
## Thinking Path > - Paperclip helps people assign and track work with AI agents. > - Onboarding connects the first agent and opens its chat. > - A new user needs a clear way to start a conversation. > - A saved welcome can appear as soon as chat opens. > - The standard question card lets the user pick a goal, a product overview, or a task. > - The connected model replies after the user sends the choice. ## Linked Issues or Issue Description **Subsystem affected** Onboarding, agent chat, and subscription sign-in. **Problem or motivation** New users can land in a chat before they know what to ask. The original welcome depended on a model run, which could delay the first interaction. Local Claude sign-in could lose its code field if the browser reloaded the onboarding tab during authorization. **Proposed solution** Save a personalized welcome and a standard question card. Type the welcome when the chat opens, then show the card above the composer. Use the choice and any task description to guide the connected model. Resume the local Claude sign-in attempt when the onboarding tab reloads. **Alternatives considered** A model-written welcome can vary, but it adds a model call before the user has chosen what to do. The saved welcome gives the user the same starting points each time. **Roadmap alignment** This improves the existing first-agent flow for local and Cloud-managed instances. Related PRs: #22433 covers clearing the organization name after Back. #23326 adds the separate Cloud mobile-to-desktop handoff. ## What Changed - Save the greeting and question card together. Reuse the saved chat on entry and keep the transcript in order after a reload. - Type the greeting in the chat and reveal the standard question card above the composer. Honor reduced motion. - Collect a task description before starting the first model turn for the task option. Guide the first reply for each choice. - Restore the original local Claude sign-in attempt when the onboarding tab reloads. Show progress while it connects, and offer retry on a failed or stalled code exchange. - Update the organization name helper text and the onboarding walkthrough tests. ## Verification - See the first-chat test drive for manual steps and the credential-free browser fixture. - 659 focused Vitest tests passed, with one skipped. The UI and server typechecks and the feature map validator passed. - All 18 Chromium tests passed across the first-chat, onboarding, sign-in resume, and mobile desktop handoff specs. Coverage includes the saved greeting, chat ordering, question handoff, Claude code submission and resume, and the Cloud-managed starter model path with scripted replies. - The published Cloud service and live subscriber credentials need separate acceptance testing. ## Risks - The greeting uses the existing conversation and interaction records. No database migration is needed. - Existing in-flight model greetings can finish through the previous path. - The Claude PTY change depends on the CLI's bracketed-paste support. The runner preserves separate input writes for terminals that do not announce support. ## Model Used OpenAI Codex, GPT-6.2 Sol and GPT-6.2 Astra, with terminal and browser tooling. ## 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: Scott Tong <1504818+scotttong@users.noreply.github.com> |