Skip to content

Add bulk "Send login invites" mode to the reminders flow - #2168

Merged
maebeale merged 10 commits into
mainfrom
maebeale/honiara
Aug 12, 2026
Merged

Add bulk "Send login invites" mode to the reminders flow#2168
maebeale merged 10 commits into
mainfrom
maebeale/honiara

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 contained logic reusing the reminders flow via a mode branch; new one-person invite service

What is the goal of this PR and why is this important?

  • Staff had no bulk way to invite registrants who have no portal account yet — only a per-user "send welcome instructions" action and a console-only BulkInviteService.
  • This adds a "Send login invites" entry to the event Bulk actions menu that reuses the existing bulk-reminders recipient picker.

How did you approach the change?

  • Threaded a mode=invite param through preview_reminderconfirm_remindersend_reminder rather than building a parallel page, so recipient filtering, the checkbox picker, and the confirm interstitial are all reused.
  • In invite mode:
    • The recipient list is restricted to registrants whose person has no user.
    • The email is the fixed portal welcome/confirmation email — the subject/message editors are hidden and the admin only gets a read-only preview.
    • Sending creates an account for anyone without one, then delivers the invite, attributed to the admin.
  • New PersonInviter service encapsulates "create a user if needed + send the welcome email" (mirrors the steps in ProcessConfirmation); skips people who already have a confirmed account.
  • DeviseMailer#confirmation_instructions gained a preview: flag so rendering the on-page preview doesn't log a notification or emit an auth event.

Anything else to add?

  • No new routes or page views — reuses the reminder actions/views, so page_bg_class mappings are unchanged.
  • Invite mode intentionally sends no admin FYI (the reminder path does); each welcome email already logs its own communication record.
  • Specs: spec/services/person_inviter_spec.rb, spec/requests/events/bulk_invites_spec.rb.

Copilot AI lite review requested due to automatic review settings August 11, 2026 15:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 11, 2026 15:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 11, 2026 15:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 11, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings August 11, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

S Mae Beale and others added 5 commits August 11, 2026 21:18
Staff need a way to bulk-invite registrants who have no portal account yet.
The reminders picker already handles recipient selection, filtering, and a
confirm interstitial, so this reuses it via a mode=invite branch instead of a
parallel page. In invite mode the recipient list is restricted to registrants
with no user, the email is the fixed portal welcome/confirmation email (admins
preview it but can't edit a subject/message), and sending creates an account for
anyone without one before delivering the invite.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Invite mode was only reachable from the Bulk actions menu; add a reciprocal
toggle link so admins can switch between sending a bulk email and sending login
invites without leaving the page.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The lock icon in the invite-email notice inherited the base font size, dwarfing
the small notice text; scope the sizing to the box. Turn the bulk-email/invite
mode toggle into an outline button with a jump-link icon so it reads as a
navigation action rather than inline text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nner

Relabel the feature from "login invites" to "portal invite (confirmation)
emails" everywhere it's surfaced. Replace the long mode-toggle button with an
explanatory banner row above the recipients that says what the page does and
offers the other mode as a plain inline link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Page title/menu become "Send Portal invite emails" (drop the parenthetical);
capitalize "Portal" as the product name in the banner, notice, and description.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 01:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale
maebeale marked this pull request as ready for review August 12, 2026 01:48
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 01:49

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

FontAwesome webfont icons rendered high with items-center/items-start;
baseline alignment lines the glyph up with the text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 01:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

"No account" people have never been sent an invite, and "Invited" means the
welcome email already went out — relabel to "Not invited yet" / "Already
invited" so the User account filter reads as an invite lifecycle. Same values
and scope; CSV export label kept in sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 01:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…te bucket

"No account" (no user at all) is distinct from an account that was never sent an
invite (no_access): keep both. User account filter is now No account / Not
invited yet / Already invited / Has access; CSV export kept in sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 01:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Relabel "Already invited" back to "Invited" and restore the "No access" option,
and add a "Not invited yet" umbrella that matches everyone who still needs an
invite (no account at all, or an account never sent a welcome invite = none ∪
no_access) via a new account_status scope value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 12, 2026 02:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale
maebeale merged commit 909719e into main Aug 12, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/honiara branch August 12, 2026 02:10
maebeale added a commit that referenced this pull request Aug 12, 2026
Counts active registrants with no portal account yet and links to the reminders
flow's bulk invite mode (mode=invite), which #2168 added.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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