You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The former Report summary was inefficient. It
calculated statistics for every degree period on
each dashboard request. Some calculations loaded
thesis records into memory and made additional
queries per thesis. This approach quickly became
unsustainable.
As a stopgap, we reduced the Report index to a
list of links to each individual report. However,
stakeholders suggested that it would be useful
to provide a summary of the most recent terms.
Restores the five summary tables, showing the latest four degree periods containing thesis
records.
Moves summary counts into SQL to avoid loading ActiveRecord objects into memory.
Adds a theses.grad_date index, created concurrently on PostgreSQL to avoid blocking
writes.
I ran a smoke test locally using a copy of the
prod db. The test made 30 requests each to the
Report index page at 1, 3, and 5 concurrent
requests. All 90 requests were successful, with
median response times ranging from 132ms to 319ms.
Side effects of this change:
Local testing results are encouraging, but we
don't yet know how this will perform in
production.
Developer
Accessibility
ANDI or WAVE has been run in accordance to our guide.
This PR contains no changes to the view layer.
New issues flagged by ANDI or WAVE have been resolved.
New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
No new accessibility issues have been flagged.
New ENV
All new ENV is documented in README.
All new ENV has been added to Heroku Pipeline, Staging and Prod.
ENV has not changed.
Approval beyond code review
UXWS/stakeholder approval has been confirmed.
UXWS/stakeholder review will be completed retroactively.
UXWS/stakeholder review is not needed.
Additional context needed to review
E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.
Code Reviewer
Code
I have confirmed that the code works as intended.
Any CodeClimate issues have been fixed or confirmed as
added technical debt.
Documentation
The commit message is clear and follows our guidelines
(not just this pull request message).
The documentation has been updated or is unnecessary.
New dependencies are appropriate or there were no changes.
Testing
There are appropriate tests covering any new functionality.
Why these changes are being introduced:
The former Report summary was inefficient. It
calculated statistics for every degree period on
each dashboard request. Some calculations loaded
thesis records into memory and made additional
queries per thesis. This approach quickly became
unsustainable.
As a stopgap, we reduced the Report index to a
list of links to each individual report. However,
stakeholders suggested that it would be useful
to provide a summary of the most recent terms.
Relevant ticket(s):
- [ETD-706](https://mitlibraries.atlassian.net/browse/ETD-706)
How this addresses that need:
- Restores the five summary tables, showing the
latest four degree periods containing thesis
records.
- Moves summary counts into SQL to avoid loading
ActiveRecord objects into memory.
- Adds a theses.grad_date index, created
concurrently on PostgreSQL to avoid blocking
writes.
I ran a smoke test locally using a copy of the
prod db. The test made 30 requests each to the
Report index page at 1, 3, and 5 concurrent
requests. All 90 requests were successful, with
median response times ranging from 132ms to 319ms.
Side effects of this change:
Local testing results are encouraging, but we
don't yet know how this will perform in
production.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Existing dashboard tests could pass with no student contributions, so regression coverage is needed for positive per-term counts, repeated-edit deduplication, and exclusion of staff/admin, registrar, and out-of-term contributions.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The remaining report submenu checks the wrong permission name, leaving authorized processors without a dashboard link to “Theses submitted by students” after the reports list is removed.
Use the plural permission for the student theses submenu link
app/views/report/index.html.erb:9
Removing the available-reports list leaves processors without a dashboard link to “Theses submitted by students,” even though they remain authorized to access it. The remaining link in app/views/shared/_report_submenu.html.erb:14 checks :student_submitted_thesis (singular), but Ability#processor grants :student_submitted_theses (plural). Change that submenu check to the plural permission so processors retain access through the dashboard navigation.
The reason will be displayed to describe this comment to others. Learn more.
Approving with the assumption that only stakeholders can fully confirm this does what they need in production and adjustments will be made if anything is inaccurate or slow.
@JPrevost Yeah, the next steps for me are to promote, then solicit feedback from Mikki and Wilder. I suspect it might be a while before we identify any potential problems, but it's a low-risk feature.
thesis-submit-pr-1544—5b041cb0
Deployed
Nov 3, 2026 by
jazairi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why these changes are being introduced:
The former Report summary was inefficient. It
calculated statistics for every degree period on
each dashboard request. Some calculations loaded
thesis records into memory and made additional
queries per thesis. This approach quickly became
unsustainable.
As a stopgap, we reduced the Report index to a
list of links to each individual report. However,
stakeholders suggested that it would be useful
to provide a summary of the most recent terms.
Relevant ticket(s):
How this addresses that need:
records.
writes.
I ran a smoke test locally using a copy of the
prod db. The test made 30 requests each to the
Report index page at 1, 3, and 5 concurrent
requests. All 90 requests were successful, with
median response times ranging from 132ms to 319ms.
Side effects of this change:
Local testing results are encouraging, but we
don't yet know how this will perform in
production.
Developer
Accessibility
New ENV
Approval beyond code review
Additional context needed to review
E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.
Code Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing