You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add missing text inputs in macOS Configure Bundler dialog (#2747)
- [x] Investigate the issue and locate the problematic code
- [x] Fix the macOS Configure Bundler dialog to add text input fields
- [x] Review code and address feedback
- [x] Remove formatting-only changes
- [x] Keep iOS code unchanged
- [x] Final security check
- [x] Complete implementation
## Issue Summary
The "Configure Bundler" screen in the dev menu was missing text input
fields on macOS. The iOS version properly creates an alert with three
text fields for IP, port, and entrypoint, but the macOS version only
showed a simple alert with a message and a "Use bundled JS" button
without any input fields.
## Changes Made
Updated the macOS implementation in `RCTDevMenu.mm` to:
- ✅ Add three NSTextField inputs for IP address, port, and entrypoint
using NSAlert's accessoryView property
- ✅ Implement proper button handlers for "Apply Changes", "Reset to
Default", and "Cancel"
- ✅ Match the iOS functionality for configuring the bundler location
exactly
- ✅ Keep iOS code section completely unchanged from original
- ✅ Only modify the macOS section within the `#else // [macOS` block
## Implementation Details
The implementation follows the same pattern used in `RCTAlertManager.mm`
for adding text fields to NSAlert dialogs on macOS:
1. Creates an NSView as an accessory view with frame 300x90 points
2. Adds three NSTextField instances stacked vertically (30 points apart)
3. Sets appropriate placeholders ("0.0.0.0", "8081", "index") matching
iOS
4. Handles three button responses (Apply Changes, Reset to Default,
Cancel)
5. Uses the same validation and configuration logic as iOS (inline in
macOS section)
### Code Organization
- **iOS section**: Completely unchanged from original implementation
- **macOS section**: New implementation with text input fields matching
iOS behavior
- Both platforms have their own inline logic to maintain clear
separation
## Testing
This is a UI-only change that requires manual testing on macOS. The
expected behavior is:
1. Open the dev menu (Cmd+D or shake gesture)
2. Select "Configure Bundler"
3. Verify three text input fields are displayed with placeholders
4. Test "Apply Changes" button with various inputs
5. Test "Reset to Default" button
6. Test "Cancel" button
## Security
- ✅ CodeQL check passed (no applicable code for analysis)
- ✅ No new security vulnerabilities introduced
- ✅ Uses same validation logic as existing iOS implementation
- Fixes#2746
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>[Dev Menu] TextInputs missing from "Configure Bundler"
screen of dev menu</issue_title>
> <issue_description>This is what the configure bundler screen looks
like:
>
> <img width="273" height="151" alt="Image"
src="https://github.com/user-attachments/assets/2f3eea1b-7d3e-4a64-9ab5-bc5c213200ff"
/>
>
> There should be text inputs for "Input Packager IP", "port and
entrypoint".. so something went wrong. </issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- Fixes#2746
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in
our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Saadnajmi <6722175+Saadnajmi@users.noreply.github.com>
0 commit comments