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

Fixes setMainNavBackButton race condition before a team is present after logging in #4949

Merged
merged 2 commits into from
Dec 20, 2024

Conversation

cstns
Copy link
Contributor

@cstns cstns commented Dec 19, 2024

Description

After a consistent way of reproducing the bug was found in #4937 I was able to poke around and find the culprit.

The underlying problem is that the backToButton watcher in the mainNav component was triggered immediately when the component was mounted after login but prior of having a loaded team which caused the backButton computed prop to fail and pushing an undefined value in the ux store.

The fix is preventing the backButton to be pushed in an invalid state whilst reacting/setting the button upon team changes.

Related Issue(s)

closes #4797

Checklist

  • I have read the contribution guidelines
  • Suitable unit/system level tests have been added and they pass
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on FlowFuse/helm to update ConfigMap Template
    • Issue/PR raised on FlowFuse/CloudProject to update values for Staging/Production

Labels

  • Includes a DB migration? -> add the area:migration label

@cstns cstns self-assigned this Dec 19, 2024
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.44%. Comparing base (cf9bfbe) to head (60a0e84).
Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4949   +/-   ##
=======================================
  Coverage   78.44%   78.44%           
=======================================
  Files         325      325           
  Lines       15353    15353           
  Branches     3529     3529           
=======================================
  Hits        12043    12043           
  Misses       3310     3310           
Flag Coverage Δ
backend 78.44% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@knolleary knolleary merged commit d29e97d into main Dec 20, 2024
18 checks passed
@knolleary knolleary deleted the fix-main-nav-backToButton-race-condition branch December 20, 2024 16:00
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.

Sidebar sometimes fails to update when switching to admin/user views
2 participants