Repository navigation
fix(request-panel)/fixed overflow size column issue on first load - #8525
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 as they are similar to previous changes (1)
WalkthroughThe column width scaling logic in ChangesColumn Width Scaling Rewrite
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
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 |
…ebruno#8525) * fix(request-panel)/fixed overflow size column issue on first load * added tests * refactor the total width calculation based on available space
Description
JIRA
Network tab "Size" column disappears behind the Request Details panel.
In Devtools → Network, resizing the Request Details panel wide enough caused the last column ("Size") in the request list table to vanish — it rendered clipped off, appearing to sit underneath the details panel. Happened reliably on first open (and again after close/reopen) once the panel was dragged near its max width.
Root cause
scaleWidthsToTotal()(inhooks/useResizableColumns/index.js) is responsible for shrinking the 7 table columns so they always sum to exactly the available container width. Its old logic:minColWidth(60px) up tominColWidth.The bug: when several small columns get clamped up to
minColWidthindependently, their floors alone can already exceed the container's actual width — before the "leftover" for the last column is even computed. Example, with the real column weights[80, 70, 180, 300, 110, 100, 80]shrunk to a 420px container:Fix
Reworked
scaleWidthsToTotal()into a two-step algorithm:minColWidthand recalculating the remaining space.This guarantees:
Widths always sum to the container width.
No column goes below
minColWidth.Existing proportional resize behavior is preserved when no clamping is needed.
Added regression tests for the reported 380px/420px cases and a container-width sweep.
Verified the existing proportional resize test continues to pass.
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
Bug Fixes
Tests