Skip to content

Add admin account flow diagram page#1442

Merged
maebeale merged 18 commits intomainfrom
maebeale/admin-account-flow-diagram
Mar 28, 2026
Merged

Add admin account flow diagram page#1442
maebeale merged 18 commits intomainfrom
maebeale/admin-account-flow-diagram

Conversation

@maebeale
Copy link
Copy Markdown
Collaborator

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

  • Gives admins a visual reference for triaging the most common user account issues (invite, password reset, lockout, email change)
  • Based on analysis of 13 real support messages — the cheat sheet maps each complaint to the right admin action

How did you approach the change?

  • New admin-only page at /users/flow_diagram with Mermaid.js flowcharts for all 6 account flows
  • Interactive cheat sheet with 6 expandable cards matching common support messages to admin actions
  • New toggle-details Stimulus controller for expand/collapse all
  • Route, controller action, and policy scoped to admin users

UI Testing Checklist

  • Visit /users/flow_diagram as admin → verify all 6 Mermaid diagrams render
  • Click "Expand all" / "Collapse all" on cheat sheet → verify toggle works
  • Click each flow anchor link → verify smooth scroll to correct section
  • Visit as non-admin → verify access denied

Anything else to add?

🤖 Generated with Claude Code

@maebeale maebeale force-pushed the maebeale/admin-account-flow-diagram branch from b7a1777 to 5fc9e0e Compare March 27, 2026 16:33
@maebeale maebeale marked this pull request as ready for review March 27, 2026 16:52

<%# Triage cheat sheet %>
<div class="bg-white border border-gray-200 rounded-xl shadow-sm p-8 mb-6">
<div data-controller="toggle-details">
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

looks right, @jmilljr24 ?

@maebeale maebeale requested a review from jmilljr24 March 27, 2026 16:52
Copy link
Copy Markdown
Collaborator

@jmilljr24 jmilljr24 left a comment

Choose a reason for hiding this comment

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

@maebeale All makes sense to me. This should be super helpful for admins.

If I have this correct, because the welcome confirmation expires in 3 days, anyone from our initial reset that has not confirmed yet will need to contact an admin to get a new confirmation? There are 2400 unconfirmed users right now.

@jmilljr24
Copy link
Copy Markdown
Collaborator

@maebeale All makes sense to me. This should be super helpful for admins.

If I have this correct, because the welcome confirmation expires in 3 days, anyone from our initial reset that has not confirmed yet will need to contact an admin to get a new confirmation? There are 2400 unconfirmed users right now.

I could be mixing the welcome(30) vs regular confirm (3) but I don't know if they are both in play for the initial welcome we did.

maebeale and others added 17 commits March 28, 2026 08:48
Visual reference for admins triaging user account issues — covers
invite, resend, password reset, email change, lockout, and unlock
flows with an interactive cheat sheet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Avoids Turbo frame refresh hiding the link.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Matches the card layout pattern used on other admin pages like visits.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Flow 1: Add missing welcome token expiry decision diamond after
  confirmation — shows redirect to password reset when token expired
- Cheat sheet card 6: Fix lock icon incorrectly described as
  "unconfirmed" — lock means locked, clock means unconfirmed
- Fix fa fa-check-circle → fa-solid fa-check-circle (4 occurrences)
- Add Font Awesome icons to all flowchart nodes for visual scanning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
User already received the email so Invite button scenario doesn't apply.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove lock icon subcard from "I can sign in but nothing works" —
locked users can't sign in, so that scenario belongs in "I'm locked
out" card only. Also standardize Access column label text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Covers the edge case where a user confirmed their email but the
welcome token expired before they set a password. Admin fix: send
a password reset email.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix hover text to "(hover on index for details)"
- Remove Invite button reference from clock icon subcards (mutually exclusive)
- Simplify locked account and password reset card text
- Reorder "No lock icon" options: ban, clock, then forgot password
- Make reset/forgot password actions single-line paragraphs
- Add "each new reset invalidates previous links" note

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Confirmation links: 3 days → no expiry
- Welcome tokens: 30 days → no expiry
- Reset links: 6 hours → 7 days
- Combine "I forgot my password" and "My reset link expired" cards
- Add "I changed my email but can't log in" card for flow 4
- Add legacy note to "confirmed but no password" card
- Update all flow diagrams to match new timeout values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/admin-account-flow-diagram branch from 3ca6fdc to b64d737 Compare March 28, 2026 12:53
- Combine "I forgot my password" and "My reset link expired" cards
- Add "I changed my email" card for flow 4
- Add legacy note to "confirmed but can't sign in" card
- Swap card 5/6 order
- Update all timeouts: confirmation/welcome no expiry, reset 7 days
- Fix flow 2: clickable link to flow 1, better "No" label
- Various text refinements across cards

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@maebeale
Copy link
Copy Markdown
Collaborator Author

@jmilljr24 i updated this to latest expirations and flows.

@maebeale maebeale merged commit 5112f08 into main Mar 28, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/admin-account-flow-diagram branch March 28, 2026 13:19
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