Skip to content

fix(wework): keep automation detail closed - #2528

Merged
qdaxb merged 3 commits into
mainfrom
fix/wework-automation-detail-close
Aug 9, 2026
Merged

qdaxb merged 3 commits into
mainfrom
fix/wework-automation-detail-close

Conversation

@qdaxb

@qdaxb qdaxb commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep the Scheduled automation detail pane closed after the user clicks its close button
  • preserve first-load selection without reselecting after periodic refreshes
  • add regression coverage and document the detail-pane interaction in Chinese and English

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.tsx
  • focused Prettier and ESLint checks
  • pnpm --filter wework typecheck
  • pre-push Wework ESLint, TypeScript, and full unit tests
  • isolated real-Tauri QA: close remained stable immediately and after a 31-second refresh interval; selecting the row reopened the pane

Summary by CodeRabbit

  • Bug Fixes

    • Automation details now open for the first task after the initial load.
    • Periodic updates no longer override the task currently selected by the user.
    • Closing the details panel keeps it closed until another task is selected.
    • Improved empty-selection behavior when no task is selected.
  • Documentation

    • Added English and Chinese guidance for viewing automation details.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ae71718f-95bd-4b69-ae9b-b78921a0d39a

📥 Commits

Reviewing files that changed from the base of the PR and between 572ad8d and 0a4cc65.

📒 Files selected for processing (1)
  • wework/src/pages/AutomationsPage.test.tsx
📝 Walkthrough

Walkthrough

The 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.

Changes

Automation selection persistence

Layer / File(s) Summary
Initial selection lifecycle
wework/src/pages/AutomationsPage.tsx
The page tracks completion of the initial automation load. Refreshes no longer override the selected automation, and the loading callback no longer depends on selectedAutomationId.
Detail-pane validation and documentation
wework/src/pages/AutomationsPage.test.tsx, docs/en/user-guide/wework-automations.md, docs/zh/user-guide/wework-automations.md
Tests cover initial detail rendering, dismissal, empty selection, and automation-list request counts. Both guides document initial, closed, and reopened detail-pane states.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: keeping the Wework automation detail pane closed after dismissal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wework-automation-detail-close

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between ed8dcf5 and 572ad8d.

📒 Files selected for processing (4)
  • docs/en/user-guide/wework-automations.md
  • docs/zh/user-guide/wework-automations.md
  • wework/src/pages/AutomationsPage.test.tsx
  • wework/src/pages/AutomationsPage.tsx

@qdaxb
qdaxb added this pull request to the merge queue Aug 9, 2026
Merged via the queue into main with commit 002fc3e Aug 9, 2026
47 checks passed
@qdaxb
qdaxb deleted the fix/wework-automation-detail-close branch August 9, 2026 15:33
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.

1 participant