Skip to content

wave: admin tool to push Intercom wave segments#1907

Open
jtourkos wants to merge 1 commit into
mainfrom
feat/admin-intercom-wave-segments
Open

wave: admin tool to push Intercom wave segments#1907
jtourkos wants to merge 1 commit into
mainfrom
feat/admin-intercom-wave-segments

Conversation

@jtourkos
Copy link
Copy Markdown
Collaborator

Summary

  • New admin page at /wave/admin/intercom-wave-segments gated on the pushIntercomSegments permission.
  • Wave Program → Wave cascade dropdowns (same pattern as Adjust Points). Submit fires a confirmation modal, then POSTs to the new wave backend endpoint, which enqueues a background tagging job.
  • Adds a corresponding capability card to the admin dashboard, also gated on pushIntercomSegments.

Backend

Depends on the wave-side endpoint + permission introduced in drips-network/wave#583.

Test plan

  • Local: account with pushIntercomSegments sees the card on /wave/admin and can open the page
  • Local: account without pushIntercomSegments is redirected from the page to /wave/admin and does not see the card
  • Local: submit enqueues a job on the wave backend (verify outbox_messages row appears as pending, then completes)
  • Local: confirmation modal appears before submit; cancelling does not enqueue
  • Lint / prettier / svelte-check clean on the changed files

Copy link
Copy Markdown
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

Adds a new Wave admin tool to enqueue an Intercom wave-segmentation/tagging job, exposed via a permission-gated admin capability card and a new admin page with Wave Program → Wave selection and confirmation-before-submit flow.

Changes:

  • Added /wave/admin/intercom-wave-segments page (load + UI) gated by pushIntercomSegments.
  • Added Wave API helper to POST the “push intercom segments” admin request.
  • Added a new capability card on the Wave admin dashboard, also gated by pushIntercomSegments.

Reviewed changes

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

File Description
src/routes/(pages)/wave/(base-layout)/admin/intercom-wave-segments/+page.ts Adds permission gate + preloads wave programs and waves for the dropdowns.
src/routes/(pages)/wave/(base-layout)/admin/intercom-wave-segments/+page.svelte Implements the UI + confirmation + submit flow to enqueue the tagging job.
src/routes/(pages)/wave/(base-layout)/admin/+page.svelte Adds a new admin dashboard capability card for the Intercom segments tool.
src/lib/utils/wave/admin/intercom-segments.ts Adds the Wave API call wrapper for enqueuing the Intercom segment push.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/utils/wave/admin/intercom-segments.ts
@jtourkos jtourkos marked this pull request as ready for review May 26, 2026 08:07
@jtourkos jtourkos requested a review from efstajas May 26, 2026 08:22
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.

2 participants