-
Notifications
You must be signed in to change notification settings - Fork 39
feat(headless): added redux analytics actions for attach citations feature #6805
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
base: main
Are you sure you want to change the base?
Conversation
...ages/headless/src/features/attached-results/attached-citations/attached-citations-actions.ts
Fixed
Show fixed
Hide fixed
...ages/headless/src/features/attached-results/attached-citations/attached-citations-actions.ts
Fixed
Show fixed
Hide fixed
...ages/headless/src/features/attached-results/attached-citations/attached-citations-actions.ts
Fixed
Show fixed
Hide fixed
...ages/headless/src/features/attached-results/attached-citations/attached-citations-actions.ts
Fixed
Show fixed
Hide fixed
...ages/headless/src/features/attached-results/attached-citations/attached-citations-actions.ts
Fixed
Show fixed
Hide fixed
There was a problem hiding this 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 adds support for attaching generated answer citations as a new analytics feature in the headless package. The changes enable tracking when users attach citation documents to cases in Salesforce Insight environments.
Key Changes
- Updated coveo.analytics dependency from 2.30.49 to 2.30.51 to support the new
logGeneratedAnswerCitationDocumentAttachanalytics event - Extended the
AttachedResultstate interface with an optionalisCitationboolean flag to distinguish citations from regular attached results - Added
logCitationDocumentAttachanalytics action with legacy analytics support and corresponding unit tests
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Bumped coveo.analytics to 2.30.51 and added it to minimumReleaseAgeExclude list |
| pnpm-lock.yaml | Lock file updates reflecting the analytics dependency version bump |
| packages/headless/src/features/attached-results/attached-results-state.ts | Added optional isCitation boolean field to AttachedResult interface |
| packages/headless/src/features/attached-results/attached-results-slice.test.ts | Code style improvements: replaced .toEqual() with .toBe() for primitive comparisons |
| packages/headless/src/features/attached-results/attached-results-analytics-actions.ts | Added logCitationDocumentAttach analytics action with legacy mode support |
| packages/headless/src/features/attached-results/attached-results-analytics-actions.test.ts | Added test coverage for logCitationDocumentAttach in legacy analytics mode with proper mocking |
| packages/headless/src/features/attached-results/attached-results-actions.ts | Added validation for isCitation field in payload definition |
| packages/headless/src/features/analytics/search-action-cause.ts | Added generatedAnswerCitationDocumentAttach event to SearchPageEvents enum |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SFINT-6550
IN THIS PR:
logGeneratedAnswerCitationDocumentAttacheventattached-results-analytics-loader.tsDesign document
TESTS: