Skip to content

Add page to display cohort derived collections - #1595

Merged
danlamanna merged 1 commit into
masterfrom
add-derived-collections-page
Sep 7, 2026
Merged

danlamanna merged 1 commit into
masterfrom
add-derived-collections-page

Conversation

@danlamanna

@danlamanna danlamanna commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Staff users can filter collections by cohort to view only derived collections.
    • Added a “View Derived Collections” action to cohort menus.
    • Added a “Show all collections” link to clear the cohort filter and return to the full collection list.

@danlamanna
danlamanna enabled auto-merge September 7, 2026 20:58
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: d30a4438-6b98-42e4-94ab-1d053a31263c

📥 Commits

Reviewing files that changed from the base of the PR and between 066ad6b and 592edd7.

📒 Files selected for processing (5)
  • isic/core/templates/core/collection_list.html
  • isic/core/tests/test_collection_list_browser.py
  • isic/core/views/collections.py
  • isic/ingest/models/cohort.py
  • isic/ingest/templates/ingest/partials/cohort_actions.html

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Adds staff-only cohort filtering to the collection list. Cohort actions now link to filtered collections. The template shows the active cohort and can clear the filter. Browser coverage validates filtered, unfiltered, and non-staff behavior.

Changes

Cohort collection filtering

Layer / File(s) Summary
Cohort collection entry
isic/ingest/models/cohort.py, isic/ingest/templates/ingest/partials/cohort_actions.html
Adds a URL for cohort-derived collections and exposes it through the cohort actions menu.
Staff cohort filtering
isic/core/views/collections.py
Resolves the numeric cohort parameter for staff users, filters collections through cohort images, and passes the selected cohort to the template.
Filtered list presentation and validation
isic/core/templates/core/collection_list.html, isic/core/tests/test_collection_list_browser.py
Displays the active cohort, provides a link to show all collections, and tests staff and non-staff filtering behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 592ed

Staff can view collections derived from a selected cohort and return to the full collection list, while non-staff requests ignore the cohort filter. The change has focused browser coverage and no remaining merge-blocking risk is identified.

Sequence Diagram(s)

sequenceDiagram
  participant StaffUser
  participant CohortActions
  participant CollectionView
  participant CollectionTemplate
  StaffUser->>CohortActions: select View Derived Collections
  CohortActions->>CollectionView: request with cohort and magic_filter
  CollectionView->>CollectionTemplate: render filtered collections and cohort
  CollectionTemplate-->>StaffUser: show derived collections and Show all collections
Loading

Suggested reviewers: brianhelba

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a page to display collections derived from a cohort.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 3 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-derived-collections-page

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@danlamanna
danlamanna merged commit 27ba336 into master Sep 7, 2026
2 of 3 checks passed
@danlamanna
danlamanna deleted the add-derived-collections-page branch September 7, 2026 21:03
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