Repository navigation
Conversation
- Integrated an UpdatePrompt component to notify users of available updates, improving user experience during updates. - Enhanced the AppShell to conditionally render the UpdatePrompt based on pending updates. - Updated the ToolWindowHeader to support improved dragging functionality with touch styles. - Refactored the useLongPressWindowDrag hook to streamline window dragging behavior. - Adjusted styles in UpdatePrompt for better visual integration with the app's theme.
|
Warning Review limit reached
Next review available in: 46 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 (8)
📝 WalkthroughWalkthroughThe application now renders a theme-aware update prompt, ensures it is visible when updates are detected, places tool windows using logical monitor coordinates, and starts window dragging immediately on primary pointer input. ChangesApplication interaction changes
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant appStore
participant MainApp
participant UpdatePrompt
appStore->>appStore: detect update and ensure prompt visibility
appStore->>MainApp: set pendingUpdate
MainApp->>UpdatePrompt: render pending update
UpdatePrompt->>MainApp: clear pending update on dismiss
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: 4
🤖 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 `@src/components/common/UpdatePrompt.tsx`:
- Around line 82-84: Update the UpdatePrompt component’s modal wrapper to
provide dialog semantics with an accessible label and aria-modal, move initial
focus into the prompt, contain keyboard focus within it, restore focus when
dismissed, and handle Escape by calling onDismiss. Prefer the project’s tested
dialog primitive if available; otherwise implement this lifecycle around the
existing panel and update actions.
In `@src/lib/toolWindows.ts`:
- Around line 83-92: Update the mirrored-monitor selection logic around the
overlapping monitor filter to include only monitors geometrically overlapping
candidate, rather than every monitor with is_mirror_duplicate; then select the
primary or largest monitor only within that group and retain candidate as the
fallback. Add a test covering two separated mirrored groups to verify a
candidate selects no monitor from the other group.
- Around line 111-149: Update resolvePlacement and its supporting
MonitorInfo/backend monitor payload to carry each monitor’s scale factor from
cmd_list_monitors, then pass the selected monitor’s factor to centerOnMonitor
instead of using getUiScaleFactor() for the current window. Add a test covering
placement on a monitor with DPI different from the current window.
In `@src/stores/appStore.ts`:
- Around line 137-147: Update ensureUpdatePromptVisible to handle
isAnimatingWindow before invoking toggleCollapsed or expandMiniModeKeyboard:
defer or retry the expansion once the window animation completes, ensuring the
update prompt ultimately becomes visible in both collapsed and compact Mini Mode
states.
🪄 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: 8d43fae0-5db0-4b63-a5e6-ce5c29ffbba3
📒 Files selected for processing (8)
src/App.tsxsrc/components/common/ToolWindowHeader.tsxsrc/components/common/UpdatePrompt.tsxsrc/components/layout/AppShell.tsxsrc/hooks/useLongPressWindowDrag.tssrc/lib/toolWindows.test.tssrc/lib/toolWindows.tssrc/stores/appStore.ts
💤 Files with no reviewable changes (1)
- src/components/layout/AppShell.tsx
- Added focus management and keyboard navigation to the UpdatePrompt component, improving accessibility for users. - Introduced a utility function to identify focusable elements within the UpdatePrompt dialog. - Updated the tool window management logic to utilize the monitor's DPI scale factor for better window placement. - Enhanced tests for tool window behavior to cover new scenarios involving monitor scale factors and overlapping monitors. - Refactored related components to ensure consistent handling of window animations and visibility states.
Summary
Commit message
fix: theme update prompt and fix tool-window touch drag/placementRelated issue
N/A
Accessibility impact
Touch users can move Settings again; mirrored/high-DPI setups no longer open Settings off-screen where it could not be closed. Update availability is visible in Mini Mode without leaving the accessibility workflow.
Test plan
npm run tauri devlocallynpm test -- src/lib/toolWindows.test.tsScreenshots (if UI changed)
Summary by CodeRabbit
New Features
Bug Fixes