Skip to content

🪣Müsli bucket, slice 0: Rework the finalization process#1104

Open
fosterfarrell9 wants to merge 41 commits into
nextfrom
feature/finalization-reworked
Open

🪣Müsli bucket, slice 0: Rework the finalization process#1104
fosterfarrell9 wants to merge 41 commits into
nextfrom
feature/finalization-reworked

Conversation

@fosterfarrell9
Copy link
Copy Markdown
Collaborator

@fosterfarrell9 fosterfarrell9 commented Apr 30, 2026

This PR closes a larger architectural gap that was left in #1052 and whose extent became only clear to me when I implemented student performance policies in #1084. The problem is that the old workflow mixed separate things like eligibility checking and allocation/finalization. In practice this meant that students who clearly failed a policy and shouldn't even be considered for free seats were actually allowed to get one, with the "violator dashboard" being the one step that prevented them from getting a seat - and where the teacher had to choose between just giving them a seat or completely hard-deleting their registration (with no trace left for either side what happened). The PR introduces a dedicated screening step before allocation/finalization that classifies outcomes as pass, auto_reject, or blocker. The last one is necessary for situations where data are missing for policy evaluation like missing certificates for student performances. In the new solution, only blockers are being brought to the teachers attention in the finalization process, registrations with auto_reject are automatically rejected, but they are stored, together with their rejection reason. In post-finalization, teachers can clearly distinguish rejected students from merely unassigned ones, inspect the reason, and still manually override by adding them if needed.

In the process of implementing this PR, I got more and more annoyed at the very colorful design of buttons, alerts etc in the allocation and finalization process, so that I finally decided to make the design are little more muted (see the screenshots below). I think this now fits a lot better with the general design in the groups tab.

Since this is slice 0 of the old muesli-bowl and in there the rake tasks providing stuff to play around in the GUI with became a little chaotic, I restructured the whole demo task business. The demo workflow now uses four clearly named tasks:

  • demo:flags enables the feature flags needed for the current slice.
  • demo:campaigns prepares the reusable campaign examples.
  • demo:rosters prepares roster-related demo data (without the need to manually finalize campaigns)
  • demo:setup runs the full setup for the current slice.

This gives the demo setup a clearer structure and makes it easier to run exactly the part you need, while keeping the overall workflow consistent as more Muesli features are added in later slices.

Note for the reviewer: In order to get a good feeling of how it works, just run the demo:setup task and finalize all campaigns that this provides (two for Linear Algebra 2 and three for the Campaign Test Seminar).

Implementation notes
  • Added policy screening via Registration::ScreeningService and integrated it into allocation/finalization (block on blockers, auto-reject deterministic violators).
  • Persisted rejection decisions with additional columns on on Registration::UserRegistration (reason fields + timestamps) and track allocation decisions with the new column allocation_decided_at on Registration::Campaign.
Below are a few screenshots
  • Revised color scheme:
Screenshot 2026-05-02 134242
  • Finalization auto-reject preview:
Screenshot 2026-05-02 161311
  • flash message after finalization contains info on the number of rejected/unassigned students (if existent)
Screenshot 2026-05-02 134315
  • new color scheme again:
Screenshot 2026-05-02 134329
  • new color scheme, also note that the presentation logic for the counts (wording, given numbers) is now more coherent
Screenshot 2026-05-02 134339
  • campaign dissolved pill now also contains info on rejected students (due to policy vioplations)
Screenshot 2026-05-02 134351
  • rejected students get their own sidepanel
Screenshot 2026-05-02 134405
  • rejected students are now also given (as a number) and in a table with rejection reason
Screenshot 2026-05-02 134510

fosterfarrell9 and others added 11 commits April 30, 2026 05:27
… logic

Co-authored-by: Copilot <copilot@github.com>
… for rejection reasons

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ove localization, and enhance UI for unassigned and rejected candidates

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ion reasons, and update UI components

Co-authored-by: Copilot <copilot@github.com>
…tion logic, enhance UI, and improve localization

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
…ent and update related components and specs

Co-authored-by: Copilot <copilot@github.com>
@coderabbitai

This comment was marked as outdated.

@fosterfarrell9 fosterfarrell9 changed the title Rework the finalization Process Rework the finalization process Apr 30, 2026
coderabbitai[bot]

This comment was marked as outdated.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 49.35401% with 392 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.43%. Comparing base (4c75cda) to head (fc73171).
⚠️ Report is 19 commits behind head on next.

Files with missing lines Patch % Lines
lib/demo/campaign_setup_support.rb 7.44% 261 Missing ⚠️
lib/demo/setup_support.rb 22.75% 112 Missing ⚠️
app/helpers/application_helper.rb 42.85% 4 Missing ⚠️
lib/demo/quiet_logging_support.rb 50.00% 4 Missing ⚠️
...lers/registration/user_registrations_controller.rb 87.50% 2 Missing ⚠️
app/models/registration/allocation_dashboard.rb 93.75% 2 Missing ⚠️
app/models/registration/screening_service.rb 96.22% 2 Missing ⚠️
...controllers/registration/allocations_controller.rb 94.11% 1 Missing ⚠️
...d/roster/components/roster_side_panel_component.rb 97.56% 1 Missing ⚠️
app/models/registration/campaign.rb 97.87% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1104      +/-   ##
==========================================
+ Coverage   63.97%   64.43%   +0.46%     
==========================================
  Files         415      424       +9     
  Lines       13492    14247     +755     
==========================================
+ Hits         8631     9180     +549     
- Misses       4861     5067     +206     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-authored-by: Copilot <copilot@github.com>
coderabbitai[bot]

This comment was marked as outdated.

Co-authored-by: Copilot <copilot@github.com>
@fosterfarrell9 fosterfarrell9 changed the title Rework the finalization process Müsli bucket, slice 0: Rework the finalization process May 11, 2026
@fosterfarrell9 fosterfarrell9 changed the title Müsli bucket, slice 0: Rework the finalization process 🪣Müsli bucket, slice 0: Rework the finalization process May 14, 2026
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.

2 participants