feat: intercept browser save shortcut - #48
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60fce8a132
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Warning Review limit reached
Next review available in: 50 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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. 📝 WalkthroughWalkthroughAdded 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ 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
🧹 Nitpick comments (1)
src/App.tsx (1)
8-18: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd regression coverage for the shortcut contract.
Test plain Ctrl/Cmd+S, unrelated keys, modified variants,
preventDefault(), propagation behavior, and listener cleanup whenAppunmounts.🤖 Prompt for 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. In `@src/App.tsx` around lines 8 - 18, Add regression tests for the keydown handler registered by App, covering plain Ctrl/Cmd+S, unrelated keys, modified variants, preventDefault and stopPropagation behavior, and removal of the listener when App unmounts. Use the existing event-listener test patterns and verify the shortcut contract without changing the handler implementation.
🤖 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/App.tsx`:
- Around line 11-14: Update the keyboard handler condition around the Ctrl/Cmd+S
interception to require both shiftKey and altKey to be false, while preserving
the existing Ctrl/Cmd modifier and lowercase “s” checks. This should prevent
interception of Ctrl/Cmd+Shift+S and Ctrl/Cmd+Alt+S so those shortcuts continue
to the editor.
---
Nitpick comments:
In `@src/App.tsx`:
- Around line 8-18: Add regression tests for the keydown handler registered by
App, covering plain Ctrl/Cmd+S, unrelated keys, modified variants,
preventDefault and stopPropagation behavior, and removal of the listener when
App unmounts. Use the existing event-listener test patterns and verify the
shortcut contract without changing the handler implementation.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: b7b56aa0-ef89-4c55-9579-6afcfc675e50
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
package.jsonsrc/App.tsx
No description provided.