Testing: Add Angular to automated visual regression testing
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.
β οΈ 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/**orshowcase/angular/**) will keep CI fast for unrelated PRs
Suggested starting points:
- Review the existing Playwright screenshot tooling in the repo to understand what's already in place before adding new infrastructure
- 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 - Check the Angular troubleshooting guide and the Angular feature examples for the full list of UI states worth covering (41 features are listed)
- 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 π
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].
Hi, would like to be assigned this please! I am a CS 146S student.