Skip to content

ci(frontend): add Playwright PR smoke suite with seeded QA accounts - #12682

Merged
Abhi1992002 merged 93 commits into
devfrom
abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline-for-pr-releases-2
Apr 14, 2026
Merged

ci(frontend): add Playwright PR smoke suite with seeded QA accounts#12682
Abhi1992002 merged 93 commits into
devfrom
abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline-for-pr-releases-2

Conversation

@Abhi1992002

@Abhi1992002 Abhi1992002 commented Apr 6, 2026

Copy link
Copy Markdown
Member

Why / What / How

This PR simplifies frontend PR validation to one Playwright E2E suite, moves redundant page-level browser coverage into Vitest integration tests, and switches Playwright auth to deterministic seeded QA accounts. It also folds in the follow-up fixes that came out of review and CI: lint cleanup, CodeQL feedback, PR-local type regressions, and the flaky Library run helper.

The approach is:

  • keep Playwright focused on real browser and cross-page flows that integration tests cannot prove well
  • keep page-level render and mocked API behavior in Vitest
  • remove the old PR-vs-full Playwright split from CI and run one deterministic PR suite instead
  • seed reusable auth states for fixed QA users so the browser suite is less flaky and faster to bootstrap

Changes 🏗️

  • Removed the workflow indirection that selected different Playwright suites for PRs vs other events
  • Standardized frontend CI on a single command: pnpm test:e2e:no-build
  • Consolidated the PR-gating Playwright suite around these happy-path specs:
    • auth-happy-path.spec.ts
    • settings-happy-path.spec.ts
    • api-keys-happy-path.spec.ts
    • builder-happy-path.spec.ts
    • library-happy-path.spec.ts
    • marketplace-happy-path.spec.ts
    • publish-happy-path.spec.ts
    • copilot-happy-path.spec.ts
  • Added the missing browser-only confidence checks to the PR suite:
    • settings persistence across reload and re-login
    • API key create, copy, and revoke
    • schedule Run now from Library
    • activity dropdown visibility for a real run
    • creator dashboard verification after publish submission
  • Increased Playwright CI workers from 6 to 8
  • Migrated redundant page-level browser coverage into Vitest integration/unit tests where appropriate, including marketplace, profile, settings, API keys, signup behavior, agent dashboard row behavior, agent activity, and utility/auth helpers
  • Seeded deterministic Playwright QA users in backend/test/e2e_test_data.py and reused auth states from frontend/src/tests/credentials/
  • Fixed CodeQL insecure randomness feedback by replacing insecure randomness in test auth utilities
  • Fixed frontend lint issues in marketplace image rendering
  • Fixed PR-local type regressions introduced during test migration
  • Stabilized the Library E2E run helper to support the current Library action states: Setup your task, New task, Rerun task, and Run now
  • Removed obsolete Playwright specs and the temporary migration planning doc once the consolidation was complete
  • Reverted unintended non-test backend source changes; only backend test fixture changes remain in scope

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • pnpm lint
    • pnpm types
    • pnpm test:unit
    • pnpm exec playwright test --list
    • pnpm test:e2e:no-build locally
    • PR CI green after the latest push

For configuration changes:

  • .env.default is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)

Notes:

  • Current local Playwright run on this branch: 28 passed, 0 flaky, 0 retries, 3m 25s.
  • Latest Codecov report on this PR showed overall coverage 63.14% -> 63.61% (+0.47%), with frontend coverage up +2.32% and frontend E2E coverage up +2.10%.
  • The backend change in this PR is limited to deterministic E2E test data setup in backend/test/e2e_test_data.py.
  • Playwright retries remain enabled in CI; this branch does not add fail-on-flaky behavior.

@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Deterministic E2E overhaul: seeded auth/accounts and storage-state reuse; Playwright CI scripting and caching; Playwright config made environment-driven; many legacy Playwright suites removed and replaced by focused “happy path” specs; Vitest+RTL+MSW tests added; test page-objects and helper utilities refactored for robust synchronization.

Changes

