fix(request-panel)/changed request panel static width to percentage width of screen width#8499
Conversation
…/naming-collisions/02-electron-authoritative-copy-clone
…/02-electron-authoritative-copy-clone feat/electron-filename-copy-paste-clone
…ollisions/02-electron-authoritative-copy-clone Revert "feat/electron-filename-copy-paste-clone"
…idth of screen width
|
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 as they are similar to previous changes (1)
WalkthroughThe console details panel now derives its maximum width from the measured console container width, and the shared resizable-panel hook re-clamps widths when bounds change. ChangesResponsive resizable panel sizing
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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.
🧹 Nitpick comments (1)
packages/bruno-app/src/hooks/useResizablePanel/index.js (1)
73-81: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winRe-clamp effect looks correct; consider a regression test.
The effect correctly re-clamps
widthwhenminWidth/maxWidthshrink while not dragging, satisfying the PR goal. One gap: the existing spec file only covers clamp-during-drag behavior (per the provided snippet), with no test exercising this new "bounds shrink while not dragging" path (e.g., simulating amaxWidthprop decrease below current width).As per coding guidelines, "Add tests for any new functionality or meaningful changes." This re-clamp effect is new, meaningful behavior worth covering.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/bruno-app/src/hooks/useResizablePanel/index.js` around lines 73 - 81, The re-clamp behavior in useResizablePanel should be covered with a regression test. Update the existing spec for useResizablePanel to simulate a bounds change where maxWidth (or minWidth) shrinks below the current width while isDragging.current is false, then assert that the hook re-clamps the width through the useEffect path and updates currentWidth accordingly. Use the clamp logic and the useResizablePanel hook setup already present in the test file to keep the new case aligned with the existing drag-clamp coverage.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/bruno-app/src/hooks/useResizablePanel/index.js`:
- Around line 73-81: The re-clamp behavior in useResizablePanel should be
covered with a regression test. Update the existing spec for useResizablePanel
to simulate a bounds change where maxWidth (or minWidth) shrinks below the
current width while isDragging.current is false, then assert that the hook
re-clamps the width through the useEffect path and updates currentWidth
accordingly. Use the clamp logic and the useResizablePanel hook setup already
present in the test file to keep the new case aligned with the existing
drag-clamp coverage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 1aae3ebc-5ab0-45b6-a456-608c60065768
📒 Files selected for processing (2)
packages/bruno-app/src/components/Devtools/Console/index.jspackages/bruno-app/src/hooks/useResizablePanel/index.js
…runo/bruno into fix/request-detail-width
…idth of screen width (usebruno#8499)
Description
Fix: Request Details panel max width too small on desktop
JIRA
Problem
The Request Details panel (Devtools → Network tab) had a hardcoded
maxWidthof800px. On wide desktop monitors this meant the panel couldn't be dragged any wider, even though there was plenty of room.Changes
Devtools/Console/index.js: Replaced the fixed800pxcap with a dynamic max width equal to 70% of the console panel's actual width, measured live viaResizeObserveron the console container. Falls back to800pxonly until the first measurement resolves.hooks/useResizablePanel/index.js: Fixed a stale-closure bug — the drag event listeners were bound once on mount and ignored any later changes tominWidth/maxWidth. Bounds are now read from refs so a dynamicmaxWidthis respected during an active drag. Also added re-clamping if the bounds shrink below the current width while not dragging (e.g. on window resize).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