alumni_lookup

Phase 19.9 — Signup Admin Dashboard, District Translation, Spam Guard

Status: Released as v1.0.67 (2026-07-09; interview complete same day; user approved proceeding without model handoff switch) Parent: Phase 19 README

Overview

With Champion Signup re-elevated and the Alumni Network de-elevated, this sub-phase:

  1. Unifies the Champion Signup email signature
  2. Translates signup zip codes into District/Region (persisted, backfilled)
  3. Adds a district location filter to the signups index
  4. Adds a honeypot spam guard to the public signup flow
  5. Builds a new sidebar-based Champion Signups admin dashboard at /champion_signups and restructures the navbar dropdown around it

No new tables. One new column on champion_signups.

Decisions (from planning interview, 2026-07-09)

Question Decision
Signature scope Champion Signup mailer emails only (welcome, profile link, admin notification). Portal Devise emails unchanged.
Honeypot behavior Silent fake success — hand-rolled hidden field + minimum-time trap, no gem. Bot sees normal success; no record, no email.
Dashboard home Own sidebar section at /champion_signups (new dashboard root). ChampionSignup queries stay out of champions/ (Cp::) namespace.
Navbar dropdown Alumni Network removed from dropdown entirely. Dropdown section becomes “Champion Signups” (Dashboard, Insights). Alumni Network admin reachable via link in the new signup sidebar.
Top locations widget Top districts (not regions), per user preference.

1. Email Signature

2. Zip → District/Region Translation

Schema: add_reference :champion_signups, :district, foreign_key: true, null: true

Model (ChampionSignup):

Backfill: migration (or rake task per launch-guide conventions) that loops signups with zip_code present and assigns district. Data check (2026-07-09): 158/236 signups have zip; all v1 street-address records also have zip_code populated — no address parsing needed. 78 records have no location data; they stay nil.

Display: wherever the index/show/dashboard shows “location” or “address”, lead with District — Region (e.g. “Nashville — Southeast”). Fallback when district is nil: City, ST if present, else raw zip, else em dash. Full street address (v1) demoted to secondary detail on the show page.

3. District Filter on Signups Index

4. Honeypot Spam Guard

Applies to Public::ChampionSignups#create (step 1) and #request_link (profile-link form).

5. Champion Signups Dashboard + Nav Restructure

Layout & Routes

Section Items
Overview Dashboard
Signups All Signups (count badge), Duplicates (badge when > 0)
Analytics Insights
Links Alumni Network Admin (→ /champions), Back to Alumni Lookup

Dashboard widgets (modeled on Alumni Network dashboard)

Explicitly Deferred

Acceptance Tests

What Was Implemented (2026-07-09)

  1. Signatureshared/email/_team_signature (html + text) rendered by all three signup mailer emails. Admin notification also gained a Location row (District — Region).
  2. District translationdistrict_id on champion_signups (migration backfills in-place), belongs_to :district, before_save :assign_district_from_zip (strips non-digits; self-heals nil districts on save; never overwrites v1 city/state), #region, #location_label. District has_many :champion_signups, dependent: :nullify.
  3. District filterdistrict-autocomplete + /api/districts on /champion_signups/all; controller matches Alumni.filter_by_district semantics (code or id; unknown → none). Location column/show/detail views lead with District — Region, falling back to city/state, then zip.
  4. HoneypotSignupHoneypot service (off-screen website field + signed form_ts min-time trap) on step 1 and profile-link forms. Trips respond with silent fake success (no record/email) and log [honeypot] with IP/UA.
  5. Dashboardlayouts/signup_admin + champion_signups/_sidebar (reuses champion-admin-sidebar Stimulus controller). index = dashboard (quick stats, recent signups, top districts, completion funnel, duplicates alert); list moved to all (stat cards removed; destroy/merge redirects updated). Navbar dropdown section renamed “Champion Signups” (Dashboard + Signup Insights); Alumni Network links removed from dropdown, reachable via sidebar “Alumni Network Admin”.
  6. Mobile optimization (added mid-phase by user request) — /champion_signups/all follows the /champions/champions/all pattern: sm:hidden tappable card list (name, v2/status/BUID/duplicate badges, location, date, mobile pagination) + hidden sm:block desktop table. Filters trimmed to Status/Role/District visible; Interest/Submitted/Affinity filters collapsed into a “More filters” disclosure (auto-open when active).

Deployment Notes

Spec Deviations