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
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletionsCHANGELOG.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,14 @@

## Unreleased

### Changed

- URI handling no longer waits for confirmation to use latest build if the provided build number is too old

### Fixed

- IDE is now launched when URI is handled by an already running Toolbox instance.

## 0.7.1 - 2025-10-13

### Fixed
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,6 +26,7 @@ import kotlinx.coroutines.time.withTimeout
import java.net.URI
import java.util.UUID
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.minutes
import kotlin.time.Duration.Companion.seconds
import kotlin.time.toJavaDuration
Expand DownExpand Up@@ -111,6 +112,18 @@ open class CoderProtocolHandler(
CoderCliSetupContext.token = token
}
CoderCliSetupWizardState.goToStep(WizardStep.CONNECT)

// If Toolbox is already opened and URI is executed the setup page
// from below is never called. I tried a couple of things, including
// yielding the coroutine - but it seems to be of no help. What works
// delaying the coroutine for 66 - to 100 milliseconds, these numbers
// were determined by trial and error.
// The only explanation that I have is that inspecting the TBX bytecode it seems the
// UI event is emitted via MutableSharedFlow(replay = 0) which has a buffer of 4 events
// and a drop oldest strategy. For some reason it seems that the UI collector
// is 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.
delay(100.milliseconds)
context.ui.showUiPage(
CoderCliSetupWizardPage(
context, settingsPage, visibilityState, true,
Expand DownExpand Up@@ -369,10 +382,7 @@ open class CoderProtocolHandler(
val buildNumberIsNotAvailable = availableVersions.firstOrNull { it.contains(buildNumber) } == null
if (buildNumberIsNotAvailable) {
val selectedIde = availableVersions.maxOf { it }
context.logAndShowInfo(
"$productCode-$buildNumber not available",
"$productCode-$buildNumber is not available, we've selected the latest $selectedIde"
)
context.logger.info("$productCode-$buildNumber is not available, we've selected the latest $selectedIde")
return selectedIde
}
return "$productCode-$buildNumber"
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp