Skip to content

fix(attendance): render events-tab rows as links only when host_attendance_report is on (Issue 1106) - #1113

Merged
leahpeker merged 1 commit into
mainfrom
fix-attendance-events-tab-dead-link-1106
Jul 23, 2026
Merged

fix(attendance): render events-tab rows as links only when host_attendance_report is on (Issue 1106)#1113
leahpeker merged 1 commit into
mainfrom
fix-attendance-events-tab-dead-link-1106

Conversation

@leahpeker

Copy link
Copy Markdown
Collaborator

what & why

Closes #1106

The admin attendance events tab (/admin/attendance) is reachable whenever admin_attendance_analytics is on. But every events-tab row linked to /events/:id/report, a route gated by the separate host_attendance_report flag. The two flags are independent and can legitimately be analytics on / report off.

In that state, an admin clicking any event row was silently bounced to /calendarRequireFlag fail-closes with <Navigate to="/calendar" replace />. Confusing dead-link.

fix (Option A)

Only render an events-tab row as a link when host_attendance_report is 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 on useFlag(Feature.HostAttendanceReport). AttendanceReportScreen was the only unguarded caller — confirmed no other links to /report.

tests

  • Updated AttendanceReportScreen.test.tsx: flag mock is now key-aware, and two new cases assert (a) rows link to /events/:id/report when host_attendance_report is on, (b) rows render as plain text (no link) when it's off.
  • The e2e "known bug" probe lives on a separate branch/PR (test(attendance): e2e coverage for check-in report + admin analytics #1108 attendance-e2e, which also owns the attendance-analytics seed + fixture). It currently documents the buggy /calendar bounce and must flip once this merges: on the attendance-analytics scenario (host_attendance_report off), 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 — pass
  • make agent-frontend-lint — pass
  • make agent-frontend-test — 1003 passed, 1 skipped

…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
leahpeker marked this pull request as ready for review July 23, 2026 03:13
@leahpeker
leahpeker merged commit dc72dd8 into main Jul 23, 2026
3 checks passed
@leahpeker
leahpeker deleted the fix-attendance-events-tab-dead-link-1106 branch July 23, 2026 03:13
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.

Attendance: events-tab rows dead-link to /calendar when host_attendance_report flag is off

1 participant