Skip to content

chore: cy prompt infrastructure #31748

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 28, 2025
Merged

Conversation

ryanthemanuel
Copy link
Collaborator

@ryanthemanuel ryanthemanuel commented May 20, 2025

Additional details

This PR lays the ground work for consuming the cloud code that will be responsible for supporting cy.prompt()

Steps to test

How has the user experience changed?

PR Tasks

@ryanthemanuel ryanthemanuel changed the base branch from develop to feat/cy-prompt May 20, 2025 18:01
Copy link

cypress bot commented May 20, 2025

cypress    Run #62685

Run Properties:  status check passed Passed #62685  •  git commit 04ee86bce2: PR comments
Project cypress
Branch Review ryanm/feat/cy-prompt-infra
Run status status check passed Passed #62685
Run duration 18m 21s
Commit git commit 04ee86bce2: PR comments
Committer Ryan Manuel
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 11
Tests that did not run due to a developer annotating a test with .skip  Pending 1232
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 32164
View all changes introduced in this branch ↗︎
UI Coverage  45.71%
  Untested elements 191  
  Tested elements 165  
Accessibility  92.74%
  Failed rules  3 critical   9 serious   2 moderate   2 minor
  Failed elements 695  

@ryanthemanuel ryanthemanuel requested a review from mschile May 20, 2025 20:26
@ryanthemanuel ryanthemanuel self-assigned this May 20, 2025
@ryanthemanuel ryanthemanuel requested a review from mschile May 23, 2025 02:45
@mschile mschile requested a review from Copilot May 23, 2025 03:08
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR provides the foundational infrastructure for the new cy.prompt() command by pulling down, verifying, and loading a remotely hosted bundle, wiring in lifecycle managers, and enabling the experimental flag across server, driver, config, and docs.

  • Adds bundle download/extract helpers and cloud API calls for cy-prompt
  • Introduces CyPromptManager and CyPromptLifecycleManager for runtime orchestration
  • Registers the experimentalPromptCommand flag in config, driver, tests, and documentation

Reviewed Changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/server/lib/cloud/cy-prompt/ensure_cy_prompt_bundle.ts Fetches or copies and extracts the cy-prompt bundle
packages/server/lib/cloud/cy-prompt/CyPromptManager.ts Invokes methods on dynamically loaded cy-prompt server scripts
packages/server/lib/cloud/cy-prompt/CyPromptLifecycleManager.ts Orchestrates session creation, bundle setup, and manager ready
packages/server/lib/cloud/api/cy-prompt/post_cy_prompt_session.ts Implements POST to start a cy-prompt session
packages/server/lib/cloud/api/cy-prompt/get_cy_prompt_bundle.ts Downloads and verifies the signed cy-prompt bundle
packages/data-context/src/data/coreDataShape.ts Adds cyPromptLifecycleManager to the shared data context shape
packages/driver/src/cy/commands/prompt/prompt-driver-types.ts Defines driver interface for cy.prompt
packages/driver/src/cy/commands/prompt/index.ts Implements the prompt command using module federation runtime
packages/driver/src/cy/commands/index.ts Registers the prompt command under driver commands
packages/driver/package.json Adds @module-federation/runtime dependency
packages/driver/cypress/e2e/commands/prompt.cy.ts Basic end-to-end smoke test for cy.prompt
packages/driver/cypress/e2e/e2e/origin/commands/misc.cy.ts Updated command list to include prompt
packages/driver/cypress.config.ts Enables experimentalPromptCommand
packages/config/src/options.ts Introduces new experimental flag
packages/config/test/project/utils.spec.ts Updates default and public config keys tests
packages/config/snapshots/index.spec.ts.js Updates snapshots to include the new flag
packages/frontend-shared/src/locales/en-US.json Adds UI copy for the new experimental flag
guides/cy-prompt-development.md Documents local and remote development workflows for cy.prompt
Comments suppressed due to low confidence (1)

packages/driver/cypress/e2e/commands/prompt.cy.ts:7

  • [nitpick] This test only verifies that the command does not throw—consider adding assertions on expected side effects or backend calls to improve coverage.
cy.prompt('Hello, world!')

ryanthemanuel and others added 2 commits May 27, 2025 17:19
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ryanthemanuel ryanthemanuel merged commit aa543ae into feat/cy-prompt May 28, 2025
87 of 89 checks passed
@ryanthemanuel ryanthemanuel deleted the ryanm/feat/cy-prompt-infra branch May 28, 2025 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants