← Planning Hub

Checklist Status Links & Trail Life Connect Step

Two pieces built together on 2026-10-30 (branch worktree-gtl-checklist-status): a status-aware Trail Life Connect step on the sign-up checklist, and private no-login links that show a family their checklist progress.

Status: Hosting is on staging only. The checklist change works on staging now (it reads fields the nightly sync already writes). The status links need two new Cloud Functions and a rules change deployed (Brett’s OK) before they work for real. Until then, use the demo URLs below.

1. Status-aware Trail Life Connect step

The old step always sent people to TLC’s “add new adult” form, which is wrong if they already have an account. Now the wording follows the nightly TLC sync (rule in /tlc-step.js, mirrored in functions/tlc-step.js and the app’s Rules/TlcStep.swift):

  • Not started / unknown: Create TLC Account + Log In to TLC, “don’t make a second account”, and a pointer to “Forgot your password?”.
  • Parent on TLC, no son: any adult in the family has tlcStatus not_invited / pending / registered (or registeredAdult) → “Log In & Add Son”.
  • Son added, not finished: the Trailman has tlcProfileId, tlusaMemberNumber, a tlcConsentSigned value or tlcYouthFlags → chips for Registration fee (done = checklist.tlusaRegistration) and Consent waiver (done = tlcConsentSigned true and no waiver flag).
  • Done: membership current and no waiver flag → Done badge, member # and expiry.

The mockup’s “started but lost” state can’t be detected (TLC only lists people once they join our troop), so its advice is folded into the not-started wording. Every state notes the sync runs nightly. Preview on staging: /dashboard/checklist.html?tlcDemo=notstarted|nosonadded|unfinished|done.

2. No-login status links

  • Where: admin Sign-Up Status page (already grouped by family). Per family: Generate, Regenerate, Revoke, status / expiry / view count, Copy link, Text, Email, Copy text, Copy email. Plus “Bulk generate for everyone not done”.
  • Public page: /status/<token> → status.html. First names and done / not done per step only. Each “do this next” button goes through the real login (/login.html?redirect=…) or to TLC.
  • Token: 32 random bytes, base64url. Only the SHA-256 hash is stored in checklist_status_links (familyId, createdAt/By, expiresAt = 60 days, revokedAt, lastViewedAt, viewCount). The raw link is shown once; to copy it again later, Regenerate.
  • Sending: the site never texts or emails. Text / Email open the admin’s own Messages or Mail with the message filled in.
  • Demo: /status.html?demo=notstarted|nosonadded|unfinished|done|expired and /dashboard/admin-signup.html?demo=1 (staging / local only).

Deploy checklist (needs Brett)

  1. firebase deploy --only functions:manageChecklistStatusLink,functions:getChecklistStatus (new; shared with production).
  2. firebase deploy --only firestore:rules — adds a deny-all block for checklist_status_links (emulator-tested in tests/rules/checklist_status_links.test.mjs).
  3. Try a real link on staging, then merge and deploy hosting:production (the /status/** rewrite + headers are in firebase.json).

Messages

Text: “Hi Sarah! Here’s where your family is on Trail Life sign-up: <link> No login needed. Tap the next step to finish. – Grace Trail Life”

Email subject: Your Trail Life sign-up progress. The body (in status-links.js → emailMessage) explains the four steps, the “don’t make a second TLC account” note, the nightly sync, and that the link is just for the family and lasts 60 days.

Open questions

  • Should leaders (not just admins) be able to make links? Today it’s admins only.
  • 60 days enough? It’s one constant (DEFAULT_TTL_DAYS).
  • The test-rollout lock in checklist.css is untouched; the status page doesn’t use it.
Built 2026-10-30 · staging hosting only · functions + rules deploy pending