fix(touch-gestures): stamp data-hash on Trace and Filter buttons (#1305)#1332
Merged
Conversation
added 2 commits
May 23, 2026 19:58
cov1/cov2 previously stamped data-hash on trace/filter buttons inside the test harness because production only stamped it on copy. This commit removes that workaround. Without the production fix in the next commit, cov1/cov2 will fail their assertion (location.hash unchanged) because onClickAction's 'hash && ...' guard short-circuits. Refs #1305
ensureRowOverlay previously set data-hash only on the Copy button. onClickAction's navigation branches for trace and filter are guarded by 'hash && ...', so without data-hash the click was a silent no-op: swiping a row, opening the overlay, and tapping Trace or Filter did nothing. Users reported the buttons appeared functional but never navigated. Stamp data-hash on all three buttons from the same source the Copy button already used (row's data-hash, falling back to data-id). The Copy clipboard path is unchanged; Trace navigates to #/packets/<hash> and Filter to #/packets?hash=<hash>, matching onClickAction's handler. The companion test commit removed the cov1/cov2 harness workaround that previously stamped data-hash from the test side; with this fix those assertions pass natively against the real production code path. Fixes #1305
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.
Summary
Row-overlay Trace and Filter buttons silently did nothing on touch swipes.
ensureRowOverlaystampeddata-hashonly on the Copy button, whileonClickActiongates bothtraceandfilternavigation onhash && ...— so the click handler short-circuited beforelocation.hashwas set. Users saw the buttons but tapping them was a no-op.Fix
public/touch-gestures.js— inensureRowOverlay, stampdata-hashon all three buttons (Trace, Filter, Copy) from the same source the Copy button already used (row.getAttribute('data-hash') || row.getAttribute('data-id')). One-line factoring of the attribute fragment to avoid duplicating the escape logic.Behavior after fix:
#/packets/<hash>#/packets?hash=<hash>All three match the existing branches in
onClickAction.TDD
dd90f72c): removes the cov1/cov2 workaround intest-touch-gestures-coverage-e2e.jsthat artificially stampeddata-hashon trace/filter buttons from the test harness. With this commit alone, cov1/cov2 fail theirlocation.hashassertions becauseonClickAction's guard short-circuits.a526c30f): production fix inensureRowOverlay. cov1/cov2 now pass natively against the real production code path with no harness-side stamping.Browser verified
Coverage E2E (
test-touch-gestures-coverage-e2e.js) exercises the real swipe → overlay → button-click → navigation path in headless Chromium against the running server. cov1 assertslocation.hash === #/packets/<hash>, cov2 assertslocation.hash === #/packets?hash=<hash>— these assertions are the regression gate.E2E assertion added: test-touch-gestures-coverage-e2e.js:227 (cov1 trace) and test-touch-gestures-coverage-e2e.js:259 (cov2 filter).
Preflight
All hard gates and warnings pass.
Fixes #1305