Skip to content

Check POST request status before displaying success#2336

Merged
mcm001 merged 1 commit intoPhotonVision:mainfrom
Gold856:check-post-request
Jan 27, 2026
Merged

Check POST request status before displaying success#2336
mcm001 merged 1 commit intoPhotonVision:mainfrom
Gold856:check-post-request

Conversation

@Gold856
Copy link
Member

@Gold856 Gold856 commented Jan 26, 2026

Description

We currently don't check if the POST request succeeded before immediately sprinting off to reload the page. This often means users see a green "reloading" notification, which I think is masking issues in https://www.chiefdelphi.com/t/photonvision-offline-updating-to-2026-1-1-not-working/512677. Confirmed that a disconnected UI (the demo page) will always show that green reloading notification. Fix this by making axiosPost return whether or not the POST request succeeded, and only refresh if it succeeded. This also similarly pulls out the snackbar message displayed on upload completion out of the upload progress callback and into an if statement because it's cleaner and avoids potential rounding errors causing it to not display.

original.mp4
new.mp4

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why, including events that led to this PR
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends)
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@Gold856 Gold856 requested a review from a team as a code owner January 26, 2026 22:41
@github-actions github-actions bot added the frontend Having to do with PhotonClient and its related items label Jan 26, 2026
@Gold856 Gold856 force-pushed the check-post-request branch from 60da7d6 to 7a6b5d1 Compare January 26, 2026 22:41
@mcm001 mcm001 merged commit ae74b17 into PhotonVision:main Jan 27, 2026
93 of 94 checks passed
@Gold856 Gold856 deleted the check-post-request branch January 27, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Having to do with PhotonClient and its related items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants