Skip to content

feat: Add right-click context menu to request tabs with MenuDropdown#6459

Closed
sanjaikumar-bruno wants to merge 3 commits intousebruno:mainfrom
sanjaikumar-bruno:fix/request-tab-right-click-menu
Closed

feat: Add right-click context menu to request tabs with MenuDropdown#6459
sanjaikumar-bruno wants to merge 3 commits intousebruno:mainfrom
sanjaikumar-bruno:fix/request-tab-right-click-menu

Conversation

@sanjaikumar-bruno
Copy link
Member

@sanjaikumar-bruno sanjaikumar-bruno commented Dec 18, 2025

BRU-2376

Before:

Screen.Recording.2025-12-22.at.12.16.07.PM.mov

After:

Screen.Recording.2025-12-18.at.9.37.38.PM.mov

… update Dropdown props handling in Dropdown component
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

Replaces the inline Dropdown with a Portal-wrapped MenuDropdown for request tabs, makes Dropdown's appendTo configurable, and moves menu styling from a wrapper component to a global MenuDropdownGlobalStyle via createGlobalStyle.

Changes

Cohort / File(s) Change Summary
Dropdown Configuration
packages/bruno-app/src/components/Dropdown/index.js
Adds `const appendTo = props.appendTo
Tab Menu Refactoring
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js
Replaces inline Dropdown with MenuDropdown; introduces menuDropdownRef and tabLabelRef; removes manual dropdownTippyRef toggling; builds memoized menuItems with contextual disabled states; renders MenuDropdown via Portal; updates RequestTabMenu props/signature to accept menuDropdownRef and tabLabelRef.
Menu Styling Architecture
packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
Replaces default StyledWrapper export with named MenuDropdownGlobalStyle using createGlobalStyle; moves tippy/menu styling to global styles (tippy-box, tippy-content, role="menu", item states, focus/hover/active).
Menu Dropdown Rendering
packages/bruno-app/src/ui/MenuDropdown/index.js
Imports and injects MenuDropdownGlobalStyle (named) and wraps render in Fragment; removes previous StyledWrapper wrapper while preserving component API.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Inspect RequestTabMenu new menuItems logic and disabled-state conditions for edge cases.
  • Verify callers pass menuDropdownRef and tabLabelRef correctly and no dangling refs remain.
  • Confirm MenuDropdownGlobalStyle selectors are scoped enough to avoid affecting other Tippy instances.
  • Validate appendTo behavior in Dropdown with both controlled and uncontrolled props.

Suggested labels

size/XL

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno

Poem

✨ Tabs now summon menus that roam,
Global styles give dropdowns a home,
Refs align and items show,
Portals let the context flow,
Code in place — the shortcuts glow.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: implementing a right-click context menu for request tabs using the new MenuDropdown component.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (1)

440-454: Empty catch block silently swallows errors.

The handleCloseTab function has an empty catch block that suppresses all errors. If saving or closing fails, the user won't know.

Consider at least logging the error or showing a toast notification.

🔎 Apply this diff to add error handling:
     try {
       const item = findItemInCollection(collection, tabUid);
       // silently save unsaved changes before closing the tab
       if (hasRequestChanges(item)) {
         await dispatch(saveRequest(item.uid, collection.uid, true));
       }
 
       dispatch(closeTabs({ tabUids: [tabUid] }));
-    } catch (err) { }
+    } catch (err) {
+      console.error('Failed to close tab:', err);
+      toast.error('Failed to close tab');
+    }
packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js (1)

1-174: Refactor global .tippy-box selector to prevent style conflicts.

The MenuDropdownGlobalStyle injects global .tippy-box styles that will override component-scoped Tippy styles across the entire app. This creates specificity conflicts with other Tippy instances:

  • Dropdown component (used by MenuDropdown) has scoped .tippy-box styles in its StyledWrapper that will be overridden
  • HttpMethodSelector, EnvironmentSelector, ApiSpecs, Collections, and Auth components all have component-scoped .tippy-box styles that may be unintentionally affected

Either scope the styles to MenuDropdown specifically (e.g., .tippy-box.menu-dropdown) or consolidate all dropdown styling into a single, intentionally-global definition with clear documentation of which Tippy instances should follow this pattern.

🧹 Nitpick comments (4)
packages/bruno-app/src/ui/MenuDropdown/index.js (1)

435-467: Consider potential duplicate global style injections.

Each MenuDropdown instance now injects MenuDropdownGlobalStyle into the document. If multiple MenuDropdowns are rendered simultaneously (e.g., nested menus or multiple tabs with context menus), the global style will be injected multiple times. While styled-components deduplicates identical global styles, this is still unnecessary overhead.

Consider one of these approaches:

  1. Inject MenuDropdownGlobalStyle once at the app root level instead of per-component instance
  2. If per-instance injection is intentional, add a comment explaining why
🔎 Example: Move global style to app root

In your app root (e.g., App.js or index.js):

+import { MenuDropdownGlobalStyle } from 'ui/MenuDropdown/StyledWrapper';

 function App() {
   return (
     <ThemeProvider theme={theme}>
+      <MenuDropdownGlobalStyle />
       <AppContent />
     </ThemeProvider>
   );
 }

Then remove the global style from MenuDropdown/index.js:

-import { MenuDropdownGlobalStyle } from './StyledWrapper';

 return (
-  <Fragment>
-    <MenuDropdownGlobalStyle />
     <Dropdown
       onCreate={onDropdownCreate}
       // ...
     </Dropdown>
-  </Fragment>
 );
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (3)

427-427: Remove unused tabItem prop.

The tabItem prop is passed from the parent (line 406) but is not destructured or used in the RequestTabMenu function. The component derives currentTabItem independently using findItemInCollection.

🔎 Apply this diff to clean up the unused prop:

In the parent component:

 <RequestTabMenu
   menuDropdownRef={menuDropdownRef}
   tabLabelRef={tabLabelRef}
   tabIndex={tabIndex}
   collectionRequestTabs={collectionRequestTabs}
-  tabItem={item}
   collection={collection}
   dispatch={dispatch}
 />

456-470: Empty catch block silently swallows errors.

Similar to handleCloseTab, handleRevertChanges has an empty catch block. Consider adding error logging or user notification.

🔎 Apply this diff:
     try {
       const item = findItemInCollection(collection, currentTabUid);
       if (item.draft) {
         dispatch(deleteRequestDraft({
           itemUid: item.uid,
           collectionUid: collection.uid
         }));
       }
-    } catch (err) { }
+    } catch (err) {
+      console.error('Failed to revert changes:', err);
+      toast.error('Failed to revert changes');
+    }

550-567: LGTM! MenuDropdown is correctly configured with ref-based control.

The dropdown is properly set up with document.body rendering and dynamic positioning via getReferenceClientRect. The empty <span> child is a necessary workaround since MenuDropdown requires a trigger element even when controlled via ref.

Consider adding a comment explaining this:

{/* Empty span required for MenuDropdown's trigger prop, actual control is via ref */}
<span></span>
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 052d143 and eba1c31.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/Dropdown/index.js (1 hunks)
  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (11 hunks)
  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js (2 hunks)
  • packages/bruno-app/src/ui/MenuDropdown/index.js (3 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() not func ()
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/ui/MenuDropdown/StyledWrapper.js
  • packages/bruno-app/src/ui/MenuDropdown/index.js
  • packages/bruno-app/src/components/Dropdown/index.js
  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js
🧠 Learnings (4)
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
  • packages/bruno-app/src/ui/MenuDropdown/index.js
  • packages/bruno-app/src/components/Dropdown/index.js
  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js
🧬 Code graph analysis (2)
packages/bruno-app/src/ui/MenuDropdown/index.js (1)
packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js (1)
  • MenuDropdownGlobalStyle (3-172)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (1)
packages/bruno-app/src/ui/MenuDropdown/index.js (1)
  • MenuDropdown (53-468)
⏰ 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: Playwright E2E Tests
  • GitHub Check: Unit Tests
  • GitHub Check: CLI Tests
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
🔇 Additional comments (8)
packages/bruno-app/src/components/Dropdown/index.js (1)

7-10: LGTM! Clean addition of configurable appendTo prop.

The change allows consumers to control where Tippy renders the dropdown while maintaining backward compatibility with the default 'parent' value.

packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (7)

2-2: LGTM! Imports are properly added.

Both Portal and MenuDropdown are correctly imported and used in the component.

Also applies to: 21-21


35-35: LGTM! Refs are properly initialized.

Both refs are correctly used for MenuDropdown positioning and control.

Also applies to: 43-43


103-107: LGTM! Right-click handler is correctly implemented.

Properly prevents default context menu and uses optional chaining for safe ref access.


380-380: LGTM! Ref attachment is correctly placed.

The ref is properly attached to the tab label for MenuDropdown positioning.


401-409: LGTM! Props correctly updated for new MenuDropdown pattern.

The new props align with the MenuDropdown-based implementation and replace the legacy Dropdown pattern.


498-548: LGTM! Menu items are well-structured with proper dependencies.

The menu items array is correctly memoized with all necessary dependencies, and the disabled logic for each item is appropriate.


583-583: LGTM! Portal correctly renders dropdown outside normal DOM flow.

This ensures proper layering and positioning for the context menu.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (1)

471-495: forEach with async handleCloseTab doesn't await completion.

This fires all close operations concurrently without waiting, potentially causing race conditions or UI inconsistencies when closing multiple tabs.

🧹 Nitpick comments (1)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (1)

439-469: Empty catch blocks silently swallow errors.

Both handleCloseTab and handleRevertChanges have empty catch blocks. Consider logging errors for debugging, even if no user-facing action is required.

🔎 Suggested improvement:
     } catch (err) { }
+    } catch (err) {
+      console.error('Failed to close tab:', err);
+    }
-    } catch (err) { }
+    } catch (err) {
+      console.error('Failed to revert changes:', err);
+    }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eba1c31 and d4d67bc.

📒 Files selected for processing (1)
  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (10 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() not func ()
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
🧠 Learnings (1)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js
🧬 Code graph analysis (1)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (1)
packages/bruno-app/src/ui/MenuDropdown/index.js (1)
  • MenuDropdown (53-468)
⏰ 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: SSL Tests - Windows
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
🔇 Additional comments (4)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (4)

20-20: LGTM!

Clean additions of MenuDropdown import and the necessary refs for positioning and programmatic control.

Also applies to: 34-34, 42-42


102-106: LGTM!

Proper event handling with preventDefault/stopPropagation and safe optional chaining for the ref.


497-548: LGTM!

Well-structured menu items with appropriate disabled states based on tab context. Dependency array covers all necessary closure references.


549-564: LGTM!

Good use of getReferenceClientRect for positioning relative to the tab label, with proper fallback handling. Portal to document.body ensures correct stacking context.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (2)

447-461: Silent error swallowing in empty catch block.

The empty catch block at line 460 silently swallows any errors from saveRequest or closeTabs. This makes debugging difficult and hides potential issues from users.

🔎 Apply this diff:
   async function handleCloseTab(tabUid) {
     if (!tabUid) {
       return;
     }
 
     try {
       const item = findItemInCollection(collection, tabUid);
       // silently save unsaved changes before closing the tab
       if (hasRequestChanges(item)) {
         await dispatch(saveRequest(item.uid, collection.uid, true));
       }
 
       dispatch(closeTabs({ tabUids: [tabUid] }));
-    } catch (err) { }
+    } catch (err) {
+      console.error('Failed to close tab:', err);
+    }
   }

463-477: Silent error swallowing in handleRevertChanges.

Similar to handleCloseTab, this function has an empty catch block that swallows errors silently.

🔎 Apply this diff:
   function handleRevertChanges() {
     if (!currentTabUid) {
       return;
     }
 
     try {
       const item = findItemInCollection(collection, currentTabUid);
       if (item.draft) {
         dispatch(deleteRequestDraft({
           itemUid: item.uid,
           collectionUid: collection.uid
         }));
       }
-    } catch (err) { }
+    } catch (err) {
+      console.error('Failed to revert changes:', err);
+    }
   }
🧹 Nitpick comments (6)
packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js (4)

1-1: Remove unused import.

The styled import is not used anywhere in this file. Based on learnings, the project typically uses styled components as wrappers, but this file now only exports a global style.

🔎 Apply this diff:
-import styled, { createGlobalStyle } from 'styled-components';
+import { createGlobalStyle } from 'styled-components';

3-173: Consider the implications of using global styles for component-specific styling.

Using createGlobalStyle to target third-party library classes (.tippy-box) globally may cause unintended side effects if other Tippy instances exist elsewhere in the app. This approach deviates from the project's pattern of using styled component wrappers for component-specific styles.

While this may be intentional for portal-rendered dropdowns, consider:

  • Adding a more specific class selector to scope these styles only to MenuDropdown instances
  • Or documenting that these styles apply to all Tippy instances app-wide

Based on learnings, styled components are typically used as wrappers to define both self and children component styles in this codebase.


13-13: Avoid !important if possible.

The !important flag is generally a code smell, though it may be necessary here to override Tippy's default inline styles. If this is required to override library defaults, consider adding a comment explaining why.


116-122: Extract inline color calculation to a helper function.

The inline RGBA conversion logic reduces readability and is repeated in similar patterns elsewhere in the codebase. Consider extracting this to a utility function.

🔎 Suggested approach:

Create a utility function in a theme/color helpers file:

// utils/colors.js
export const hexToRgba = (hex, alpha) => {
  const cleanHex = hex.replace('#', '');
  const r = parseInt(cleanHex.substring(0, 2), 16);
  const g = parseInt(cleanHex.substring(2, 4), 16);
  const b = parseInt(cleanHex.substring(4, 6), 16);
  return `rgba(${r}, ${g}, ${b}, ${alpha})`;
};

Then use it:

           &:hover {
-            background-color: ${({ theme }) => {
-              const hex = theme.colors.text.danger.replace('#', '');
-              const r = parseInt(hex.substring(0, 2), 16);
-              const g = parseInt(hex.substring(2, 4), 16);
-              const b = parseInt(hex.substring(4, 6), 16);
-              return `rgba(${r}, ${g}, ${b}, 0.04)`; // 4% opacity
-            }} !important;
+            background-color: ${({ theme }) => hexToRgba(theme.colors.text.danger, 0.04)} !important;
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (2)

479-503: Good fix for async/await pattern!

The handlers now correctly use Promise.all with await, addressing the previous review comment about forEach with async functions. However, handleCloseSavedTabs (line 494) is inconsistent—it doesn't follow the async pattern and doesn't await tab closures like the others.

Consider making handleCloseSavedTabs consistent:

🔎 Apply this diff:
-  function handleCloseSavedTabs() {
+  async function handleCloseSavedTabs() {
     const items = flattenItems(collection?.items);
     const savedTabs = items?.filter?.((item) => !hasRequestChanges(item));
     const savedTabIds = savedTabs?.map((item) => item.uid) || [];
-    dispatch(closeTabs({ tabUids: savedTabIds }));
+    await Promise.all(savedTabIds.map((uid) => handleCloseTab(uid)));
   }

505-555: Optimize useMemo dependency array.

The dispatch function from useDispatch() is stable and doesn't need to be in the dependency array. Including it causes unnecessary recalculations.

🔎 Apply this diff:
-  ], [currentTabUid, currentTabItem, hasOtherTabs, hasLeftTabs, hasRightTabs, collection, collectionRequestTabs, tabIndex, dispatch]);
+  ], [currentTabUid, currentTabItem, hasOtherTabs, hasLeftTabs, hasRightTabs, collection, collectionRequestTabs, tabIndex]);
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4d67bc and d22e4d0.

📒 Files selected for processing (2)
  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (10 hunks)
  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js (2 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() not func ()
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
  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
🧠 Learnings (4)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-app/src/components/RequestTabs/RequestTab/index.js
  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors

Applied to files:

  • packages/bruno-app/src/ui/MenuDropdown/StyledWrapper.js
⏰ 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: Playwright E2E Tests
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: Unit Tests
  • GitHub Check: CLI Tests
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
🔇 Additional comments (2)
packages/bruno-app/src/components/RequestTabs/RequestTab/index.js (2)

429-436: Good defensive programming for getBoundingClientRect.

The zero-sized rect fallback when the element isn't mounted prevents Tippy errors. Nice implementation!


557-567: MenuDropdown integration looks solid.

The portal approach with appendTo={document.body} and custom positioning via getReferenceClientRect is a clean solution for avoiding overflow issues with request tabs.

@bijin-bruno
Copy link
Collaborator

This PR has been revised and merged via #6502

@sanjaikumar-bruno sanjaikumar-bruno deleted the fix/request-tab-right-click-menu branch December 26, 2025 08:21
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.

2 participants