Skip to content

Conversation

@bp-cos
Copy link
Contributor

@bp-cos bp-cos commented Jul 16, 2025

  • Ticket: [eng-8074]
  • Feature flag: n/a

Purpose

The current thinking between many people Longze, Yuhuai, Ihor, etc. is other bugs that have been fixed have gradually resolved all the issues in this ticket.

The last remaining issue was this race condition that I found trying to reproduce the 8074 issue.

The "preUrl" is async and depending how quickly it resolve compared to when the user clicks on the "file widget" can recreate a race condition that the widget will not work and not display any errors either.

Summary of Changes

In the template changed the @enabled to be this.enabled

In the controller added a toggle to true/false the enabled flag until the api call has resolved.

Screenshot(s)

N/A

Side Effects

Hopefully this resolves all the preprint issues.

QA Notes

As soon as you get to the file page attempt to click on the widget. It should be "disabled" and not respond until all the information is retrieved from the server then the widget will allow for interaction.

@bp-cos bp-cos requested a review from futa-ikeda July 16, 2025 21:17
Copy link
Contributor

@futa-ikeda futa-ikeda left a comment

Choose a reason for hiding this comment

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

Makes sense as a fix to me. Hoping that this is indeed the cause of it 🤞 🍀

@bp-cos bp-cos merged commit 6d45027 into CenterForOpenScience:feature/pbs-25-12 Jul 17, 2025
9 checks passed
@bp-cos bp-cos deleted the feature/preprint-race-condition branch July 17, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants