Skip to content

Conversation

@gagik
Copy link
Contributor

@gagik gagik commented Oct 9, 2025

Seems like the previous way of setting onError twice did not play together too well.

@gagik gagik requested a review from a team as a code owner October 9, 2025 19:04
@gagik gagik requested review from Copilot and gribnoysup and removed request for Copilot October 9, 2025 19:04
@gagik gagik changed the base branch from main to gagik/e2e October 9, 2025 19:05
@gagik gagik force-pushed the gagik/telemetry-error branch from 4dc28df to 4df81ea Compare October 9, 2025 19:07
@gagik gagik changed the base branch from gagik/e2e to main October 9, 2025 19:07
@gagik gagik changed the title chore(compass-e2e-tests): add assistant end to end tests COMPASS-9384 chore(compass-assistant): fix onError and add error handling tests COMPASS-9384 Oct 10, 2025
@gagik gagik force-pushed the gagik/telemetry-error branch from 4df81ea to a3cfd28 Compare October 10, 2025 09:18
Copilot AI review requested due to automatic review settings October 10, 2025 09:18
Copy link
Contributor

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 addresses an issue with error handling in the compass-assistant module by moving the onError callback from the component level to the transport level and adding comprehensive error handling tests.

  • Moved error tracking from useChat hook to the transport layer in createDefaultChat
  • Added test utilities for simulating broken transports and chats
  • Added comprehensive error handling test coverage for both component and provider levels

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/compass-assistant/test/utils.tsx Added helper functions for creating broken transports and chats for error testing
packages/compass-assistant/src/components/assistant-chat.tsx Removed duplicate onError handler from useChat hook
packages/compass-assistant/src/components/assistant-chat.spec.tsx Updated test structure and added error handling test coverage
packages/compass-assistant/src/compass-assistant-provider.tsx Refactored chat creation and moved error handling to transport level
packages/compass-assistant/src/compass-assistant-provider.spec.tsx Added error handling tests and fixed test structure

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

….tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@gagik gagik merged commit 39a576a into main Oct 10, 2025
30 of 31 checks passed
@gagik gagik deleted the gagik/telemetry-error branch October 10, 2025 10:54
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.

3 participants