Skip to content

[Feature:TAGrading] Auto-open single file fallback#12492

Closed
Divyansh2992 wants to merge 8 commits into
Submitty:mainfrom
Divyansh2992:feature/auto-open-single-file
Closed

[Feature:TAGrading] Auto-open single file fallback#12492
Divyansh2992 wants to merge 8 commits into
Submitty:mainfrom
Divyansh2992:feature/auto-open-single-file

Conversation

@Divyansh2992

Copy link
Copy Markdown

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

Scenario Before After
Same filename across students Auto-opens Unchanged
Different filename, single file submitted Nothing opens Auto-opens single file
Multiple files with different names Nothing opens Unchanged

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

  1. Enable "Auto open" in TA grading view.

  2. Create two students:

  • Student A: submits main.cpp

  • Student B: submits solution.cpp

  1. Navigate between submissions.

Expected result:

  • The single submitted file auto-opens even when filenames differ.

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

@IDzyre IDzyre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Mar 3, 2026
@Divyansh2992 Divyansh2992 changed the title TA Grading: auto-open single submitted file when no filename match [Feature:TAGrading] Auto-open single file fallback Mar 3, 2026
@Divyansh2992

Copy link
Copy Markdown
Author

@IDzyre As requested, I have updated the PR title to follow the required format.

@JManion32 JManion32 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.

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.

@Divyansh2992

Copy link
Copy Markdown
Author

@JManion32 I have fixed the issue mentioned , please check it out.

Comment thread treamgit fetch upstream Outdated
@Divyansh2992
Divyansh2992 requested a review from IDzyre March 6, 2026 08:09
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Mar 6, 2026
@Divyansh2992
Divyansh2992 requested a review from JManion32 March 7, 2026 18:15
@IDzyre

IDzyre commented Mar 13, 2026

Copy link
Copy Markdown
Member

Can you add a Cypress test to verify functionality?

@IDzyre
IDzyre removed their request for review March 13, 2026 07:26
@codecov

codecov Bot commented Mar 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.65%. Comparing base (64774d8) to head (7a5853f).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.03% <0.00%> (-0.01%) ⬇️
migrator 100.00% <ø> (ø)
php 20.68% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

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.

@JManion32 JManion32 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.

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.

@github-project-automation github-project-automation Bot moved this from In Review to Work in Progress in Submitty Development Mar 13, 2026
@JManion32

Copy link
Copy Markdown
Contributor

Closing due to inactivity.

@JManion32 JManion32 closed this Mar 23, 2026
@github-project-automation github-project-automation Bot moved this from Work in Progress to Done in Submitty Development Mar 23, 2026
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.

Auto-open single PDF (or maybe regex-based?) in grading panel

3 participants