Skip to content

Improve: copilot: test experience - #100

Merged
Lei Qu (quge009) merged 2 commits into
devfrom
lequ/copilot/improve_test_exp
Oct 27, 2025
Merged

Improve: copilot: test experience#100
Lei Qu (quge009) merged 2 commits into
devfrom
lequ/copilot/improve_test_exp

Conversation

@quge009

Copy link
Copy Markdown
Contributor
  1. smoothing test experience
  • Frontend
    • for development env, start the client at localhost (for easier test)
    • for production env, start the client at relative api (for flexible deployment)
  • Backend
    • for AGENT_LOCAL mode, enable Cross-Origin Resource Sharing (for easier test)
    • for NON_AGENT_LOCAL mode, disable Cross-Origin Resource Sharing (for security)
  1. add multi-user test scenraio
  • add new npm test command template to start 2 clients with two different user names at two different ports

Copilot AI 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.

Pull Request Overview

This PR improves the test experience for the copilot chat system by adding environment-specific configurations for easier development and testing. The changes enable different backend URLs and CORS settings based on the environment, and add support for multi-user testing scenarios.

Key changes include:

  • Environment-aware configuration for frontend and backend communication
  • Conditional CORS enabling for local development
  • Multi-user testing setup with new npm scripts

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/copilot-chat/src/requirements.txt Adds flask-cors dependency for CORS support
src/copilot-chat/src/copilot_agent/utils/authentication.py Adds "dev.eva" as an additional test user
src/copilot-chat/src/copilot_agent/copilot_service.py Implements conditional CORS enabling for local development
contrib/copilot-plugin/src/index.tsx Enables development mode with environment-based user configuration
contrib/copilot-plugin/src/app/ChatHistory.tsx Adds environment-aware backend URL configuration
contrib/copilot-plugin/src/app/ChatBox.tsx Adds environment-aware backend URL configuration
contrib/copilot-plugin/package.json Adds multi-user test scripts for different ports
contrib/copilot-plugin/README.md Documents the new multi-user test commands

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread contrib/copilot-plugin/src/app/ChatHistory.tsx
Comment thread contrib/copilot-plugin/src/app/ChatBox.tsx
@quge009
Lei Qu (quge009) merged commit 3ee2327 into dev Oct 27, 2025
3 checks passed
@quge009
Lei Qu (quge009) deleted the lequ/copilot/improve_test_exp branch October 27, 2025 18:31
This was referenced Nov 4, 2025
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.

4 participants