Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughSet NewRequest's Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
🧹 Nitpick comments (1)
packages/bruno-app/src/components/Sidebar/NewRequest/index.js (1)
340-363: Consider resetting method to GET when switching back to HTTP.The GraphQL radio now forces
POST, but the HTTP radio (lines 340-348) still uses plainformik.handleChange. If a user selects GraphQL (sets method to POST) then switches back to HTTP, the method remains POST. This asymmetry may confuse users expecting a "clean slate."For consistency, consider applying the same pattern to the HTTP radio:
♻️ Suggested change for HTTP radio
<input type="radio" id="http-request" name="requestType" value="http-request" checked={formik.values.requestType === 'http-request'} - onChange={formik.handleChange} + onChange={(e) => { + formik.handleChange(e); + formik.setFieldValue('requestMethod', 'GET'); + }} data-testid="http-request" />🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/bruno-app/src/components/Sidebar/NewRequest/index.js` around lines 340 - 363, The HTTP radio input (id "http-request", name "requestType") currently only calls formik.handleChange so if the user previously picked GraphQL (which sets requestMethod to 'POST' in the graphql radio onChange), the method remains POST; update the HTTP radio's onChange to call formik.handleChange(e) and also call formik.setFieldValue('requestMethod', 'GET') so switching back to HTTP resets the method to GET.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/bruno-app/src/components/Sidebar/NewRequest/index.js`:
- Around line 340-363: The HTTP radio input (id "http-request", name
"requestType") currently only calls formik.handleChange so if the user
previously picked GraphQL (which sets requestMethod to 'POST' in the graphql
radio onChange), the method remains POST; update the HTTP radio's onChange to
call formik.handleChange(e) and also call formik.setFieldValue('requestMethod',
'GET') so switching back to HTTP resets the method to GET.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 079d4406-40ed-472f-b823-b92d34645244
📒 Files selected for processing (1)
packages/bruno-app/src/components/Sidebar/NewRequest/index.js
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/bruno-app/src/components/Sidebar/NewRequest/index.js`:
- Around line 264-267: The WebSocket radio currently calls formik.handleChange
directly which leaves requestMethod set to 'POST' after switching from GraphQL;
update the WebSocket radio to use handleRequestTypeChange (or create a new
onChange handler) so that when request type is 'websocket' you call
formik.setFieldValue('requestMethod', 'ws') (or set it to 'ws' explicitly) to
mirror other WS creation paths and prevent newWsRequest from inheriting an HTTP
method; locate the radio input that currently uses formik.handleChange and
replace it with handleRequestTypeChange or a small wrapper that sets
requestMethod to 'ws'.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b3a34f5b-2c9d-42d3-9db7-2c29fb2e2bc5
📒 Files selected for processing (1)
packages/bruno-app/src/components/Sidebar/NewRequest/index.js
Screen.Recording.2026-04-08.at.6.44.17.PM.mov
Summary by CodeRabbit