Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restore original user store poll on leaving workspace details #8702

Merged
merged 1 commit into from
Jan 17, 2024

Conversation

ashtonG
Copy link
Contributor

@ashtonG ashtonG commented Jan 17, 2024

Description

this fixes an issue where the user store would cease polling when leaving the workspace details page. we start polling the user store at 10s (up from 60s) when getting to the workspace details page. by default, the startPolling function returns a cleanup function that stops polling altogether on unmount, so the user store would stop polling when the user leaves the workspace details page. this fixes that by instead polling at the original amount on unmount.

Test Plan

  • as an admin, open two windows.
  • in one window, visit a workspace with projects available, in the other, visit the users page
  • in the users window, edit one of the project owners of the workspace and wait about 10 seconds
  • you should see the changes reflected in the workspace window
  • in the workspace window, navigate to the experiment list and filter the results by a user. ensure that there are experiments in the view
  • in the users window, edit the display name of the user you filtered in the workspace window and wait about one minute
  • you should see the name change reflected in the workspace window

Commentary (optional)

opted against an "increase/descrease polling" function because this is the only place in the codebase where we do this. we can revisit if this becomes more of a thing later.

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

WEB-1807

this fixes an issue where the user store would cease polling when
leaving the workspace details page. we start polling the user store
at 10s (up from 60s) when getting to the workspace details page. by default, the
`startPolling` function returns a cleanup function that stops polling
altogether on unmount, so the user store would stop polling when the user
leaves the workspace details page. this fixes that by instead polling at
the original amount on unmount
@ashtonG ashtonG requested a review from a team as a code owner January 17, 2024 18:34
@ashtonG ashtonG requested a review from gt2345 January 17, 2024 18:34
@cla-bot cla-bot bot added the cla-signed label Jan 17, 2024
Copy link

netlify bot commented Jan 17, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 2630f1e
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/65a81dbcb66fcb0008ad7c92
😎 Deploy Preview https://deploy-preview-8702--determined-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e8d6448) 51.51% compared to head (2630f1e) 47.32%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8702      +/-   ##
==========================================
- Coverage   51.51%   47.32%   -4.19%     
==========================================
  Files         887      570     -317     
  Lines      156209   117676   -38533     
  Branches     2088     2088              
==========================================
- Hits        80465    55691   -24774     
+ Misses      74251    60492   -13759     
  Partials     1493     1493              
Flag Coverage Δ
harness ?
web 53.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 318 files with indirect coverage changes

Copy link
Contributor

@gt2345 gt2345 left a comment

Choose a reason for hiding this comment

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

LGTM

@ashtonG ashtonG merged commit 00c2746 into main Jan 17, 2024
81 of 92 checks passed
@ashtonG ashtonG deleted the bug/WEB-1807/workspace-details-poll branch January 17, 2024 21:45
maxrussell pushed a commit that referenced this pull request Mar 21, 2024
…8702)

this fixes an issue where the user store would cease polling when
leaving the workspace details page. we start polling the user store
at 10s (up from 60s) when getting to the workspace details page. by default, the
`startPolling` function returns a cleanup function that stops polling
altogether on unmount, so the user store would stop polling when the user
leaves the workspace details page. this fixes that by instead polling at
the original amount on unmount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants