- Notifications
You must be signed in to change notification settings - Fork4
Commit81921d7
authored
Improve uri handling workflow (#214)
This PR addresses two issues in the URI handler workflow to improve userexperience and reliability.1. Streamline version fallback behaviorProblem: When the URI handler receives a build number that is no longeravailable, the application would fall back to the latest version butdisplay a confirmation dialog. Netflix reported that this confirmationdialog 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 whenthe requested build number is unavailable, maintaining a seamless userexperience.2. Fix connect page not displaying when Toolbox is already openProblem: When Toolbox is already running and a URI is executed, theconnect page fails to display. Investigation revealed that the UI eventemitted via MutableSharedFlow(replay = 0) is lost because the UIcollector is not yet active when processEvent() is called.Solution: Introduced a 66-100ms delay before emitting the UI event. Thisdelay ensures the collector is ready to receive events, preventing themfrom being dropped. The timing was determined through testing andappears to account for the collector initialization time.Note: The delay infix#2 is a workaround for what appears to be atiming issue with the MutableSharedFlow collector initialization.1 parent3ac53e8 commit81921d7
File tree
2 files changed
+22
-4
lines changed- src/main/kotlin/com/coder/toolbox/util
2 files changed
+22
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
5 | 13 | | |
6 | 14 | | |
7 | 15 | | |
| |||
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
114 | 127 | | |
115 | 128 | | |
116 | 129 | | |
| |||
369 | 382 | | |
370 | 383 | | |
371 | 384 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
| 385 | + | |
376 | 386 | | |
377 | 387 | | |
378 | 388 | | |
| |||
0 commit comments
Comments
(0)