feat(talkx): TalkXCampaignScheduled — view dedicada campanhas agendadas (launch/edit/cancel) - #352
feat(talkx): TalkXCampaignScheduled — view dedicada campanhas agendadas (launch/edit/cancel)#352adm01-debug wants to merge 3 commits into
Conversation
…aunch/editar/cancelar) + topView=scheduled em TalkXView
ECC Tools / Security EvidenceCommit: Security evidence gate passed (success) No security-sensitive scanner-evidence gap detected. Mode: enforce Scanned 2 changed file(s). No missing scanner-evidence signal was detected. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 1 PR taxonomy bucket(s): CI/CD Recommendation. Scanned 2 changed file(s). Roadmap taxonomy buckets: CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
adm01-debug has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 2 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 2 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
|
Warning Review limit reachedNext included review available in 48 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 84 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (3)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bcf1a3c11
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| try { | ||
| await updateCampaign.mutateAsync({ | ||
| id: campaign.id, | ||
| scheduled_at: localInputToISO(localDate), |
There was a problem hiding this comment.
Honor the selected timezone when saving
When the operator selects a timezone different from the browser timezone, localInputToISO still parses the value in the browser's local zone, and localTz never participates in the conversion. For example, choosing America/New_York from a browser in São Paulo stores 10:00 as São Paulo time rather than New York time, so the scheduler launches the campaign at the wrong instant. Convert the input using localTz, as the existing wizard does.
Useful? React with 👍 / 👎.
| <PrimaryButton icon={Play} onClick={() => setLaunchOpen(true)} className="shadow-[var(--shadow-glow-primary)]"> | ||
| {launching ? 'Iniciando…' : 'Iniciar agora'} |
There was a problem hiding this comment.
Disable launching while a dispatch is in flight
While launching is true, this PrimaryButton remains enabled and handleLaunch has no re-entry guard. Because startCampaign remains pending for the full send loop, the user can reopen the confirmation and start a second invocation; talkx-send selects recipients whose status is either pending or sending, so the concurrent runs can send duplicate WhatsApp messages to the same contacts. Block this action for the duration of the first launch.
Useful? React with 👍 / 👎.
ECC Tools / Security EvidenceCommit: Security evidence gate passed (success) No security-sensitive scanner-evidence gap detected. Mode: enforce Scanned 2 changed file(s). No missing scanner-evidence signal was detected. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 1 PR taxonomy bucket(s): CI/CD Recommendation. Scanned 2 changed file(s). Roadmap taxonomy buckets: CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 2 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 2 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
There was a problem hiding this comment.
adm01-debug has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
ECC Tools / Security EvidenceCommit: Security evidence gate passed (success) No security-sensitive scanner-evidence gap detected. Mode: enforce Scanned 3 changed file(s). No missing scanner-evidence signal was detected. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / PR Risk TaxonomyCommit: PR taxonomy review recommended (neutral) Detected 1 PR taxonomy bucket(s): CI/CD Recommendation. Scanned 3 changed file(s). Roadmap taxonomy buckets: CI/CD RecommendationCI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work. Signals:
Paths:
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
ECC Tools / Reference Set ReadinessCommit: Reference set readiness gaps detected (neutral) Reference evidence present for 0/7 areas (0%) across 3 changed file(s). This check is based on files changed in this PR. Repository-level readiness is still reported by
Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
There was a problem hiding this comment.
adm01-debug has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
ECC Tools / Hosted Promotion ReadinessCommit: Hosted promotion readiness passed (success) No hosted promotion evidence gaps detected across 3 changed file(s); 0 corpus scenarios had matching evidence. This check compares PR file changes against the evaluator/RAG promotion corpus in No evaluator corpus scenarios matched this PR. Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34e9a45893
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const calDate = localDate ? new Date(localDate) : undefined; | ||
|
|
||
| const handleSave = useCallback(async () => { | ||
| if (!localDate) { toast.error('Defina a data e hora do agendamento.'); return; } |
There was a problem hiding this comment.
Reject past reschedule times before saving
When an operator selects an earlier day through the calendar or types a past time, this validation accepts it because it only checks for a nonempty value. The min attribute does not enforce validity here because PrimaryButton is a type="button" and no form submission or checkValidity() occurs. The saved campaign remains scheduled, so talkx-scheduler immediately selects it via .lte("scheduled_at", now) and can start an irreversible broadcast; compare the parsed instant against the current time before updating.
Useful? React with 👍 / 👎.
| useEffect(() => { | ||
| if (campaign && campaign.status !== 'scheduled') onLaunch(campaign.id); |
There was a problem hiding this comment.
Route non-launch status changes back to the list
When another operator or browser tab cancels the campaign or reverts it to draft while this view is open, the new guard treats that status change as a successful launch and calls onLaunch, opening TalkXLiveMonitor. That monitor considers a draft unfinished, exposes a misleading Cancel action, and labels its health as concluded; only sending/completed transitions should enter the monitor, while draft/cancelled transitions should return to the campaign list.
Useful? React with 👍 / 👎.
TalkXCampaignScheduled — view dedicada para campanhas agendadas\n\n###
TalkXCampaignScheduled.tsx(new, 343 linhas)\nView acionada ao clicar em uma campanha comstatus === 'scheduled'. Inclui:\n- Rail de metadados: data de início, fuso horário, velocidade, duração estimada, destinatários\n- Preview da mensagem em formato WhatsApp Bubble\n- Edição inline da data/hora de agendamento (calendar picker + select de fuso)\n- Ações: Lançar agora, Cancelar agendamento, Voltar\n- Confirmação viaAlertDialogantes de lançar ou cancelar\n- Toast de feedback para cada ação\n\n###TalkXView.tsx(diff)\n-TalkXTopView='tabs' | 'wizard' | 'monitor' | 'scheduled'\n-openScheduled(c: TalkXCampaign)→setScheduledCampaign(c); setTopView('scheduled')\n- Branch condicional que renderiza<TalkXCampaignScheduled />quandotopView === 'scheduled'\n-TalkXOverviewrecebeonViewScheduled={openScheduled}(prop já tipada mas entrypoint a conectar no Overview)\n\n### Gates: TSC 0 · Ratchet 0 novas · manifest OK (65 funções)Summary by cubic
Adiciona uma view dedicada para campanhas agendadas do Talk X, com edição de data/hora, fuso, janela de envio e horário comercial, além de iniciar agora e cancelar o agendamento. Clicar em uma campanha com
status === 'scheduled'abre essa view, e o dropdown do overview agora mostra "Ver agendamento" para essas campanhas.status === 'draft'e volta para a lista.Written for commit 34e9a45. Summary will update on new commits.