Skip to content

[Bugfix:Submission] Fix vue-id collision#12010

Merged
bmcutler merged 10 commits intomainfrom
fix-duplicate-vue
Sep 8, 2025
Merged

[Bugfix:Submission] Fix vue-id collision#12010
bmcutler merged 10 commits intomainfrom
fix-duplicate-vue

Conversation

@williamschen23
Copy link
Contributor

Why is this Change Important & Necessary?

@lavalleeale and I knew that this day would come, where we would have so many vue elements on the screen that the id's conflict with each other and make a very weird site. Therefore, we need to stop using random ids and instead be asserting that it is per script. There are many mistakes in teh gradeable itself, but the part I can show demonstrates it perfectly.
image
Write your java code is a markdown box that is a vue element. On this page, it seems like it replaces the too many queries banner, the sidebar, and some other things that I did not want to pinpoint. I can confirm this collision as opening it up and checking for the specific ID, there are going to multiple,

What is the New Behavior?

Instead of generating a random ids, we will put the script tag in the div. This also works for removing the script tag as the vue element renders on top on it.

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

I don't know how you can test this reliable, maybe have a large markdown/notebook gradeable.

Automated Testing & Documentation

Other information

@codecov
Copy link

codecov bot commented Aug 16, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 21.71%. Comparing base (50018f0) to head (c5d5e8a).
⚠️ Report is 18 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12010   +/-   ##
=========================================
  Coverage     21.70%   21.71%           
  Complexity     9582     9582           
=========================================
  Files           268      268           
  Lines         36560    36563    +3     
  Branches        475      475           
=========================================
+ Hits           7936     7938    +2     
- Misses        28153    28154    +1     
  Partials        471      471           
Flag Coverage Δ
autograder 21.31% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.73% <66.66%> (+<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.

@williamschen23 williamschen23 marked this pull request as draft August 16, 2025 02:13
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Aug 16, 2025
Copy link
Member

@williamjallen williamjallen left a comment

Choose a reason for hiding this comment

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

When we originally set this up, we deliberately didn't want users to set an ID because doing so could lead to conflicts with common names. If our current random approach isn't sufficient, why can't we just use a larger random space such that it's essentially impossible to have a conflict?

@williamschen23 williamschen23 marked this pull request as ready for review August 17, 2025 08:41
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Aug 17, 2025
@williamschen23
Copy link
Contributor Author

@williamjallen After a bit of testing, I dont think the correct reason is that theyre colliding. Instead, there are exact duplicates , which does not make much sense to me. It looks like the first 8 vue element's ID are mirrored, messing up the UI in the proceess. Do you have any idea? Moving to uniqid works for vue that is generated PHP side, but doesnt work when using twigjs,which we will still have to use random(). Do you think thats the best option?

@bmcutler bmcutler merged commit f9f9d59 into main Sep 8, 2025
25 checks passed
@bmcutler bmcutler deleted the fix-duplicate-vue branch September 8, 2025 02:54
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.

3 participants