Skip to content

Conversation

@SimonMilord
Copy link
Contributor

@SimonMilord SimonMilord commented Dec 15, 2025

SFINT-6550

IN THIS PR:

  • Updated the coveo analytics version to support the new logGeneratedAnswerCitationDocumentAttach event
  • Added analytics action for attaching a citation document in the attached-results-analytics-loader.ts
  • Added unit test to cover this new analytics action

Design document

TESTS:

image

@SimonMilord SimonMilord marked this pull request as ready for review December 16, 2025 00:29
@SimonMilord SimonMilord requested a review from a team as a code owner December 16, 2025 00:29
@SimonMilord SimonMilord requested review from Copilot and removed request for Copilot December 16, 2025 00:29
@SimonMilord SimonMilord changed the title feat(headless): added redux actions and analytics actions for attach citations feature feat(headless): added redux analytics actions for attach citations feature Dec 17, 2025
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 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 logGeneratedAnswerCitationDocumentAttach analytics event
  • Extended the AttachedResult state interface with an optional isCitation boolean flag to distinguish citations from regular attached results
  • Added logCitationDocumentAttach analytics 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.

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

🔗 Scratch Orgs ready to test this PR:

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