Skip to content

Fix runBlocking UI freeze and redundant koinInject in device sync UI#3804

Merged
guiyanakuang merged 1 commit intomainfrom
fix/issue-3803-session29-device-sync-ui
Feb 9, 2026
Merged

Fix runBlocking UI freeze and redundant koinInject in device sync UI#3804
guiyanakuang merged 1 commit intomainfrom
fix/issue-3803-session29-device-sync-ui

Conversation

@guiyanakuang
Copy link
Copy Markdown
Member

Closes #3803

Changes

1. Fix runBlocking UI freeze in AddDeviceDialog (HIGH)

  • Replaced runBlocking with rememberCoroutineScope().launch so the network call (syncClientApi.syncInfo) no longer blocks the UI thread
  • Added isLoading state to disable the confirm button during the async request, preventing double-clicks

2. Remove redundant koinInject in DevicesContentView (LOW)

  • Removed duplicate koinInject<DeviceScopeFactory>() inside LazyColumn items lambda — the factory was already injected in the outer composable scope

Verification

  • ./gradlew ktlintFormat — clean
  • ./gradlew compileKotlinDesktop — passes
  • ./gradlew app:desktopTest — 154/155 pass (1 pre-existing env-dependent failure)

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
@guiyanakuang guiyanakuang merged commit fe67068 into main Feb 9, 2026
2 checks passed
@guiyanakuang guiyanakuang deleted the fix/issue-3803-session29-device-sync-ui branch February 9, 2026 01:41
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.

Fix runBlocking UI freeze and redundant koinInject in device sync UI

1 participant