[Feature:TAGrading] Auto-open single file fallback#12492
Conversation
IDzyre
left a comment
There was a problem hiding this comment.
Please update your PR title to use our required format
[<TYPE>:<MODULE>] <SUBJECT>, where <SUBJECT> is 40 chars max.
See also: https://submitty.org/developer/getting_started/make_a_pull_request
|
@IDzyre As requested, I have updated the PR title to follow the required format. |
JManion32
left a comment
There was a problem hiding this comment.
I was able to replicate the issue on main, but it seems that this solution doesn't quite solve it. submissionFiles will never equal 1 when a single file is submitted, because it also includes .submit.timestamp and .user_assignment_access.json.
|
@JManion32 I have fixed the issue mentioned , please check it out. |
|
Can you add a Cypress test to verify functionality? |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12492 +/- ##
============================================
- Coverage 21.66% 21.65% -0.01%
Complexity 9638 9638
============================================
Files 268 268
Lines 36223 36231 +8
Branches 486 489 +3
============================================
Hits 7847 7847
- Misses 27894 27899 +5
- Partials 482 485 +3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
I am still unable to see the fix. I have 2 students who both submitted a single unique file and auto-open enabled, and the file does not open when toggling between pages. It does work when the files are the same name though.
Please also add a Cypress test for this change.
|
Closing due to inactivity. |
Why is this Change Important & Necessary?
Closes #12482
Currently, the "Auto open" feature in the TA grading interface only re-opens files when navigating between students if the filenames match exactly.
If students submit files with different names, no file is opened automatically. This interrupts the keyboard-only grading workflow and requires the grader to manually click the file, even when only a single file was submitted.
This change improves grading efficiency while preserving existing behavior.
What is the New Behavior?
After the existing filename-matching logic runs:
If no files were opened
And auto-open is enabled
And the student submitted exactly one file
Then that single file is automatically opened.
Behavior Summary
What steps should a reviewer take to reproduce or test the bug or new feature?
Enable "Auto open" in TA grading view.
Create two students:
Student A: submits main.cpp
Student B: submits solution.cpp
Expected result:
Also verify:
Same-name matching still works.
Multi-file submissions do not auto-open.
Automated Testing & Documentation
This is a frontend UX improvement and does not affect backend logic.
No automated tests were added, as this behavior is tested manually within the TA grading interface.
No documentation updates are required.
Other information
Not a breaking change.
No migrations required.
No security implications.
Only one file modified:
site/ts/ta-grading-panels-init.ts