fix(attendance): render events-tab rows as links only when host_attendance_report is on (Issue 1106) - #1113
Merged
Conversation
…dance_report is on (Issue 1106) The admin attendance events tab is reachable via admin_attendance_analytics, but each row linked to /events/:id/report, which is gated by the separate host_attendance_report flag. With only analytics enabled, clicking a row silently bounced the admin to /calendar via RequireFlag. Gate the row link on host_attendance_report (matching EventDetailKebabMenu): when it's off, render the row as plain, non-clickable text instead of a link.
leahpeker
marked this pull request as ready for review
July 23, 2026 03:13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what & why
Closes #1106
The admin attendance events tab (
/admin/attendance) is reachable wheneveradmin_attendance_analyticsis on. But every events-tab row linked to/events/:id/report, a route gated by the separatehost_attendance_reportflag. The two flags are independent and can legitimately beanalytics on / report off.In that state, an admin clicking any event row was silently bounced to
/calendar—RequireFlagfail-closes with<Navigate to="/calendar" replace />. Confusing dead-link.fix (Option A)
Only render an events-tab row as a link when
host_attendance_reportis also on. Otherwise render the row as plain, non-clickable text (same layout, minus the hover/link affordance). The per-event report stays strictly behind its own flag.This matches the existing correct pattern in
EventDetailKebabMenu.tsx, which already gates its "check-in report" link onuseFlag(Feature.HostAttendanceReport).AttendanceReportScreenwas the only unguarded caller — confirmed no other links to/report.tests
AttendanceReportScreen.test.tsx: flag mock is now key-aware, and two new cases assert (a) rows link to/events/:id/reportwhenhost_attendance_reportis on, (b) rows render as plain text (no link) when it's off.attendance-e2e, which also owns theattendance-analyticsseed + fixture). It currently documents the buggy/calendarbounce and must flip once this merges: on theattendance-analyticsscenario (host_attendance_reportoff), assert the row is not a link (a[href*="/report"]absent) and interacting does not navigate to/calendar. Not changed here to keep this PR self-contained and avoid tangling with test(attendance): e2e coverage for check-in report + admin analytics #1108.local checks
make agent-frontend-typecheck— passmake agent-frontend-lint— passmake agent-frontend-test— 1003 passed, 1 skipped