Skip to content

Fix rerun hanging if token expires#657

Open
eva-1729 wants to merge 2 commits intomainfrom
rerun_hanging_token
Open

Fix rerun hanging if token expires#657
eva-1729 wants to merge 2 commits intomainfrom
rerun_hanging_token

Conversation

@eva-1729
Copy link
Collaborator

Closes #605

Description

Change how scigateway actions are matched, and change handlererun

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates UI behavior around job reruns and tightens handling of SciGateway custom events in the main application component.

Changes:

  • Refactors the job rerun handler to async/await and adds a 20s fallback to clear the loading spinner.
  • Updates SciGateway event handling to compare against detail.type using strict equality instead of String.match.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/components/jobs/Row.tsx Adds a rerun fallback timeout and refactors rerun flow; impacts spinner/snackbar behavior.
src/App.tsx Fixes SciGateway action extraction to use detail.type and compares actions via ===.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@Pasarus Pasarus left a comment

Choose a reason for hiding this comment

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

Copilot just put some egg on my face with this (I think largely this is fine without the changes suggested, but it isn't wrong? so we should probably handle these cases)

Copilot suggestions, let's see how it goes

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

Rerun hangs if token refreshes

3 participants