Skip to content

[Bugfix:Notifications] Post Preview for Forum Emails#12277

Merged
bmcutler merged 6 commits intomainfrom
fix-forum-reply-email
Jan 27, 2026
Merged

[Bugfix:Notifications] Post Preview for Forum Emails#12277
bmcutler merged 6 commits intomainfrom
fix-forum-reply-email

Conversation

@Rkoester47
Copy link
Contributor

Why is this Change Important & Necessary?

Fixes #12276
Previously, the email notification sent out included just a portion of the original post and the entirety of the reply post. This was changed at some point to include the entire original post. This might not be a problem for shorter original posts, but for longer ones it would result in a long email.

What is the New Behavior?

Now, if the original post content long it gets truncated by a helper function. If it is shorter than this preset value, the entire post gets included in the email.

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

  1. Make sure a testing user has email notifications for replies to their threads/ participating threads.
  2. Create a thread as this user with a very long post body
  3. Log in as another user and reply to this thread.
  4. Use 'systemctl start nullsmtpd' to check emails generated on this branch to verify the preview is truncated.

Additional information about email use here: https://submitty.org/developer/development_instructions/vagrant_email_configuration

Automated Testing & Documentation

Other information

This is not a breaking change.

@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Dec 9, 2025
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Dec 9, 2025
@Rkoester47 Rkoester47 changed the title [Bugfix:Notifications]Shortened Post Preview for forum replies [Bugfix:Notifications]Post Preview for Forum Emails Dec 9, 2025
@Rkoester47 Rkoester47 changed the title [Bugfix:Notifications]Post Preview for Forum Emails [Bugfix:Notifications] Post Preview for Forum Emails Dec 9, 2025
@Rkoester47 Rkoester47 marked this pull request as ready for review December 9, 2025 18:16
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Dec 9, 2025
@codecov
Copy link

codecov bot commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.67%. Comparing base (443d6a3) to head (08346b8).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12277      +/-   ##
============================================
- Coverage     21.69%   21.67%   -0.03%     
- Complexity     9617     9620       +3     
============================================
  Files           268      268              
  Lines         36115    36164      +49     
  Branches        478      486       +8     
============================================
+ Hits           7836     7837       +1     
- Misses        27805    27845      +40     
- Partials        474      482       +8     
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (-0.03%) ⬇️
migrator 100.00% <ø> (ø)
php 20.69% <0.00%> (-0.01%) ⬇️
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.

@RyanStyron RyanStyron self-assigned this Dec 15, 2025
@github-actions github-actions bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Dec 30, 2025
Copy link
Contributor

@RyanStyron RyanStyron left a comment

Choose a reason for hiding this comment

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

Largely agree with the intent behind the pull request. Functions well. Looks good to me.

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jan 16, 2026
@github-actions github-actions bot removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jan 17, 2026
Changed the length of the preview to 100 characters, and changed the wording of the output message.
@roye2 roye2 self-requested a review January 27, 2026 13:33
@automateprojectmangement automateprojectmangement bot moved this from Awaiting Maintainer Review to In Review in Submitty Development Jan 27, 2026
Copy link
Contributor

@roye2 roye2 left a comment

Choose a reason for hiding this comment

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

Code looks good and makes sense to me, meaning the commenting is pretty clear. I tested the change and it appears to work as intended.

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jan 27, 2026
@bmcutler bmcutler merged commit d1a461c into main Jan 27, 2026
26 checks passed
@bmcutler bmcutler deleted the fix-forum-reply-email branch January 27, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Discussion forum reply emails are lengthy

4 participants