Repository navigation
fix(packets): keep Saved-filter menu inside the viewport (#72) - #75
Merged
Merged
Conversation
The Saved trigger sits at the right end of the filter-expression row, but .fux-saved-menu was anchored left: 0 with no max-width. The menu grew to its longest expression and ran past the right edge, making #pktLeft scroll horizontally (reproduced at 768-1440px). Anchor the menu right: 0 and bound it to min(480px, 100vw - 32px) so the existing .fux-saved-expr ellipsis takes effect. Regression: test-filter-ux-e2e.js now opens Saved at 1400/1024/768px with a long user filter and asserts the menu stays in the viewport, #pktLeft has no horizontal overflow, and the long expression is ellipsized. Fails 3/3 before, passes after. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
dborup
marked this pull request as ready for review
September 23, 2026 04:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #72
Problem
On Latest Packets, the Saved button sits at the right end of the filter-expression row.
.fux-saved-menuwas anchoredleft: 0to that button bar and had nomax-width, so it grew to fit its longest expression (467px with the built-in filters) and ran past the right edge of the viewport.#pktLeft(overflow-x: auto) then scrolled horizontally.Reproduced on
96319accagainst the e2e fixture:#pktLeftscrollWidthAt ≤600px the filter-expression row is hidden (
#pktLeft .pkt-filter-expr { display: none !important }), so this only affects wider layouts.Fix
CSS only, one rule in
public/style.css:left: 0→right: 0(the menu opens leftward from the button)width: max-content; max-width: min(480px, calc(100vw - 32px)), so the existing.fux-saved-exprellipsis applies to long user filtersThis follows the same pattern #74 used for the path-legend popover. The built-in filters still fit untruncated (467px ≤ 480px).
Tests
test-filter-ux-e2e.js(already in the Playwright CI step) gets a new step at 1400, 1024 and 768px. Each run adds a long user-saved filter and asserts that:#pktLefthas no horizontal overflow,test-issue-1128-packets-layout-e2e.js5/5,test-issue-1128-multi-viewport-e2e.js15/15,test-issue-1122-details-row-clamp-e2e.js18/18.scripts/check-css-vars.jsOK, andgit diff --checkis clean.No workflow, JS or backend changes. This is not a hot path.
🤖 Generated with Claude Code