Skip to content

fix(collection-settings): save presets using shortcuts - #9138

Merged
sachin-thakur-bruno merged 1 commit into
usebruno:mainfrom
shubh-bruno:fix/save-presets
Sep 1, 2026
Merged

sachin-thakur-bruno merged 1 commit into
usebruno:mainfrom
shubh-bruno:fix/save-presets

Conversation

@shubh-bruno

@shubh-bruno shubh-bruno commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Description

As this is small task under transient requests presets hence taken care for - BRU-2070

Changing presets and saving using shortcuts is not saving until we click somewhere else and press the save shortcut again

Problem

When changing presets and pressing shortcuts it is not saving - reason mousetrap class is not being passed to the respective <input/> tag

Fix

Pass mousetrap class to the respective <input/> tag in preset settings

Before vs After

Screen.Recording.2026-09-01.at.12.35.49.PM.mov

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.
  • I've run the claude code review skill locally.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • Improvements
    • Enhanced keyboard shortcut handling for the default base URL field.
    • Enabled keyboard shortcut support for segmented control options.

@coderabbitai

coderabbitai Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 6e53eee7-e639-4499-aa51-05494a425502

📥 Commits

Reviewing files that changed from the base of the PR and between 6978e54 and df3eec6.

📒 Files selected for processing (2)
  • packages/bruno-app/src/components/CollectionSettings/Presets/index.js
  • packages/bruno-app/src/ui/SegmentedControl/components/Segment.jsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The changes add the mousetrap CSS class to the default base URL input and the segmented control radio input.

Changes

Mousetrap Class Updates

Layer / File(s) Summary
Tag keyboard-bindable inputs
packages/bruno-app/src/components/CollectionSettings/Presets/index.js, packages/bruno-app/src/ui/SegmentedControl/components/Segment.jsx
The default base URL input and segmented radio input now include the mousetrap class.

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

Merge Risk: ⚪ Minimal · up to df3ee

This localized UI change enables preset saving shortcuts while the affected controls are focused without changing persistence or other application behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: bijin-bruno

Poem

Two inputs wear a new class
Keyboard paths now find them fast
Base URLs join the tune
Radio segments follow soon
Mousetrap taps beneath the moon

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: fixing preset saving when users use keyboard shortcuts. It is concise and specific.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@sachin-thakur-bruno

Copy link
Copy Markdown
Collaborator

we should think about a better approach to fix this mousetrap issue. This way we have to add on every input type field.
Merging this for now. Lets create a tech debt and try to fix this.

@shubh-bruno

Copy link
Copy Markdown
Collaborator Author

we should think about a better approach to fix this mousetrap issue. This way we have to add on every input type field. Merging this for now. Lets create a tech debt and try to fix this.

Agreed

@sachin-thakur-bruno
sachin-thakur-bruno merged commit 3ce3a7a into usebruno:main Sep 1, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants