Fix search progress UI stuck after jobs complete - #200
Conversation
Reopening a completed search skipped loading the cached log because refreshProgress() bailed when isComplete was already set. Sync from the service cache on revisit, cast complete for the log component, and stop polling once finished.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughSearch progress synchronization is centralized in both search interfaces, complete searches avoid unnecessary refreshes, dispatch-only log initialization is preserved, and progress views poll every two seconds only until completion. ChangesSearch progress synchronization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/Filament/Resources/ProductResource/Widgets/CreateViaSearchForm.php`:
- Around line 207-212: Update the status assignments after getInProgress() and
getIsComplete() in CreateViaSearchForm.php (207-212) and SearchProductSource.php
(178-183) to assign each property the service result directly, including false
when absent, instead of updating only for truthy values. This must clear stale
timestamps so the isComplete && ! $inProgress path can run.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c8c08ed1-f0fa-41ce-a79e-83cddb9ff0ff
📒 Files selected for processing (4)
app/Filament/Resources/ProductResource/Widgets/CreateViaSearchForm.phpapp/Filament/Resources/ProductSourceResource/Pages/SearchProductSource.phpresources/views/filament/resources/product-resource/widgets/create-via-search.blade.phpresources/views/filament/resources/product-source-resource/pages/search-product-source.blade.php
Assign inProgress/isComplete from the service even when false so a finished job clears the in-progress timestamp and polling can stop.
|
Addressed CodeRabbit feedback: |
|
thanks, merged here #214 as it needed a bunch of fixes |
Summary
$isCompleteso the search-log completion state renders correctlyWhy
Revisiting a finished search skipped
refreshProgress()becauseisCompletewas already set, so the UI kept showing only the local “Preparing to search” line even though the job had finished.Test plan
Made with Cursor
Summary by CodeRabbit