fix(campaign-task): Ensure Skipped/Removed Task are removed from task list#718
fix(campaign-task): Ensure Skipped/Removed Task are removed from task list#718cmullenx wants to merge 1 commit into
Conversation
… there are no new incoming tasks
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f9deb82f9
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // Hide call control when the current task is a campaign preview that | ||
| // the agent has not yet accepted. Matches agent desktop behavior where | ||
| // call controls are only shown after the preview contact is accepted. | ||
| if (currentTask && isUnacceptedCampaignPreview(currentTask, acceptedCampaignIds)) { |
There was a problem hiding this comment.
Keep call-control hooks before preview guards
The early return now runs before useCallControl. When acceptedCampaignIds changes while currentTask still references a campaign task, for example handleTaskRemove removes the id before clearing currentTask, this render can return before calling hooks that were called on the previous render, causing React's hook-order error and hiding call controls via the error boundary. Keep useCallControl unconditional before this guard, and apply the same ordering in CallControlCAD.
Useful? React with 👍 / 👎.
| import {test} from '@playwright/test'; | ||
| import createCampaignPreviewTests from '../tests/campaign-preview-test.spec'; | ||
|
|
||
| test.describe('Campaign Preview Tests', createCampaignPreviewTests); |
There was a problem hiding this comment.
Register the campaign preview suite in Playwright
playwright.config.ts builds projects only from USER_SETS and matches **/suites/${setData.TEST_SUITE} (lines 33-40), but playwright/test-data.ts has no TEST_SUITE: 'campaign-preview-tests.spec.ts' entry, so yarn test:e2e never selects this new suite. That leaves the campaign regression unexercised in CI unless the suite is added to the project list/test data.
Useful? React with 👍 / 👎.
COMPLETES #https://jira-eng-sjc12.cisco.com/jira/browse/CAI-8145
This pull request addresses
by making the following changes
*updating the campaign preview logic
Vidcast: https://app.vidcast.io/share/d19111bb-fd22-4c7f-a240-4d57ae32c813
Change Type
The following scenarios were tested
Tested accepting campaigns, skipping, removing campaigns, and campaign timeout action.
< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >
The GAI Coding Policy And Copyright Annotation Best Practices
Checklist before merging
Make sure to have followed the contributing guidelines before submitting.