Repository navigation
fix(wework): keep automation detail closed - #2528
Conversation
|
Warning Review limit reached
Next review available in: 3 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe automation page now selects an automation only after the first successful load. Later refreshes preserve the current selection. Tests cover detail-pane dismissal and request counts. English and Chinese guides document the detail-pane behavior. ChangesAutomation selection persistence
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 `@wework/src/pages/AutomationsPage.test.tsx`:
- Around line 99-110: Update the test “keeps the detail panel closed after the
user dismisses it” to use fake timers, advance the timer for the initial
loadAutomations call before closing the detail panel, then advance 30,000 ms
after dismissal. Assert that listAutomations was called twice and
automation-detail-panel remains absent after the scheduled refresh, cleaning up
fake timers as needed.
🪄 Autofix
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: 19df0d9a-a00c-4287-ba7c-a372fd8fe0bf
📒 Files selected for processing (4)
docs/en/user-guide/wework-automations.mddocs/zh/user-guide/wework-automations.mdwework/src/pages/AutomationsPage.test.tsxwework/src/pages/AutomationsPage.tsx
Summary
Root cause
The automation refresh callback depended on
selectedAutomationId. Closing the pane cleared that state, recreated the loading effect, and immediately selected the first automation again, so the pane only flashed closed.Validation
pnpm --dir wework exec vitest run src/pages/AutomationsPage.test.tsxpnpm --filter wework typecheckSummary by CodeRabbit
Bug Fixes
Documentation