Skip to content

Add Kolibri-usage filters and CSV export to admin Users page#5922

Merged
marcellamaki merged 1 commit into
learningequality:hotfixesfrom
rtibbles:get_laura_the_deets_stat
May 27, 2026
Merged

Add Kolibri-usage filters and CSV export to admin Users page#5922
marcellamaki merged 1 commit into
learningequality:hotfixesfrom
rtibbles:get_laura_the_deets_stat

Conversation

@rtibbles
Copy link
Copy Markdown
Member

Summary

Adds a Download CSV action on the admin Users page so Laura can pull user emails for outreach. Adds four filters for likely-Kolibri-usage signals: published a channel, made Studio edits, joined recently, active recently. CSV includes email, basic activity, and registration info (locations, storage needed, source).

State Screenshot
Default view with new filter row Default
Two new checkbox filters applied Filtered
Download CSV disabled when count is 0 Disabled

References

Slack thread with Laura on Studio activity signals that correlate with Kolibri usage.

Reviewer guidance

How to test:

  • /administration/users: toggle the new filters and confirm counts narrow (they AND with the existing filters).
  • Click Download CSV with no filter → snackbar says "No filters applied"; no download.
  • Apply a filter, click Download CSV → file downloads as studio_users_<YYYY-MM-DD>.csv. Verify Locations / Heard from / Yes-No columns.
  • Filter to 0 results → button is disabled.

Worth a closer look:

  • viewsets/user.pyAdminUserCSVFilter(AdminUserFilter, RequiredFilterSet) MRO; required-filter enforcement comes from RequiredFiltersFilterBackend recognising detail=False.
  • Load-tested at 30k users / 17k channels: all scenarios <1s.

AI usage

Used Claude Code (Superpowers) to brainstorm the design and implement the changes. The spec, plan, and code were reviewed at each step; backend + frontend tests, a load test at 30k users / 17k channels, and a manual browser smoke-test all pass.

@rtibbles rtibbles marked this pull request as ready for review May 25, 2026 23:58
@marcellamaki marcellamaki added this to the Studio: Patch Releases milestone May 26, 2026
Adds four new filters to the admin Users page based on signals of likely
Kolibri usage (Slack conversation with Laura): published a channel,
made Studio edits, joined recently, active recently. Adds a Download CSV
action that streams the filtered user list as CSV, including registration
information (locations, storage needed, source).

Backend filters share Exists() expressions between AdminUserFilter and the
CSV action's annotate() call. The CSV endpoint uses AdminUserCSVFilter
(a RequiredFilterSet subclass) so unfiltered exports return 412.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rtibbles rtibbles force-pushed the get_laura_the_deets_stat branch from 7969d66 to e0102a7 Compare May 27, 2026 16:26
Copy link
Copy Markdown
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

All workflows described confirmed in manual testing. Code review looks good.

@marcellamaki marcellamaki merged commit 30a0bf1 into learningequality:hotfixes May 27, 2026
13 checks passed
@pcenov
Copy link
Copy Markdown
Member

pcenov commented May 28, 2026

Implemented as specified, have filed a follow-up for some minor issues: #5946

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.

3 participants