Skip to content

fix(touch-gestures): stamp data-hash on Trace and Filter buttons (#1305)#1332

Merged
Kpa-clawbot merged 2 commits into
masterfrom
fix/issue-1305
May 24, 2026
Merged

fix(touch-gestures): stamp data-hash on Trace and Filter buttons (#1305)#1332
Kpa-clawbot merged 2 commits into
masterfrom
fix/issue-1305

Conversation

@Kpa-clawbot
Copy link
Copy Markdown
Owner

Summary

Row-overlay Trace and Filter buttons silently did nothing on touch swipes. ensureRowOverlay stamped data-hash only on the Copy button, while onClickAction gates both trace and filter navigation on hash && ... — so the click handler short-circuited before location.hash was set. Users saw the buttons but tapping them was a no-op.

Fix

public/touch-gestures.js — in ensureRowOverlay, stamp data-hash on 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:

  • Trace → #/packets/<hash>
  • Filter → #/packets?hash=<hash>
  • Copy → clipboard (unchanged)

All three match the existing branches in onClickAction.

TDD

  • RED commit (dd90f72c): removes the cov1/cov2 workaround in test-touch-gestures-coverage-e2e.js that artificially stamped data-hash on trace/filter buttons from the test harness. With this commit alone, cov1/cov2 fail their location.hash assertions because onClickAction's guard short-circuits.
  • GREEN commit (a526c30f): production fix in ensureRowOverlay. 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 asserts location.hash === #/packets/<hash>, cov2 asserts location.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

openclaw 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
@Kpa-clawbot Kpa-clawbot merged commit 92df28a into master May 24, 2026
6 checks passed
@Kpa-clawbot Kpa-clawbot deleted the fix/issue-1305 branch May 24, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(touch-gestures): row overlay Trace/Filter buttons silently no-op — missing data-hash attribute

1 participant