fix: bruno crash on request rename#6410
Conversation
WalkthroughThe RequestTab component was refactored to extract Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ 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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (1)
54-56: LGTM! Clean constant extraction following established patterns.The
hasChangesmemoization is consistent with similar usages inQueryUrl,WsQueryUrl, andRequestTabMenu. Extracting these constants ensures they're computed once per render and used consistently throughout the component, which helps prevent potential race conditions during request rename operations.Optional refinement: For consistency, you could memoize
isWSas well:-const isWS = item?.type === 'ws-request'; +const isWS = useMemo(() => item?.type === 'ws-request', [item?.type]);However, since this is a trivial property access and comparison, the current approach is perfectly acceptable.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CODING_STANDARDS.md)
**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions.() => {}is good
No space between function name and parentheses.func()notfunc ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly
Files:
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js
🧬 Code graph analysis (1)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (4)
packages/bruno-app/src/components/RequestTabs/ExampleTab/index.js (1)
hasChanges(23-23)packages/bruno-app/src/components/RequestPane/QueryUrl/index.js (1)
hasChanges(40-40)packages/bruno-app/src/components/RequestPane/WsQueryUrl/index.js (1)
hasChanges(44-44)packages/bruno-app/src/utils/collections/index.js (2)
hasRequestChanges(1010-1026)hasRequestChanges(1010-1026)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: CLI Tests
- GitHub Check: Unit Tests
- GitHub Check: Playwright E2E Tests
- GitHub Check: SSL Tests - macOS
- GitHub Check: SSL Tests - Linux
- GitHub Check: SSL Tests - Windows
Description
Contribution Checklist:
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
✏️ Tip: You can customize this high-level summary in your review settings.