- Notifications
You must be signed in to change notification settings - Fork4
Improve uri handling workflow#214
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
The URI handler expects a product code a build number. If the build numberis no longer available we defaulted to latest version available and poppedup a confirmation window to make sure the user wants to go forward withthe new versionNetflix pointed out that the confirmation dialog disrupts the workflow.With this PR we only log that we fall back to latest version availablein order to streamline the handler.
If Toolbox is already opened and URI is executed the setup pagefrom below is never called. I tried a couple of things, includingyielding the coroutine - but it seems to be of no help. What worksdelaying the coroutine for 66 - to 100 milliseconds, these numberswere determined by trial and error.The only explanation that I have is that inspecting the TBX bytecode it seems theUI event is emitted via MutableSharedFlow(replay = 0) which has a buffer of 4 eventsand a drop oldest strategy. For some reason it seems that the UI collectoris not yet active, causing the event to be lost unless we wait > 66 ms.I think this delay ensures the collector is ready before processEvent() is called.
code-asher approved these changesNov 1, 2025
Member
code-asher left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
#2 must have been a nightmare to figure out lol
CollaboratorAuthor
fioan89 commentedNov 3, 2025
You are on point :) This was raised in the meantimehttps://youtrack.jetbrains.com/issue/TBX-16622 |
81921d7 intomain 6 checks passed
Uh oh!
There was an error while loading.Please reload this page.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses two issues in the URI handler workflow to improve user experience and reliability.
Streamline version fallback behavior
Problem: When the URI handler receives a build number that is no longer available, the application would fall back to the latest version but display a confirmation dialog. Netflix reported that this confirmation dialog disrupts the user workflow.
Solution: Removed the confirmation dialog and replaced it with logging. The handler now silently falls back to the latest available version when the requested build number is unavailable, maintaining a seamless user experience.
Fix connect page not displaying when Toolbox is already open
Problem: When Toolbox is already running and a URI is executed, the connect page fails to display. Investigation revealed that the UI event emitted via MutableSharedFlow(replay = 0) is lost because the UI collector is not yet active when processEvent() is called.
Solution: Introduced a 66-100ms delay before emitting the UI event. This delay ensures the collector is ready to receive events, preventing them from being dropped. The timing was determined through testing and appears to account for the collector initialization time.
Note: The delay infix#2 is a workaround for what appears to be a timing issue with the MutableSharedFlow collector initialization.