fix: save settings on Enter#61
Conversation
|
@codex review |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 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. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded ChangesEnter-to-save in Settings Modal
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: aiedwardyi PoemA rabbit tapped Enter with glee, Comment |
There was a problem hiding this comment.
Pull request overview
Updates SettingsModal so pressing Enter in API key or access-code inputs triggers the existing save workflow (previously only the Save button committed changes).
Changes:
- Add
onKeyDownhandlers to API-key inputs to save on Enter. - Add
onKeyDownhandler to the access-code input to save on Enter.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/SettingsModal.tsx`:
- Around line 628-633: The Enter-key save logic is duplicated in the input
handlers, so extract a shared helper to keep it in one place. Create a reusable
handleSaveOnEnter function in SettingsModal.tsx and use it from both onKeyDown
handlers instead of inlining the same Enter check and handleSave call twice.
Keep the helper aligned with the existing handleSave flow so future changes only
need to be made once.
- Around line 628-633: The Enter key handler in SettingsModal should ignore IME
composition events, since `handleSave()` is being triggered even when Enter is
only committing text input. Update the `onKeyDown` logic on the relevant
input(s) to check `e.nativeEvent.isComposing` before treating `e.key ===
"Enter"` as a save action, and only call `handleSave()` when composition is not
in progress.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: a2afd352-a548-4ca8-b6dd-b54aa353164d
📒 Files selected for processing (1)
src/components/SettingsModal.tsx
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Pressing Enter in any API-key input or the access-code field now commits via the existing Save handler (previously only the Save button worked).
Verified locally: type + Enter persists the key/code, identical to clicking Save. No console errors.
Review fixes applied
d5ebab9: extracted a sharedhandleSaveOnEnterhelper with IME (isComposing) and auto-repeat (e.repeat) guards, used by both inputs. Addresses Copilot + CodeRabbit.