Cohort / File(s) Summary
CI & Playwright config
/.github/workflows/platform-fullstack-ci.yml, autogpt_platform/frontend/package.json, autogpt_platform/frontend/playwright.config.ts
Added Playwright browser-cache step; renamed/added pnpm test:e2e scripts; made baseURL/workers/retries/reporting configurable via env; updated CI step names.
Backend E2E seeding
autogpt_platform/backend/test/e2e_test_data.py
Introduced deterministic creator/email constants and changed test user/profile/submission creation to use seeded emails and a deterministic marketplace submission/approval flow.
Seeded credentials & auth-state
autogpt_platform/frontend/src/tests/credentials/*, .../credentials/index.ts, .../credentials/storage-state.ts, .../utils/auth.ts, .../global-setup.ts
Added seeded account map, storage-state helpers, cookie-consent storage builder, getSeededTestUser, and replaced user-pool persistence with seeded storage-state reuse/creation; global setup now ensures seeded auth states.
Playwright page objects & helpers
autogpt_platform/frontend/src/tests/pages/...
.../pages/{build,page,library,login,marketplace,copilot,settings}.ts
Major page-object additions and refactors: deterministic flows, improved waits/retries, tutorial/scheduling/run/export/import helpers, seeded-login helper, session API creation, and robust synchronization.
Playwright E2E specs added
autogpt_platform/frontend/src/tests/*-happy-path.spec.ts (auth, api-keys-happy-path, builder-happy-path, copilot-happy-path, library-happy-path, marketplace-happy-path, publish-happy-path, settings-happy-path)
Added focused Playwright “happy path” E2E specs using seeded auth states and new page objects.
Playwright specs removed
autogpt_platform/frontend/src/tests/*.spec.ts (many legacy files: agent-activity, agent-dashboard, api-keys, build, library, marketplace*, onboarding, profile*, publish-agent, settings, signin, signup, title, util, etc.)
Removed broad legacy Playwright suites in favor of targeted deterministic coverage.
Vitest + RTL + MSW tests & setup
autogpt_platform/frontend/src/.../__tests__/*, autogpt_platform/frontend/src/tests/integrations/vitest.setup.tsx, autogpt_platform/frontend/src/lib/utils.test.ts, autogpt_platform/frontend/src/types/auth.test.ts
Added numerous Vitest/React Testing Library tests with MSW mocks; added DOM cleanup in afterEach.
Test helpers & credentials updates
autogpt_platform/frontend/src/tests/credentials/*, .../credentials/index.ts, .../credentials/storage-state.ts
New deterministic agent/test data, seeded auth-state path helpers, cookie-consent storage-state builder, and exported seeded accounts/types.
Frontend component tweaks
autogpt_platform/frontend/src/app/.../ModalScheduleSection.tsx, autogpt_platform/frontend/src/app/.../AgentImage.tsx, autogpt_platform/frontend/next.config.mjs, autogpt_platform/frontend/src/app/(platform)/profile/.../NotificationForm.tsx
Cron validation refactor; switched thumbnails to Next.js Image with fill/sizes and improved keys; allowed img.youtube.com; added aria-label to Agent Run Notifications switch.
Docs & test docs
docs/platform/automated-qa-testing-pipeline-rationale.md, autogpt_platform/frontend/README.md, autogpt_platform/frontend/TESTING.md
Added rationale doc; updated README/TESTING to document Vitest vs Playwright E2E commands and seeded auth-state usage.
Test runners / utils
autogpt_platform/frontend/src/tests/utils/*, autogpt_platform/frontend/src/tests/pages/*.ts
Added resolveBaseURL and other helpers; removed user-pool persistence; many stability and polling improvements across helpers.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor CI
  participant GS as GlobalSetup
  participant BE as BackendSeeder
  participant BR as PlaywrightBrowser
  participant FS as Filesystem

  CI->>GS: run globalSetup
  GS->>BE: ensure deterministic backend data
  note right of BE: create users, creator, deterministic submission
  GS->>BR: launch browser to seed auth states
  BR->>GS: perform seeded logins
  BR->>FS: write storageState -> .auth/states/{account}.json
  GS->>GS: resolve baseURL / reuse existing states
  alt missing or invalid states
    GS->>BR: repeat per-account seeding
    BR->>FS: persist each storageState
  end
  CI->>BR: run Playwright specs using persisted storageState
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • Swiftyos
  • Pwuts
  • Bentlybro

🐰 I hopped through tests and planted seeds,
deterministic creds for sprouting deeds,
happy-paths bloom where flaky weeds once tread,
Playwright and Vitest nibble carrots ahead! 🥕

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.79% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a Playwright PR smoke suite with seeded QA accounts for frontend CI.
Description check ✅ Passed The pull request description clearly explains the changes, rationale, and implementation approach for consolidating frontend PR validation to a single Playwright E2E suite with seeded QA accounts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline-for-pr-releases-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added documentation Improvements or additions to documentation platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end labels Apr 6, 2026
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Overlap Detection

This check compares your PR against all other open PRs targeting the same branch to detect potential merge conflicts early.

🔴 Merge Conflicts Detected

The following PRs have been tested and will have merge conflicts if merged after this PR. Consider coordinating with the authors.

  • ci(platform): gate E2E tests behind ci-ready PR label #12616 (ntindle · updated 9d ago)

    • .gitignore (1 conflict, ~4 lines)
    • autogpt_platform/backend/backend/api/features/admin/rate_limit_admin_routes.py (2 conflicts, ~32 lines)
    • autogpt_platform/backend/backend/api/features/admin/rate_limit_admin_routes_test.py (3 conflicts, ~60 lines)
    • autogpt_platform/backend/backend/api/features/chat/routes.py (5 conflicts, ~22 lines)
    • autogpt_platform/backend/backend/api/features/chat/routes_test.py (4 conflicts, ~151 lines)
    • autogpt_platform/backend/backend/blocks/ai_condition.py (1 conflict, ~6 lines)
    • autogpt_platform/backend/backend/blocks/ai_condition_test.py (3 conflicts, ~52 lines)
    • autogpt_platform/backend/backend/blocks/autopilot.py (1 conflict, ~6 lines)
    • autogpt_platform/backend/backend/blocks/orchestrator.py (4 conflicts, ~22 lines)
    • autogpt_platform/backend/backend/blocks/test/test_llm.py (1 conflict, ~295 lines)
    • autogpt_platform/backend/backend/copilot/baseline/service.py (12 conflicts, ~360 lines)
    • autogpt_platform/backend/backend/copilot/db.py (3 conflicts, ~89 lines)
    • autogpt_platform/backend/backend/copilot/model.py (2 conflicts, ~8 lines)
    • autogpt_platform/backend/backend/copilot/prompting.py (1 conflict, ~18 lines)
    • autogpt_platform/backend/backend/copilot/rate_limit.py (4 conflicts, ~16 lines)
    • autogpt_platform/backend/backend/copilot/rate_limit_test.py (3 conflicts, ~944 lines)
    • autogpt_platform/backend/backend/copilot/reset_usage_test.py (11 conflicts, ~92 lines)
    • autogpt_platform/backend/backend/copilot/sdk/e2b_file_tools.py (5 conflicts, ~160 lines)
    • autogpt_platform/backend/backend/copilot/sdk/e2b_file_tools_test.py (3 conflicts, ~760 lines)
    • autogpt_platform/backend/backend/copilot/sdk/env.py (4 conflicts, ~139 lines)
    • autogpt_platform/backend/backend/copilot/sdk/env_test.py (10 conflicts, ~125 lines)
    • autogpt_platform/backend/backend/copilot/sdk/retry_scenarios_test.py (1 conflict, ~267 lines)
    • autogpt_platform/backend/backend/copilot/sdk/service.py (5 conflicts, ~194 lines)
    • autogpt_platform/backend/backend/copilot/sdk/service_test.py (2 conflicts, ~73 lines)
    • autogpt_platform/backend/backend/copilot/sdk/thinking_blocks_test.py (8 conflicts, ~53 lines)
    • autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py (8 conflicts, ~316 lines)
    • autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py (6 conflicts, ~254 lines)
    • autogpt_platform/backend/backend/copilot/sdk/transcript.py (1 conflict, ~1078 lines)
    • autogpt_platform/backend/backend/copilot/tools/ask_question.py (5 conflicts, ~175 lines)
    • autogpt_platform/backend/backend/copilot/tools/ask_question_test.py (3 conflicts, ~301 lines)
    • autogpt_platform/backend/backend/copilot/tools/find_library_agent.py (1 conflict, ~4 lines)
    • autogpt_platform/backend/backend/copilot/tools/run_agent.py (3 conflicts, ~16 lines)
    • autogpt_platform/backend/backend/copilot/tools/run_block.py (3 conflicts, ~21 lines)
    • autogpt_platform/backend/backend/copilot/tools/test_dry_run.py (4 conflicts, ~208 lines)
    • autogpt_platform/backend/backend/copilot/tools/workspace_files.py (1 conflict, ~4 lines)
    • autogpt_platform/backend/backend/executor/manager.py (1 conflict, ~18 lines)
    • autogpt_platform/backend/backend/executor/simulator.py (2 conflicts, ~52 lines)
    • autogpt_platform/backend/backend/executor/simulator_test.py (2 conflicts, ~43 lines)
    • autogpt_platform/backend/backend/util/service.py (1 conflict, ~21 lines)
    • autogpt_platform/backend/poetry.lock (1 conflict, ~5 lines)
    • autogpt_platform/backend/snapshots/get_rate_limit (1 conflict, ~4 lines)
    • autogpt_platform/backend/snapshots/reset_user_usage_daily_and_weekly (1 conflict, ~4 lines)
    • autogpt_platform/backend/snapshots/reset_user_usage_daily_only (1 conflict, ~4 lines)
    • autogpt_platform/frontend/AGENTS.md (3 conflicts, ~20 lines)
    • autogpt_platform/frontend/package.json (1 conflict, ~7 lines)
    • autogpt_platform/frontend/src/app/(platform)/admin/rate-limits/components/RateLimitDisplay.tsx (4 conflicts, ~84 lines)
    • autogpt_platform/frontend/src/app/(platform)/admin/rate-limits/components/RateLimitManager.tsx (1 conflict, ~4 lines)
    • autogpt_platform/frontend/src/app/(platform)/admin/rate-limits/components/useRateLimitManager.ts (9 conflicts, ~113 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/CopilotPage.tsx (4 conflicts, ~85 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/ChatMessagesContainer.tsx (1 conflict, ~5 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatMessagesContainer/components/MessagePartRenderer.tsx (1 conflict, ~5 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/helpers/convertChatSessionToUiMessages.ts (4 conflicts, ~22 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/useChatSession.ts (2 conflicts, ~11 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotPage.ts (2 conflicts, ~9 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotStream.ts (1 conflict, ~12 lines)
    • autogpt_platform/frontend/src/app/api/openapi.json (1 conflict, ~7 lines)
    • autogpt_platform/frontend/src/tests/AGENTS.md (8 conflicts, ~68 lines)
    • autogpt_platform/frontend/vitest.config.mts (1 conflict, ~4 lines)
    • codecov.yml (2 conflicts, ~17 lines)
    • docs/integrations/block-integrations/misc.md (1 conflict, ~5 lines)
  • feat(platform): add first-class org/workspace support — schema, auth, APIs, migration, frontend #12670 (ntindle · updated 5d ago)

    • .claude/skills/pr-address/SKILL.md (1 conflict, ~11 lines)
    • .github/workflows/platform-fullstack-ci.yml (1 conflict, ~11 lines)
    • autogpt_platform/backend/backend/api/features/chat/routes.py (1 conflict, ~5 lines)
    • autogpt_platform/backend/backend/api/features/chat/routes_test.py (2 conflicts, ~104 lines)
    • autogpt_platform/backend/backend/blocks/agent.py (1 conflict, ~5 lines)
    • autogpt_platform/backend/backend/blocks/test/test_llm.py (1 conflict, ~295 lines)
    • autogpt_platform/backend/backend/copilot/baseline/service.py (8 conflicts, ~72 lines)
    • autogpt_platform/backend/backend/copilot/config.py (1 conflict, ~9 lines)
    • autogpt_platform/backend/backend/copilot/db.py (2 conflicts, ~59 lines)
    • autogpt_platform/backend/backend/copilot/executor/utils.py (3 conflicts, ~19 lines)
    • autogpt_platform/backend/backend/copilot/sdk/e2b_file_tools.py (3 conflicts, ~149 lines)
    • autogpt_platform/backend/backend/copilot/sdk/e2b_file_tools_test.py (1 conflict, ~739 lines)
    • autogpt_platform/backend/backend/copilot/sdk/retry_scenarios_test.py (1 conflict, ~267 lines)
    • autogpt_platform/backend/backend/copilot/sdk/service.py (7 conflicts, ~218 lines)
    • autogpt_platform/backend/backend/copilot/sdk/service_test.py (2 conflicts, ~67 lines)
    • autogpt_platform/backend/backend/copilot/sdk/tool_adapter.py (6 conflicts, ~130 lines)
    • autogpt_platform/backend/backend/copilot/sdk/tool_adapter_test.py (2 conflicts, ~222 lines)
    • autogpt_platform/backend/backend/copilot/tools/run_agent.py (3 conflicts, ~61 lines)
    • autogpt_platform/backend/backend/copilot/tools/run_block.py (4 conflicts, ~29 lines)
    • autogpt_platform/backend/backend/copilot/tools/test_dry_run.py (4 conflicts, ~277 lines)
    • autogpt_platform/backend/backend/executor/manager.py (1 conflict, ~8 lines)
    • autogpt_platform/backend/backend/util/service.py (1 conflict, ~21 lines)
    • autogpt_platform/backend/poetry.lock (1 conflict, ~5 lines)
    • autogpt_platform/frontend/package.json (1 conflict, ~7 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/components/ChatInput/ChatInput.tsx (4 conflicts, ~36 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/helpers.ts (1 conflict, ~5 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/store.ts (2 conflicts, ~11 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/useChatSession.ts (1 conflict, ~8 lines)
    • autogpt_platform/frontend/src/app/(platform)/copilot/useCopilotPage.ts (1 conflict, ~5 lines)
    • autogpt_platform/frontend/src/app/api/mutators/custom-mutator.ts (1 conflict, ~31 lines)
    • autogpt_platform/frontend/src/app/api/openapi.json (24 conflicts, ~526 lines)
    • autogpt_platform/frontend/src/services/feature-flags/use-get-flag.ts (2 conflicts, ~8 lines)
    • autogpt_platform/frontend/src/services/storage/local-storage.ts (1 conflict, ~12 lines)
    • autogpt_platform/frontend/src/tests/agent-activity.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/agent-dashboard.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/api-keys.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/build.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/library.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/marketplace-agent.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/marketplace-creator.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/marketplace.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/pages/login.page.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/profile-form.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/profile.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/publish-agent.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/settings.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/signin.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/signup.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/title.spec.ts (deleted here, modified there)
    • autogpt_platform/frontend/src/tests/util.spec.ts (deleted here, modified there)
    • docs/integrations/block-integrations/misc.md (1 conflict, ~5 lines)

🟢 Low Risk — File Overlap Only

These PRs touch the same files but different sections (click to expand)

Summary: 2 conflict(s), 0 medium risk, 5 low risk (out of 7 PRs with file overlap)


Auto-generated on push. Ignores: openapi.json, lock files.

@Abhi1992002 Abhi1992002 changed the title abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline-for-pr-releases-2 ci(frontend): add Playwright PR smoke suite with seeded QA accounts Apr 6, 2026
@codecov

codecov Bot commented Apr 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.26%. Comparing base (7240dd4) to head (12110c7).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #12682      +/-   ##
==========================================
+ Coverage   63.82%   64.26%   +0.43%     
==========================================
  Files        1815     1815              
  Lines      132920   132919       -1     
  Branches    14379    14414      +35     
==========================================
+ Hits        84839    85423     +584     
+ Misses      45467    44823     -644     
- Partials     2614     2673      +59     
Flag Coverage Δ
platform-backend 75.23% <ø> (-0.01%) ⬇️
platform-frontend 18.14% <ø> (+2.32%) ⬆️
platform-frontend-e2e 29.97% <ø> (+1.87%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Platform Backend 75.23% <ø> (-0.01%) ⬇️
Platform Frontend 26.14% <ø> (+2.30%) ⬆️
AutoGPT Libs ∅ <ø> (∅)
Classic AutoGPT 28.43% <ø> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread autogpt_platform/frontend/src/tests/utils/auth.ts Fixed
Comment thread autogpt_platform/frontend/src/tests/utils/auth.ts Fixed
@github-actions github-actions Bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 6, 2026
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

majdyz and others added 3 commits April 6, 2026 21:09
…12623)

### Why / What / How

Users need a way to choose between fast, cheap responses (Sonnet) and
deep reasoning (Opus) in the copilot. Previously only the SDK/Opus path
existed, and the baseline path was a degraded fallback with no tool
calling, no file attachments, no E2B sandbox, and no permission
enforcement.

This PR adds a copilot mode toggle and brings the baseline (fast) path
to full feature parity with the SDK (extended thinking) path.

### Changes 🏗️

#### 1. Mode toggle (UI → full stack)
- Add Fast / Thinking mode toggle to ChatInput footer (Phosphor
`Brain`/`Zap` icons via lucide-react)
- Thread `mode: "fast" | "extended_thinking" | null` from
`StreamChatRequest` → RabbitMQ queue → executor → service selection
- Fast → baseline service (Sonnet 4 via OpenRouter), Thinking → SDK
service (Opus 4.6)
- Toggle gated behind `CHAT_MODE_OPTION` feature flag with server-side
enforcement
- Mode persists in localStorage with SSR-safe init

#### 2. Baseline service full tool parity
- **Tool call persistence**: Store structured `ChatMessage` entries
(assistant + tool results) instead of flat concatenated text — enables
frontend to render tool call details and maintain context across turns
- **E2B sandbox**: Wire up `get_or_create_sandbox()` so `bash_exec`
routes to E2B (image download, Python/PIL compression, filesystem
access)
- **File attachments**: Accept `file_ids`, download workspace files,
embed images as OpenAI vision blocks, save non-images to working dir
- **Permissions**: Filter tool list via `CopilotPermissions`
(whitelist/blacklist)
- **URL context**: Pass `context` dict to user message for URL-shared
content
- **Execution context**: Pass `sandbox`, `sdk_cwd`, `permissions` to
`set_execution_context()`
- **Model**: Changed `fast_model` from `google/gemini-2.5-flash` to
`anthropic/claude-sonnet-4` for reliable function calling
- **Temp dir cleanup**: Lazy `mkdtemp` (only when files attached) +
`shutil.rmtree` in finally

#### 3. Transcript support for Fast mode
- Baseline service now downloads / validates / loads / appends / uploads
transcripts (parity with SDK)
- Enables seamless mode switching mid-conversation via shared transcript
- Upload shielded from cancellation, bounded at 5s timeout

#### 4. Feature-flag infrastructure fixes
- `FORCE_FLAG_*` env-var overrides on both backend and frontend for
local dev / E2E
- LaunchDarkly context parity (frontend mirrors backend user context)
- `CHAT_MODE_OPTION` default flipped to `false` to match backend

#### 5. Other hardening
- Double-submit ref guard in `useChatInput` + reconnect dedup in
`useCopilotStream`
- `copilotModeRef` pattern to read latest mode without recreating
transport
- Shared `CopilotMode` type across frontend files
- File name collision handling with numeric suffix
- Path sanitization in file description hints (`os.path.basename`)

### Test plan
- [x] 30 new unit tests: `_env_flag_override` (12), `envFlagOverride`
(8), `_filter_tools_by_permissions` (4), `_prepare_baseline_attachments`
(6)
- [x] E2E tested on dev: fast mode creates E2B sandbox, calls 7-10
tools, generates and renders images
- [x] Mode switching mid-session works (shared transcript + session
messages)
- [x] Server-side flag gate enforced (crafted `mode=fast` stripped when
flag off)
- [x] All 37 CI checks green
- [x] Verified via agent-browser: workspace images render correctly in
all message positions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Zamil Majdy <majdy.zamil@gmail.com>
@github-actions github-actions Bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 6, 2026
@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

Comment thread autogpt_platform/frontend/src/playwright/credentials/accounts.ts
Comment thread autogpt_platform/backend/test/e2e_test_data.py
majdyz
majdyz previously requested changes Apr 14, 2026

@majdyz majdyz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Review: PR #12682 — ci(frontend): add Playwright PR smoke suite with seeded QA accounts

Good consolidation work. The single-suite approach is cleaner than the old PR-vs-full split, parallel account isolation (one account per spec) is the right pattern, and the Vitest migration for page-level tests follows the testing strategy correctly. 28 passing locally with 0 retries is a good signal.

Issues found:

🟠 Should FixSEEDED_TEST_PASSWORD = "testpassword123" is hardcoded in accounts.ts (committed to source). Even though these are test accounts, the password should come from an env var with a local fallback, not be committed in the clear. See inline comment on accounts.ts line 1.

🟠 Should Fix — Graph seeding is not idempotent: create_graph is called unconditionally with reassign_graph_id=True on every seed run, creating a new orphaned graph each time while the submission idempotency check reuses the old submission pointing to the old graph. See inline comment on e2e_test_data.py line 652.

🟡 Nice to Have — Tests are all happy-path smoke tests, which is the stated intent. However there are no tests for the error/sad path on any flow (e.g. bad credentials at login, 404 on builder, marketplace with no results). At least one negative-path test per critical flow would improve the signal quality.

🟡 Nice to Have — The PR-local CI step still hasn't gone green (pnpm test:e2e:no-build CI step — checklist item unchecked). The review should wait for CI green before merge.

🔵 Nit — The workers count of 8 in playwright.config.ts is set via a comment ("Higher worker count") with no explanation of the stability/speed tradeoff. Consider adding a comment or env var to make it tunable without a code change if parallelism issues arise in CI.

@github-project-automation github-project-automation Bot moved this from 🆕 Needs initial review to 🚧 Needs work in AutoGPT development kanban Apr 14, 2026
Comment thread autogpt_platform/frontend/src/playwright/pages/library.page.ts
0ubbe
0ubbe previously approved these changes Apr 14, 2026
…edback

- Check for existing deterministic marketplace graph before creating a new one,
  preventing orphaned graphs on repeated seed runs
- Fix hasNoAgentsMessage to use isVisible() instead of null check on Locator
- Move SEEDED_TEST_PASSWORD to env var with local fallback
…-for-pr-releases-2' of https://github.com/Significant-Gravitas/AutoGPT into abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline-for-pr-releases-2
0ubbe
0ubbe previously approved these changes Apr 14, 2026
The codecov/project/Platform Backend check was blocking PRs that only
touch frontend files due to tiny coverage fluctuations from upstream
merges. Mark it informational (same as Platform Frontend) so it reports
but does not block.
Comment thread autogpt_platform/backend/test/e2e_test_data.py
@Abhi1992002
Abhi1992002 added this pull request to the merge queue Apr 14, 2026
@github-project-automation github-project-automation Bot moved this from 🚧 Needs work to 👍🏼 Mergeable in AutoGPT development kanban Apr 14, 2026
Merged via the queue into dev with commit b06648d Apr 14, 2026
40 checks passed
@Abhi1992002
Abhi1992002 deleted the abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline-for-pr-releases-2 branch April 14, 2026 16:10
@github-project-automation github-project-automation Bot moved this from 👍🏼 Mergeable to ✅ Done in AutoGPT development kanban Apr 14, 2026
@github-project-automation github-project-automation Bot moved this to Done in Frontend Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end size/xl

Projects

Status: ✅ Done
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants