Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
fioan89 merged 3 commits intomainfromimprove-uri-handling-workflow
Nov 3, 2025
Merged

Conversation

@fioan89
Copy link
Collaborator

This PR addresses two issues in the URI handler workflow to improve user experience and reliability.

  1. 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.

  2. 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.

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.
Copy link
Member

@code-ashercode-asher left a 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

@fioan89
Copy link
CollaboratorAuthor

#2 must have been a nightmare to figure out lol

You are on point :) This was raised in the meantimehttps://youtrack.jetbrains.com/issue/TBX-16622

@fioan89fioan89 merged commit81921d7 intomainNov 3, 2025
6 checks passed
@fioan89fioan89 deleted the improve-uri-handling-workflow branchNovember 3, 2025 17:31
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@code-ashercode-ashercode-asher approved these changes

@f0sself0sselAwaiting requested review from f0ssel

@jcjiangjcjiangAwaiting requested review from jcjiang

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@fioan89@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp