CopilotKit icon indicating copy to clipboard operation
CopilotKit copied to clipboard

Testing: Add Angular to automated visual regression testing

Open rainerhahnekamp opened this issue 3 months ago β€’ 3 comments

Pre-flight Checklist

  • [x] I have searched existing issues, and this hasn't been requested yet.

Problem or Motivation

The Angular demo currently has no automated visual regression coverage.

During the Angular 22 upgrade in #6521, the visual regression check for the Lucide migration had to be performed manually. The repository already contains Playwright-based screenshot tooling, but Angular is not integrated into it and the existing screenshots are not consistently compared against committed baselines in CI.

This issue should be started after #6521 has been merged.

🎀 Tell us your idea

Integrate the Angular demo into an automated visual regression testing environment.

The tests should:

  • Render deterministic Angular UI states without depending on a live agent or external network requests.
  • Cover at least running and completed tool calls, including their icons.
  • Compare screenshots against committed reference images.
  • Run automatically in CI when relevant Angular UI code changes.
  • Build on or consolidate the existing Playwright screenshot tooling where practical.

Would you like to work on this?

  • [ ] Yes, I’d love to work on it!
  • [ ] I’m open to collaborating but need guidance.
  • [ ] No, I’m just sharing the idea.

rainerhahnekamp avatar Aug 21 '26 10:08 rainerhahnekamp

⚠️ This is an AI-generated response. We've escalated this to our engineering team β€” someone will follow up in this thread shortly.

Angular Visual Regression Testing Integration

Thanks for filing this well-scoped feature request! This is a great area to invest in β€” catching visual regressions automatically is much more reliable than manual checks during upgrades like the Lucide migration in #6521.

Here's some context and direction that might help whoever picks this up:


What the docs tell us about the existing Angular test infrastructure:

The Angular package already has Nx-based test targets:

pnpm exec nx run @copilotkit/angular:test
pnpm exec nx run @copilotkit/showcase-angular-host:test

The Angular Showcase under showcase/angular is described as the frontend-native test host for components, signals, tools, generative UI, interrupts, threads, and lifecycle behavior β€” so that's the natural anchor point for visual regression coverage too.


Key design considerations for whoever implements this:

  • Deterministic rendering without a live agent β€” the requirement to avoid live network requests is the right call. One possibility is using mock/stub implementations of the agent communication layer so UI states (running tool call, completed tool call, etc.) can be driven purely from test fixtures
  • Baseline image management β€” committed reference screenshots need a clear update workflow (e.g., a dedicated CI job or script to regenerate baselines) so they don't become a maintenance burden
  • Scope alignment with existing Playwright tooling β€” consolidating rather than duplicating the screenshot infrastructure will keep CI complexity manageable
  • CI trigger scope β€” path-based triggers (e.g., only run on changes under packages/angular/** or showcase/angular/**) will keep CI fast for unrelated PRs

Suggested starting points:

  1. Review the existing Playwright screenshot tooling in the repo to understand what's already in place before adding new infrastructure
  2. Look at how the Angular Showcase (showcase/angular) is currently structured β€” it's already the designated test host, so visual regression tests likely belong there
  3. Check the Angular troubleshooting guide and the Angular feature examples for the full list of UI states worth covering (41 features are listed)
  4. Coordinate with the team on the baseline update workflow before merging β€” that's often the trickiest part operationally

Good first scope for coverage:

  • Running tool call (with icon)
  • Completed tool call (with icon)
  • Basic chat surface render
  • Generative UI render

These directly address the gap exposed by the Lucide migration check.


If you're planning to work on this, it's worth leaving a comment to claim it and ask the maintainers whether there are any in-progress changes to the Playwright setup that would affect the approach. Was this helpful?


πŸ€– Generated by CopilotKit AI Support Β· Documentation


Was this helpful? React with πŸ‘ or πŸ‘Ž

copilotkit-outpost-bot avatar Aug 21 '26 10:08 copilotkit-outpost-bot

This issue is already claimed externally. Please don’t start new work on it. If you need this fixed immediately, please reach out to us in our Discord or via [email protected].

tylerslaton avatar Sep 30 '26 19:09 tylerslaton

Hi, would like to be assigned this please! I am a CS 146S student.

chang-amy avatar Nov 16 '26 05:11 chang-amy