Skip to content

fix: save settings on Enter#61

Merged
aiedwardyi merged 2 commits into
mainfrom
fix/settings-enter-to-save
Jul 4, 2026
Merged

fix: save settings on Enter#61
aiedwardyi merged 2 commits into
mainfrom
fix/settings-enter-to-save

Conversation

@aiedwardyi

@aiedwardyi aiedwardyi commented Jul 4, 2026

Copy link
Copy Markdown
Owner

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 shared handleSaveOnEnter helper with IME (isComposing) and auto-repeat (e.repeat) guards, used by both inputs. Addresses Copilot + CodeRabbit.

@aiedwardyi

Copy link
Copy Markdown
Owner Author

@codex review

@aiedwardyi
aiedwardyi requested a review from Copilot July 4, 2026 04:30
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 46 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fe64071f-774d-4339-a8cf-19ba746e211c

📥 Commits

Reviewing files that changed from the base of the PR and between 1fedf4b and d5ebab9.

📒 Files selected for processing (1)
  • src/components/SettingsModal.tsx
📝 Walkthrough

Walkthrough

Added onKeyDown handlers to the provider API key input and access code input in SettingsModal, so pressing Enter prevents default behavior and calls handleSave().

Changes

Enter-to-save in Settings Modal

Layer / File(s) Summary
Enter key triggers save
src/components/SettingsModal.tsx
API key and access code inputs now call handleSave() and prevent default behavior when Enter is pressed.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: aiedwardyi

Poem

A rabbit tapped Enter with glee,
No form to submit, just handleSave() and me,
Keys saved quick, no need to click,
In the settings box, all snug and slick.


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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 onKeyDown handlers to API-key inputs to save on Enter.
  • Add onKeyDown handler to the access-code input to save on Enter.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/SettingsModal.tsx Outdated
Comment thread src/components/SettingsModal.tsx Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between dae7118 and 1fedf4b.

📒 Files selected for processing (1)
  • src/components/SettingsModal.tsx

Comment thread src/components/SettingsModal.tsx Outdated
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 1fedf4bceb

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@aiedwardyi
aiedwardyi merged commit 88355bd into main Jul 4, 2026
2 checks passed
@aiedwardyi
aiedwardyi deleted the fix/settings-enter-to-save branch July 4, 2026 04:45
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.

2 participants