Skip to content

[Bugfix:Notifications] Completed Semester => Term Refactor#12337

Merged
bmcutler merged 1 commit intomainfrom
mark-all-seen-fix
Jan 16, 2026
Merged

[Bugfix:Notifications] Completed Semester => Term Refactor#12337
bmcutler merged 1 commit intomainfrom
mark-all-seen-fix

Conversation

@JManion32
Copy link
Contributor

Why is this Change Important & Necessary?

In #12233, I made an effort to refactor the notifications system to use term instead of semester, to maintain consistency with the rest of the site. Unfortunately, I missed several files, resulting in each notification having an undefined term. As a result, markAllSeen(), which uses term to find the notifications to clear, was unable to update the page dynamically.

What is the New Behavior?

Convertedall instances of semester to term within the notification system.

What steps should a reviewer take to reproduce or test the bug or new feature?

On main:
Observe that markAllSeen works upon reload, but does not update the page dynamically. If you want to take it a step further, you can do console.log(n.term) inside of the function, and observe that it is always undefined.

On my branch:
Observer that markAllSeen, and all other functionality of the notifications UI is dynamic. n.term is now s26.

Automated Testing & Documentation

There is currently no complete E2E testing of the notification system (#11908). With the new user interface now complete, this will be my next priority.

Other information

This is not a breaking change.

The original PR, #12233, left this refactor incomplete, preventing dynamic mark all as seen.
@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.69%. Comparing base (e5a4d01) to head (519a57f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12337   +/-   ##
=========================================
  Coverage     21.69%   21.69%           
  Complexity     9617     9617           
=========================================
  Files           268      268           
  Lines         36115    36115           
  Branches        478      478           
=========================================
  Hits           7836     7836           
  Misses        27805    27805           
  Partials        474      474           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <12.50%> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 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.

Copy link
Contributor

@Rkoester47 Rkoester47 left a comment

Choose a reason for hiding this comment

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

The changes made by this branch appear to be successful. I tested in Firefox, and was able to reproduce the results described in the PR. On main, the act of 'Mark as Seen' does not refresh the page dynamically, and requires a manual refresh. However, on this branch, I was able to Mark as Seen and see that the page automatically refreshes, showing the notifications cleared as intended.

Good work!

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jan 16, 2026
@Eli-J-Schwartz
Copy link
Contributor

The changes appear to be successful for automatically updating notifications. On the original branch the notification list was not updated until the website was reloaded. On this PR's branch the notifications were removed as soon as 'Mark as Seen' was pressed. Looking at the code, there are a few variables named 'term' remaining. Do any of these need to be changed as well?

@JManion32
Copy link
Contributor Author

The changes appear to be successful for automatically updating notifications. On the original branch the notification list was not updated until the website was reloaded. On this PR's branch the notifications were removed as soon as 'Mark as Seen' was pressed. Looking at the code, there are a few variables named 'term' remaining. Do any of these need to be changed as well?

I'm assuming you mean semester here. This change is scoped to the notification system only. While a majority of Submitty uses term, unfortunately, other features (especially older ones), still use semester.

@bmcutler bmcutler merged commit d7e4c7f into main Jan 16, 2026
27 checks passed
@bmcutler bmcutler deleted the mark-all-seen-fix branch January 16, 2026 23:23
@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants