Skip to content

Fix updating lock leak in DashboardStateSync freezing URL/state sync#9701

Merged
nishantmonu51 merged 3 commits into
mainfrom
ui_is_updating
Jul 20, 2026
Merged

Fix updating lock leak in DashboardStateSync freezing URL/state sync#9701
nishantmonu51 merged 3 commits into
mainfrom
ui_is_updating

Conversation

@nishantmonu51

@nishantmonu51 nishantmonu51 commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator
  • handleURLChange set this.updating = true and only reset it on the success path; the two guard clauses (!rillDefaultExploreURLParams, !partialExplore) returned without releasing the lock. Once leaked, every subsequent handleURLChange and gotoNewState short-circuited, so filter/time/pivot changes stopped updating the URL, session storage, and the most-recent-state store until a full page reload.
  • The guard clauses now run before the lock is taken, and a try/finally releases it if resolveTimeRanges throws. The lock is released before the final goto (as before), since state changes made while the navigation is in flight must still be picked up by gotoNewState.
  • gotoNewState gets the same try/finally treatment with its original release point (after await goto) unchanged.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Wrap handleURLChange and gotoNewState in try/finally so the updating
lock is released on early returns and throws. Previously a bare return
(unloaded default URL params or explore state) left the lock stuck,
permanently freezing URL and session-storage sync until a page reload.
@nishantmonu51

Copy link
Copy Markdown
Collaborator Author

@codex: review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 038c1485b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@AdityaHegde AdityaHegde left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wrapping in try-catch will just suppress the issue. How about moving the setting of updating after guard clauses?

Also where are you seeing issues around this? There might be another undelying issue needing fix.

…nge`

Holding the lock through the awaited goto made gotoNewState drop any
state change that landed while the navigation was in flight, so the URL
silently missed those updates. Restore the original release point
(before the goto) and keep the try/finally only around the state-merge
section for the throw paths.
@nishantmonu51
nishantmonu51 merged commit 7aa5ebd into main Jul 20, 2026
10 checks passed
@nishantmonu51
nishantmonu51 deleted the ui_is_updating branch July 20, 2026 06:39
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