fix: resolve NiceGUI drawer JavaScript timeout on run results#305
fix: resolve NiceGUI drawer JavaScript timeout on run results#305olivermeyer merged 1 commit intomainfrom
Conversation
|
Claude finished @olivermeyer's task —— View job PR Review: fix: get run details non-blocking ✅SummaryThis PR fixes a JavaScript timeout issue in the NiceGUI application run details page by converting a blocking ✅ What's Good1. Correct Async PatternThe change properly uses NiceGUI's Pattern verified in codebase:
2. Improved UXMoving the API call before hiding the spinner (line 74) ensures users see the loading indicator during the network request, which is better UX. 3. Minimal ChangeSingle-line fix with surgical precision - exactly what's needed to resolve the timeout issue. 4. Conventional Commit Format ✅Commit message follows the required format: 5. Test Coverage Exists ✅The modified function
📋 Architecture Compliance✅ Modulith Pattern Respected
✅ Medical Device Software Standards
🔍 Code Quality Checks✅ Type SafetyThe change maintains proper type hints: run_data = await nicegui_run.io_bound(run.details) if run else None
# Type: RunDetails | None✅ Error HandlingExisting error handling at line 104-106 still applies: if run is None:
ui.label(f"Failed to get run '{run_id}'").mark("LABEL_ERROR")
return✅ Consistent PatternVerified that similar calls in the codebase use the same async pattern:
🎯 Recommendations1. Consider PR Description (Minor - Non-blocking)The PR has no description. While the change is self-explanatory from the code, consider adding: ## Problem
JavaScript timeout in GUI when loading run details page due to blocking API call.
## Solution
Convert `run.details()` to `await nicegui_run.io_bound(run.details)` to prevent UI thread blocking.
## Testing
Covered by existing e2e tests: `test_gui_cli_submit_to_run_result_delete` and others.2. Verify Linting Passes (Action Required)Please run locally before merge: make lintThis ensures:
3. Consider Adding Label (Optional)Since GUI tests can be flaky and time-consuming, consider adding the 🚀 VerdictStatus: ✅ APPROVED (pending lint verification) Blocking Issues: None Suggestions:
This is a high-quality fix that:
Great work, Oliver! This is exactly the kind of surgical fix that medical device software requires - minimal, targeted, and safe. |
Codecov Report✅ All modified and coverable lines are covered by tests.
|
|



Loading run data asynchronously to avoid blocking the JavaScript event loop. This should prevent timeouts and resulting GUI freezes.