fix(tweaks): unbreak main — suspend getString in coroutine scope#577
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
Walkthrough
ChangesProxy Host Validation Message Selection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile Summary
Confidence Score: 5/5Safe to merge — targeted compilation fix with no logic regressions. The change is minimal and surgical: it only moves two existing expression groups inside No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI
participant onAction
participant viewModelScope
participant events as _events
UI->>onAction: OnProxySave / OnProxyTest
onAction->>onAction: isValidProxyHost returns false
onAction->>onAction: "capture isBlank = form.host.isBlank()"
onAction->>viewModelScope: launch coroutine
activate viewModelScope
onAction-->>onAction: return (non-local)
viewModelScope->>viewModelScope: getString proxy_host_required or proxy_host_invalid
viewModelScope->>events: send OnProxySaveError or OnProxyTestError
deactivate viewModelScope
events-->>UI: collect error event
Reviews (1): Last reviewed commit: "fix(tweaks): move suspend getString into..." | Re-trigger Greptile |
Main is broken after #576 merged. The proxy-host validation path calls
getString(Res.string.proxy_host_*)outside a coroutine —getStringis a Compose Resources suspend function. Compiler error:(Also at lines 643, 1027, 1029.)
Fix: move the
getStringcalls inside the existingviewModelScope.launch { … }block; pass theisBlankboolean across the boundary. Same fix in bothOnProxySaveandbuildProxyConfigForTest. Verified locally with./gradlew :feature:tweaks:presentation:compileDebugKotlinAndroid :feature:tweaks:presentation:compileKotlinJvm— both green. Apologies for shipping the suspend bug into #576 without a compile pass.Summary by CodeRabbit
Release Notes