Skip to content

Admin changelist quick-wins + News thumbnail crash fix (#1346, Phase 1)#1347

Merged
jonfroehlich merged 1 commit into
masterfrom
1346-admin-changelist-quickwins
Jun 19, 2026
Merged

Admin changelist quick-wins + News thumbnail crash fix (#1346, Phase 1)#1347
jonfroehlich merged 1 commit into
masterfrom
1346-admin-changelist-quickwins

Conversation

@jonfroehlich

Copy link
Copy Markdown
Member

Phase 1 of #1346 (admin changelist audit; follow-up to #1082). Low-risk, config-level changes across the content admins, plus one bug fix. No model/migration changes, and admin pages aren't Pa11y-scanned.

Bug fix

  • NewsAdmin thumbnail could 500 the whole changelist. get_display_thumbnail had no exception guard, so a single corrupt/unreadable image (the column renders for every row) would crash the entire News list page. Now guarded — logs a warning and falls back to the No Thumbnail placeholder. Regression test added.

Findability (search / ordering / date navigation)

These admins previously had missing or weak search, no default sort, or no date drill-down:

  • Author/speaker search across the artifact family — Publication, Talk, Poster are now searchable by author name (via the shared ArtifactAdmin default); Publication also by book title + DOI.
  • New search boxes / broader search — News (headline + author), Keyword, ProjectUmbrella, Photo, Position, Project.
  • Fixed useless DateField string-searches — Poster was ['title','date']; Video and Grant dropped 'date'. Grant gained PI/Co-PI + sponsor search; Video gained project search.
  • Default ordering where none existed — Poster (-date), Project, ProjectUmbrella, Sponsor, Keyword.
  • date_hierarchy drill-down on the date-driven content admins — Publication, Talk, Poster, Video, Grant, Award, News.

Tests

New website/tests/test_admin_changelist.py — a regression test for the News thumbnail crash plus config assertions locking in the search/ordering/date_hierarchy additions. Full suite green locally (365 tests, inside the container with --settings=makeabilitylab.settings_test).

Deferred to later phases of #1346

N+1 query fixes on Project/Person (the 1,000+ query pages), list_prefetch_related on the artifact family, list_editable toggles, bulk actions, and Keyword cleanup tooling.

Screenshots

Admin changelist before/after (search box, date drill-down) — to be added.

🤖 Generated with Claude Code

…audit)

Phase 1 of an admin-listing-page audit (follow-up to #1082). Low-risk,
config-level improvements plus one bug fix; no query-shape changes.

Bug fix:
- NewsAdmin.get_display_thumbnail had no exception guard, so one corrupt
  or unreadable image would 500 the entire News changelist (the column
  renders for every row). Now guarded; logs and falls back to the
  "No Thumbnail" placeholder. Regression test added.

Findability (these admins previously had no/!weak search, ordering, or
date navigation):
- Author/speaker search across the artifact family: Publication, Talk,
  Poster all searchable by author name (via the shared ArtifactAdmin
  default); Publication also by book title + DOI.
- News searchable by headline + author; Keyword, ProjectUmbrella, Photo,
  Position, Project gained search boxes / broader search.
- Fixed useless DateField string-searching: Poster ['title','date'],
  Video and Grant dropped 'date'; Grant added PI/Co-PI + sponsor search,
  Video added project search.
- Added default ordering where none existed: Poster (-date), Project,
  ProjectUmbrella, Sponsor, Keyword.
- Added date_hierarchy drill-down to the date-driven content admins:
  Publication, Talk, Poster, Video, Grant, Award, News.

Deferred to later phases (per the audit): N+1 query fixes on Project/
Person changelists, list_editable toggles, bulk actions, Keyword cleanup
tooling.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jonfroehlich jonfroehlich merged commit cf6487c into master Jun 19, 2026
3 checks passed
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.

1 participant