Skip to content

fix: Improved logic for determining right side expandability of Response Actions - #6398

Merged
bijin-bruno merged 4 commits into
usebruno:mainfrom
abhishek-bruno:fix/responsive-response-pane
Dec 15, 2025
Merged

bijin-bruno merged 4 commits into
usebruno:mainfrom
abhishek-bruno:fix/responsive-response-pane

Conversation

@abhishek-bruno

@abhishek-bruno abhishek-bruno commented Dec 12, 2025 •

Copy link
Copy Markdown
Member

Description

Improved logic for determining right side expandability of Response Actions based on container width and provided width.

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.

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

    • Right-side content in the Response Pane can now expand to a fixed width when space allows, improving layout and readability.
    • Actions controls (dropdown vs. buttons) now show or hide based on the right-side expansion state (scoped to an "expandable" layout), reducing layout shifts.
  • Tests

    • Keyboard-shortcut tests updated to use a more general hover target for revealing collection actions, improving test reliability.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 12, 2025 •

Copy link
Copy Markdown
Contributor

Walkthrough

Switches the right-content expandability signal from a data attribute to a parent class (expandable); ResponsiveTabs gains a 375px optional expanded width and computes whether the right pane can expand; ResponsePane passes the constant; ResponsePaneActions styling now targets the expandable scope; two tests adjust hover targets.

Changes

Cohort / File(s) Summary
ResponsiveTabs logic
packages/bruno-app/src/ui/ResponsiveTabs/index.js
Added rightContentExpandedWidth prop and GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT; introduced rightSideExpandable state and layout calculation (left width + gap + rightExpandedWidth <= container width); applies an expandable class to right content when expandable.
ResponsePane integration
packages/bruno-app/src/components/ResponsePane/index.js
Adds RIGHT_CONTENT_EXPANDED_WIDTH = 375 and passes rightContentExpandedWidth={RIGHT_CONTENT_EXPANDED_WIDTH} into ResponsiveTabs.
ResponsePaneActions styling
packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
Replaced selector scoping from .vertical-layout & to .expandable & so action visibility toggles when a parent has class expandable.
Tests update
tests/request/copy-request/keyboard-shortcuts.spec.ts
Changed hover target from the collection actions element to the collection element for two test cases to reveal the menu.
Manifest
package.json
Included in diff (no semantic change noted in summary).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify the expandability calculation boundary conditions (rounding, scrollbars, padding).
  • Confirm the expandable class is applied to the actual parent element affecting the Actions wrapper.
  • Check CSS specificity to ensure .expandable & selector overrides other layout rules.
  • Validate the updated test hover selector is stable across viewport sizes.

Possibly related PRs

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • bijin-bruno
  • naman-bruno

Poem

A tiny width in code we place,
Panes decide to hold their space,
Parent class whispers "You can grow",
Buttons swap, dropdowns go,
Small change, big grin on the interface 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 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: improving the logic for determining right-side expandability of Response Actions, which is the core objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent 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 d7cdf12 and 97d9738.

📒 Files selected for processing (2)
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js (1 hunks)
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
  • packages/bruno-app/src/ui/ResponsiveTabs/index.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: Unit Tests
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - Linux

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (2)

10-10: Document the gap constant value.

The 80 pixel gap lacks explanation. Add a brief comment describing what this gap represents (e.g., minimum spacing for visual clarity, padding between sections, etc.).

+// Minimum gap between left tabs and right content for visual clarity
 const GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT = 80;

48-48: Consider extracting magic number 20 to a named constant.

Lines 48 and 57 add 20 to width measurements without explanation. While this predates your changes, the new expandability logic depends on accurate width calculations. Consider extracting to a constant like TAB_SPACING or ELEMENT_MARGIN.

