Skip to content

[Feature:TAGrading] Add Image Annotation#11921

Merged
bmcutler merged 92 commits into
mainfrom
add-image-annotation
Jul 13, 2026
Merged

[Feature:TAGrading] Add Image Annotation#11921
bmcutler merged 92 commits into
mainfrom
add-image-annotation

Conversation

@martig7

@martig7 martig7 commented Jul 28, 2025

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

PDF Annotation was recently removed, and so as a replacement we agreed to instead support image annotation.

What is the New Behavior?

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

Bulk upload to a gradable on the new branch, and assign the result to a student. Go to their submisson, and open up an image. This page should now show, and editing the image should render the changes. These changes should persist across instances. Downloading should download the image with the annotations built on top.
image

The student can now see their annotated image from the gradable at the bottom of the page, which is the same as with pdf annotation:

image image

Automated Testing & Documentation

This feature will likely need submitty.org documentation.

Other information

A future PR/issue should store this annotated image somewhere without having to build to see the annotated image.

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Jul 28, 2025
@martig7
martig7 requested a review from lavalleeale July 28, 2025 19:24
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Jul 28, 2025
@codecov

codecov Bot commented Jul 28, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0.42105% with 473 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.06%. Comparing base (1b6385d) to head (00c74d4).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #11921      +/-   ##
============================================
- Coverage     21.29%   21.06%   -0.24%     
- Complexity    10098    10128      +30     
============================================
  Files           278      279       +1     
  Lines         37794    38219     +425     
  Branches        516      585      +69     
============================================
+ Hits           8050     8051       +1     
- Misses        29241    29596     +355     
- Partials        503      572      +69     
Flag Coverage Δ
autograder 21.16% <ø> (ø)
js 1.76% <0.00%> (-0.22%) ⬇️
migrator 100.00% <ø> (ø)
php 20.16% <1.53%> (-0.06%) ⬇️
python_submitty_utils 79.83% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)
vue 100.00% <ø> (ø)

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.

@Chriun Chriun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clearing annotations does not clear the rendered view but it is cleared in the view when you click edit annotations. Downloading the image also contains the annotations that were supposed to be cleared.

@martig7
martig7 requested a review from Chriun August 1, 2025 15:35
@NicholasCiuica

NicholasCiuica commented Jun 29, 2026

Copy link
Copy Markdown
Member

After testing this PR and making some fixes to get it merge-ready, I found a missing feature that constitutes its own issue/PR after this one is merged. In this PR, students will only see at most one annotated image per image file they submit, even if multiple graders make annotations to the same file. This causes problems when multiple graders try to annotate the same problem, or two graders are annotating different problems on the same page.

Leaving this image to find the issue again easily. All the work needed to fix this issue will probably be in \site\ts\ImageAnnotationEmbedded.ts.
Screenshot 2026-06-29 141343

@NicholasCiuica
NicholasCiuica marked this pull request as draft June 30, 2026 14:16
this current change does not work. I tried to use addInternalCss and addVendorJs here could not yet get them to work
jquery is already installed globally
the getPath only ran if this route was invoked on a non-anonymous file path, but the only use of this route is on an anonymous file path, so this line is never reached. Furthermore, if it was reached, then the getPath could cause an arbitrary read because it does not perform sanitation on the input file_path when its third parameter is false.
it seems that eslint is not picking up on a number of issues that are being picked up locally
This reverts commit fc31b89.
@NicholasCiuica
NicholasCiuica marked this pull request as ready for review July 7, 2026 13:33
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Jul 7, 2026
@NicholasCiuica
NicholasCiuica requested a review from mattLif July 7, 2026 19:59
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Jul 7, 2026

@mattLif mattLif left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code looks good after reviewing. Tested feature with an uploaded image and observed the expected behavior. Just be sure to mention in documentation that annotations are only sent to student once rubric is fully graded. Also noticed that there's conflicts with multiple annotations, but that is being fixed in a future PR. I'm approving.

@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 Jul 11, 2026
@bmcutler
bmcutler merged commit 09ce4a3 into main Jul 13, 2026
28 checks passed
@bmcutler
bmcutler deleted the add-image-annotation branch July 13, 2026 19: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.

10 participants