+const ELEMENT_SPACING = 20; // Spacing/margin around tabs and right content
+
 const ResponsiveTabs = ({
   // ...
 }) => {
   // ...
   const calculateTabVisibility = useCallback(() => {
     // ...
-    const rightContentWidth = rightContentRef?.current?.offsetWidth + 20 || 0;
+    const rightContentWidth = rightContentRef?.current?.offsetWidth + ELEMENT_SPACING || 0;
     // ...
     for (const tab of tabs) {
       const tabElement = tabRefsMap.current[tab.key];
-      const tabWidth = tabElement?.offsetWidth + 20 || 100;
+      const tabWidth = tabElement?.offsetWidth + ELEMENT_SPACING || 100;

Also applies to: 57-57

📜 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 2f5537c and 6f67b4c.

📒 Files selected for processing (3)
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js (1 hunks)
  • packages/bruno-app/src/components/ResponsePane/index.js (1 hunks)
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js (6 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/ResponsePane/index.js
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
🧠 Learnings (1)
📚 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/ResponsiveTabs/index.js
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
🧬 Code graph analysis (1)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (5)
packages/bruno-app/src/components/Sidebar/index.js (1)
  • currentWidth (34-34)
packages/bruno-app/src/components/ResponsePane/index.js (2)
  • tabs (31-31)
  • rightContentRef (37-37)
packages/bruno-app/src/components/RequestPane/GraphQLRequestPane/index.js (1)
  • tabs (41-41)
packages/bruno-app/src/components/RequestPane/HttpRequestPane/index.js (1)
  • tabs (51-51)
packages/bruno-app/src/components/RequestTabPanel/index.js (1)
  • tabs (48-48)
⏰ 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: Unit Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: CLI Tests
🔇 Additional comments (3)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (3)

24-29: Good prop documentation.

The comment on line 25 clearly explains when rightContentExpandedWidth is used. The optional nature and purpose are well-documented.

Note: The spelling issue with "expandible" is addressed in a separate comment.


84-89: Verify strict inequality in expandability check.

Line 87 uses > (strict greater-than), requiring available space to exceed the expanded width. If containerWidth - leftContentWidth - GAP exactly equals rightContentExpandedWidth, the content won't expand. Confirm this is intentional, or consider using >=.

The equality check on line 88 (prev === expandible ? prev : expandible) correctly prevents unnecessary re-renders. Good optimization.


185-188: Clean conditional attribute pattern.

Only adding the data attribute when rightContentExpandedWidth is provided keeps the DOM clean and avoids unnecessary attributes. Well done.

Also applies to: 230-230

Comment on lines +17 to +18
/* When right side is expandible, show buttons and hide dropdown */
[data-right-side-expandible="true"] & {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Spelling: "expandible" should be "expandable".

The attribute name uses non-standard spelling. The correct spelling is "expandable" (with 'a'). This typo propagates through ResponsiveTabs and ResponsePane, affecting maintainability and search.

Apply these diffs across the affected files:

In this file (StyledWrapper.js):

-  /* When right side is expandible, show buttons and hide dropdown */
-  [data-right-side-expandible="true"] & {
+  /* When right side is expandable, show buttons and hide dropdown */
+  [data-right-side-expandable="true"] & {

In ResponsiveTabs/index.js:

-  const [rightSideExpandible, setRightSideExpandible] = useState(false);
+  const [rightSideExpandable, setRightSideExpandable] = useState(false);

-    // Only calculate expandibility if rightContentExpandedWidth is provided
+    // Only calculate expandability if rightContentExpandedWidth is provided
     if (rightContentExpandedWidth) {
       const leftContentWidth = currentWidth + (overflow.length ? DROPDOWN_WIDTH : 0);
-      const expandible = containerWidth - leftContentWidth - GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT > rightContentExpandedWidth;
-      setRightSideExpandible((prev) => (prev === expandible ? prev : expandible));
+      const expandable = containerWidth - leftContentWidth - GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT > rightContentExpandedWidth;
+      setRightSideExpandable((prev) => (prev === expandable ? prev : expandable));
     }

-  // Only add data attribute if rightContentExpandedWidth is provided
   const rightContentProps = rightContentExpandedWidth
-    ? { 'data-right-side-expandible': rightSideExpandible }
+    ? { 'data-right-side-expandable': rightSideExpandable }
     : {};

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In
packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
around lines 17-18 and in ResponsiveTabs/index.js, the custom data attribute is
misspelled as "data-right-side-expandible"; rename all occurrences to the
standard spelling "data-right-side-expandable" in selectors, JSX/HTML
attributes, tests and any string references, and update any related CSS rules or
JS logic that reads/writes that attribute so behavior remains identical after
the rename; run a project-wide search/replace to ensure no instances remain and
update imports or comments if they reference the old spelling.

@pull-request-size pull-request-size Bot added size/M and removed size/S labels Dec 13, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (2)

10-10: Add explanatory comment for consistency.

Following the pattern established in ResponsePane for RIGHT_CONTENT_EXPANDED_WIDTH, consider adding a comment explaining what this 80px gap represents (e.g., spacing between left tabs and right content).

+// Minimum gap between left tabs and right content area
 const GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT = 80;

84-84: Fix typo in comment.

"expandibility" should be "expandability".

-    // Only calculate expandibility if rightContentExpandedWidth is provided
+    // Only calculate expandability if rightContentExpandedWidth is provided
📜 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 6f67b4c and abe5b74.

📒 Files selected for processing (3)
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js (1 hunks)
  • packages/bruno-app/src/components/ResponsePane/index.js (2 hunks)
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
🧰 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/ResponsePane/index.js
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js
🧠 Learnings (1)
📚 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/ResponsiveTabs/index.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: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: Unit Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: CLI Tests
🔇 Additional comments (7)
packages/bruno-app/src/components/ResponsePane/index.js (2)

29-30: LGTM! Previous feedback addressed.

The magic number has been properly extracted to a named constant with a clear explanatory comment, improving maintainability.


252-252: Clean integration of the new prop.

The constant is correctly passed to ResponsiveTabs, enabling the expandability logic.

packages/bruno-app/src/ui/ResponsiveTabs/index.js (5)

24-26: Well-documented new prop.

The optional rightContentExpandedWidth parameter is clearly documented, making the API easy to understand.


29-29: Appropriate state initialization.

Defaulting to false is sensible until the expandability is calculated.


90-90: Dependency array correctly updated.

Adding rightContentExpandedWidth ensures the calculation re-runs when this prop changes.


185-188: Clean conditional data attribute pattern.

The approach of conditionally adding the data attribute only when rightContentExpandedWidth is provided keeps the DOM clean when the feature isn't used.


230-230: Proper integration of conditional props.

Spreading rightContentProps cleanly applies the data attribute when needed.

Comment on lines +86 to +88
const leftContentWidth = currentWidth + (overflow.length ? DROPDOWN_WIDTH : 0);
const expandable = containerWidth - leftContentWidth - GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT > rightContentExpandedWidth;
setRightSideExpandable((prev) => (prev === expandable ? prev : expandable));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

wc -l packages/bruno-app/src/ui/ResponsiveTabs/index.js

Repository: usebruno/bruno

Length of output: 111


🏁 Script executed:

sed -n '60,110p' packages/bruno-app/src/ui/ResponsiveTabs/index.js

Repository: usebruno/bruno

Length of output: 2021


🏁 Script executed:

sed -n '1,50p' packages/bruno-app/src/ui/ResponsiveTabs/index.js

Repository: usebruno/bruno

Length of output: 1723


🏁 Script executed:

grep -n "DROPDOWN_WIDTH\|GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT" packages/bruno-app/src/ui/ResponsiveTabs/index.js

Repository: usebruno/bruno

Length of output: 436


🏁 Script executed:

grep -n "expandable\|rightContentExpandedWidth\|rightSideExpandable" packages/bruno-app/src/ui/ResponsiveTabs/index.js | head -20

Repository: usebruno/bruno

Length of output: 872


🏁 Script executed:

find packages/bruno-app -type f -name "*ResponsiveTabs*test*" -o -name "*ResponsiveTabs*.spec*"

Repository: usebruno/bruno

Length of output: 40


🏁 Script executed:

sed -n '180,195p' packages/bruno-app/src/ui/ResponsiveTabs/index.js

Repository: usebruno/bruno

Length of output: 579


Add a clarifying comment explaining the strict inequality check.

Line 87 uses > to ensure expansion only occurs when available space exceeds rightContentExpandedWidth. Since GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT (80px) is already subtracted from the available space, the strict inequality provides an additional safety buffer beyond the minimum gap—preventing visual cramping when space is tight. Add a comment explaining this design rationale to clarify that the operator is intentional, not an oversight.

🤖 Prompt for AI Agents
In packages/bruno-app/src/ui/ResponsiveTabs/index.js around lines 86 to 88, the
strict '>' check on line 87 that decides whether the right side is expandable
needs an explanatory comment; add a short comment above the calculation stating
that because we already subtract GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT (80px), the
strict inequality is intentional to provide an extra safety buffer beyond the
minimum gap so expansion only occurs when there is comfortably more space than
rightContentExpandedWidth (preventing visual cramping), and note that this is
deliberate rather than a bug.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
tests/request/copy-request/keyboard-shortcuts.spec.ts (1)

56-60: Consider extracting a shared helper for opening collection actions

You duplicate the collection.hover() + .collection-actions .icon click flow in both tests; consider extracting this into a small helper (optionally wrapped in a test.step) to reduce repetition and make the intent (“open collection actions menu”) clearer.

📜 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 abe5b74 and d87247c.

📒 Files selected for processing (1)
  • tests/request/copy-request/keyboard-shortcuts.spec.ts (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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:

  • tests/request/copy-request/keyboard-shortcuts.spec.ts
tests/**/**.*

⚙️ CodeRabbit configuration file

tests/**/**.*: Review the following e2e test code written using the Playwright test library. Ensure that:

  • Follow best practices for Playwright code and e2e automation

  • Try to reduce usage of page.waitForTimeout(); in code unless absolutely necessary and the locator cannot be found using existing expect() playwright calls

  • Avoid using page.pause() in code

  • Use locator variables for locators

  • Avoid using test.only

  • Use multiple assertions

  • Promote the use of test.step as much as possible so the generated reports are easier to read

  • Ensure that the fixtures like the collections are nested inside the fixtures folder

    Fixture Example*: Here's an example of possible fixture and test pair

    .
    ├── fixtures
    │   └── collection
    │       ├── base.bru
    │       ├── bruno.json
    │       ├── collection.bru
    │       ├── ws-test-request-with-headers.bru
    │       ├── ws-test-request-with-subproto.bru
    │       └── ws-test-request.bru
    ├── connection.spec.ts # <- Depends on the collection in ./fixtures/collection
    ├── headers.spec.ts
    ├── persistence.spec.ts
    ├── variable-interpolation
    │   ├── fixtures
    │   │   └── collection
    │   │       ├── environments
    │   │       ├── bruno.json
    │   │       └── ws-interpolation-test.bru
    │   ├── init-user-data
    │   └── variable-interpolation.spec.ts # <- Depends on the collection in ./variable-interpolation/fixtures/collection
    └── subproto.spec.ts
    

Files:

  • tests/request/copy-request/keyboard-shortcuts.spec.ts
🧬 Code graph analysis (1)
tests/request/copy-request/keyboard-shortcuts.spec.ts (1)
packages/bruno-app/src/components/Sidebar/Collections/Collection/CollectionItem/index.js (1)
  • collection (65-65)
⏰ 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 - Linux
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: CLI Tests
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
🔇 Additional comments (1)
tests/request/copy-request/keyboard-shortcuts.spec.ts (1)

13-20: Explicit collection hover before opening actions looks correct

Using await collection.hover(); before clicking .collection-actions .icon matches a typical pattern where the row hover reveals the actions; this should make the test more robust against the updated UI behavior. No further changes needed here.

@abhishek-bruno
abhishek-bruno force-pushed the fix/responsive-response-pane branch from d87247c to d7cdf12 Compare December 15, 2025 10:07

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js (1)

17-18: Fix typo in comment: "expandible" → "expandable".

The data attribute selector itself is correct (data-right-side-expandable), but the comment still uses the misspelling.

-  /* When right side is expandible, show buttons and hide dropdown */
+  /* When right side is expandable, show buttons and hide dropdown */
   [data-right-side-expandable="true"] & {
🧹 Nitpick comments (1)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (1)

84-89: Minor typo in comment: "expandibility" → "expandability".

Also, per the past review feedback, consider adding a brief comment explaining why the strict > inequality is used on line 87 (i.e., the gap is already subtracted, so > provides an extra safety buffer).

-    // Only calculate expandibility if rightContentExpandedWidth is provided
+    // Only calculate expandability if rightContentExpandedWidth is provided
     if (rightContentExpandedWidth) {
       const leftContentWidth = currentWidth + (overflow.length ? DROPDOWN_WIDTH : 0);
+      // Strict '>' ensures expansion only when space comfortably exceeds the required width
       const expandable = containerWidth - leftContentWidth - GAP_BETWEEN_LEFT_AND_RIGHT_CONTENT > rightContentExpandedWidth;
📜 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 d87247c and d7cdf12.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/ResponsePane/ResponsePaneActions/StyledWrapper.js (1 hunks)
  • packages/bruno-app/src/components/ResponsePane/index.js (2 hunks)
  • packages/bruno-app/src/ui/ResponsiveTabs/index.js (6 hunks)
  • tests/request/copy-request/keyboard-shortcuts.spec.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/bruno-app/src/components/ResponsePane/index.js
  • tests/request/copy-request/keyboard-shortcuts.spec.ts
🧰 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/ResponsePane/ResponsePaneActions/StyledWrapper.js
  • packages/bruno-app/src/ui/ResponsiveTabs/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/components/ResponsePane/ResponsePaneActions/StyledWrapper.js
  • packages/bruno-app/src/ui/ResponsiveTabs/index.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/components/ResponsePane/ResponsePaneActions/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 **/*.{js,jsx,ts,tsx} : Add in meaningful comments instead of obvious ones where complex code flow is explained properly

Applied to files:

  • packages/bruno-app/src/ui/ResponsiveTabs/index.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 **/*.{js,jsx,ts,tsx} : Add in JSDoc comments to add more details to the abstractions if needed

Applied to files:

  • packages/bruno-app/src/ui/ResponsiveTabs/index.js
🧬 Code graph analysis (1)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (2)
packages/bruno-app/src/components/Sidebar/index.js (1)
  • currentWidth (34-34)
packages/bruno-app/src/components/ResponsePane/index.js (1)
  • rightContentRef (40-40)
⏰ 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 - macOS
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: CLI Tests
  • GitHub Check: Unit Tests
  • GitHub Check: Playwright E2E Tests
🔇 Additional comments (4)
packages/bruno-app/src/ui/ResponsiveTabs/index.js (4)

10-10: LGTM!

Good use of a named constant for the gap value. Makes the layout calculation more readable and maintainable.


24-29: LGTM!

Clean prop and state additions. The optional rightContentExpandedWidth prop is well-named and the inline comment provides helpful context.


185-188: LGTM!

Clean conditional prop object pattern. The ternary ensures the data attribute is only applied when rightContentExpandedWidth is provided.


230-230: LGTM!

Spreading rightContentProps onto the wrapper is the right approach for conditionally applying the data attribute.

@bijin-bruno
bijin-bruno merged commit c11266a into usebruno:main Dec 15, 2025
maxenceleblanc pushed a commit to maxenceleblanc/curly_cats2 that referenced this pull request Jul 20, 2026
…nse Actions (usebruno#6398)

* fix: Improved logic for determining right side expandability based on container width and provided width.

* refactor: Standardize naming for right-side expandability a

* refactor: Simplify collection interaction in keyboard shortcuts tests

* refactor: Update right-side expandability logic in ResponsiveTabs and StyledWrapper components
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