Repository navigation
feat(annotate): a slider mode for compare - #17
Conversation
…ween before and after
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
Latest result Pull request merged. Final answersSession Pull request merged. Session Waiting for GitHub merge request 88c8c76d-411b-4e99-b844-9e08a9914b40. Verified HEAD and current evidence. Pullfrog touch-drag suppression remains P1; the slider e2e failure is also P1. The three annotate unit failures are base regressions. No files or commits changed because the repair push window is closed. Session Pass interrupted; current webhook state retained. Session Pass interrupted; current webhook state retained. Session Pass interrupted; current webhook state retained. Session Pass interrupted; current webhook state retained. Session Pass interrupted; current webhook state retained. Session Pass interrupted; current webhook state retained. Session Pass interrupted; current webhook state retained. |
There was a problem hiding this comment.
Important
A touch drag can still open the zoom dialog after the drag finishes if the browser delays its compatibility click.
Reviewed changes
- Slider mode parsing — Adds
columnsandslidervalidation, converts slider side notes into numbered notes, and keeps columns mode unchanged. - Slider rendering — Adds the two-image overlay, divider semantics, responsive notes, no-script fallback, and a single inlined runtime per rendered document.
- Slider interaction — Adds pointer dragging with optional coasting, keyboard movement, drag suppression, and integration with the existing zoom runtime.
- Documentation and coverage — Documents the new mode and adds unit and end-to-end coverage for rendering, dragging, keyboard movement, zoom, and invalid modes.
gpt-5.6-sol | 𝕏
commit: |
There was a problem hiding this comment.
ℹ️ No new issues found in the incremental changes; the existing touch-drag click-suppression thread remains open.
Reviewed changes
- Packaging order — Updated
comark-carousel'sprepackscript to buildcomark-zoombefore the carousel, matching the build-time dependency used by the carousel stylesheet.
The incremental change is mergeable as-is.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The incremental commit is clean, but the prior touch-drag click-suppression issue remains unresolved and this review therefore cannot approve the PR.
Reviewed changes
- Fixed carousel packaging order — Updated
comark-carousel'sprepackscript to buildcomark-zoombefore building the carousel, ensuring the workspace dependency is available when packaging.
⚠️ Touch-drag zoom remains possible
A touch drag can still open the zoom dialog if the browser dispatches its compatibility click after the zero-delay timer clears swallow. This is the same outstanding issue from the prior Pullfrog review; the new packaging-only commit does not affect it.
Technical details
# Preserve touch-drag click suppression
## Affected sites
- `packages/annotate/src/client.ts:126` — `swallow` is reset before a potentially delayed compatibility click is consumed.
- `packages/annotate/src/client.ts:134-142` — the capture-phase click listener only suppresses the click while `swallow` remains set.
## Required outcome
- A pointer drag must never trigger the zoom click that follows it, including delayed compatibility clicks on touch input.
- A genuine click without movement must continue to open zoom.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The new suppression marker fixes the original timer race, but it can still be cleared by a subsequent pointerdown before the delayed compatibility click from the drag is delivered.
Reviewed changes
- Preserved touch-drag suppression — Replaced the zero-delay boolean reset with a slider-scoped marker that is consumed by the compatibility click.
The remaining edge case is called out inline.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The latest suppression change still leaves a delayed touch compatibility click able to open zoom after a subsequent interaction on the same slider.
Reviewed changes
- Retained drag-click suppression — Replaced the timer-based reset with a slider-scoped
WeakSetmarker intended to remain until the compatibility click is consumed. - Revalidated the slider surface — Re-read the full PR diff and the incremental suppression change, including the existing pointer, zoom, keyboard, rendering, and test paths.
Technical details
# Keep suppression tied to the drag sequence
## Affected sites
- `packages/annotate/src/client.ts:126` — records suppression only by slider element, not by the pointer sequence that produced the pending compatibility click.
- `packages/annotate/src/client.ts:134-144` — the capture-phase click handler consumes the single element marker for whichever click arrives first.
## Required outcome
- A compatibility click generated by a completed touch drag must remain suppressed until that specific click is consumed, even if another pointer sequence starts first.
- A genuine click from a newer interaction must still open zoom.
## Suggested approach
- Associate the pending suppression with the originating pointer sequence or otherwise distinguish the delayed compatibility click from a later genuine click before consuming the marker.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The latest suppression change still allows a delayed touch compatibility click to reach zoom, so the drag interaction is not safe to merge yet.
Reviewed changes
- Retained drag suppression state — Changed the pending suppression marker from a boolean set to a per-slider count and added a click-detail check intended to preserve genuine follow-up clicks.
- Hardened bound URL validation — Resolved bound URL props in isolation so an unsafe bound value is reported even beside a plain value.
- Adjusted validation coverage — Updated annotate tests and added coverage for the bound URL case.
gpt-5.6-sol | 𝕏
There was a problem hiding this comment.
Important
The latest commit does not make touch-drag suppression reliable, and it exposes combined plugin issues through the annotate-specific metadata field.
Reviewed changes
- Classified compatibility clicks — Expanded slider click suppression to use
sourceCapabilities.firesTouchEventsalongsideclick.detail. - Exposed issue metadata — Added
annotateIssueswhile retaining the sharedmeta.issueslist.
gpt-5.6-sol | 𝕏
| const pending = swallow.get(swipe) ?? 0; | ||
| // Compatibility clicks identify their touch origin through sourceCapabilities. Keep a | ||
| // pending marker for genuine mouse clicks so a delayed touch click cannot open zoom later. | ||
| const touchClick = event.detail === 0 || event.sourceCapabilities?.firesTouchEvents === true; |
There was a problem hiding this comment.
This still does not reliably identify the delayed compatibility click. sourceCapabilities may be absent, while firesTouchEvents describes device capability rather than the originating pointer sequence, so a delayed touch click can bypass this gate and reach zoom; conversely, a genuine device-independent activation can be swallowed while pending is set.
Technical details
# Keep drag suppression tied to the originating interaction
## Affected sites
- `packages/annotate/src/client.ts:143-146` — classifies clicks with `detail` and optional `sourceCapabilities`, then consumes suppression only when the heuristic matches.
## Required outcome
- A compatibility click generated by a completed touch drag must be suppressed even when the browser omits `sourceCapabilities`.
- A genuine click or keyboard/assistive activation after the drag must not be suppressed.
- Suppression needs to remain associated with the completed drag sequence rather than relying only on click provenance heuristics.
## Suggested approach
- Track the pending compatibility click by the originating pointer sequence and use browser-compatible fallback behavior when the click event does not expose source capabilities.
|
Current HEAD 0da7470 was rechecked. Pullfrog’s open findings remain valid P1s: touch-drag compatibility-click suppression still depends on optional sourceCapabilities and can misclassify delayed clicks; meta.annotateIssues is still assigned the combined meta.issues array. Required checks also fail on the existing PointerEvent.sourceCapabilities lint error and four e2e regressions (base 26233e9 passes). The repair push window is closed until 2026-10-21T09:00:17Z, so these cannot be repaired in this pass. |
|
Verified current HEAD 0da7470: Pullfrog touch-drag suppression remains a valid P1 because click handling still relies on optional sourceCapabilities and can misclassify delayed compatibility clicks; annotateIssues also still aliases combined meta.issues (valid P1). Required lint fails on PointerEvent.sourceCapabilities, and e2e has four regressions; exact base 26233e9 passes these checks. Repair push window is closed, so no code changes were made in this pass. |
The earlier merge of main kept this branch's annotate files and dropped main's annotate changes (#12, #21). This takes main as it is and adds the slider on top. It also drops the annotateIssues alias that main had replaced with meta.issues, suppresses the click that ends a drag by remembering whether the last press dragged instead of guessing a touch origin, and gives the zoomed slider's handle its tab stop back.
There was a problem hiding this comment.
Important
No new issues were introduced by this delta, but the existing touch-drag compatibility-click issue remains unresolved, so this PR is not ready for approval.
Reviewed changes
- Aligned annotate test expectations — Updated
packages/annotate/test/annotate.test.tsfor the currenthrefrendering, sharedmeta.issuesmetadata, carousel accessibility attributes, and hex color output.
The reviewed delta is test-only. The outstanding prior concern is intentionally not duplicated as a new inline finding: packages/annotate/src/client.ts can still lose drag-click suppression when a later non-drag press overwrites the pending state before the earlier touch compatibility click arrives.
gpt-5.6-sol | 𝕏
|
Verified current HEAD a61b4cc. Pullfrog touch-drag compatibility-click suppression remains a valid P1: |
#14 was squashed from a branch older than #12 and #21, so it put back annotate's earlier read.ts and tests: an unknown prop named `constructor` or `__proto__` printed Object's own value as its hint, viewports compared as strings ("0900x0360" no longer matched "900x360"), and two tests expected the old href message. Those parts are restored; #17's compare mode stays. The slider e2e test clicked at coordinates measured before focusing the handle, which can scroll the page, so it missed the slider under load. It measures again before that click. zoom's client.ts holds its own copy of the zoom script since #14, so its doctor suppression covers it too.

::compare{mode="slider"}lays the before and after screenshots over each other, with a divider the reader drags. Each screenshot gets the full width, so a small change at the same spot (a number, a label) shows up under the line instead of in two half-width images.The interaction follows React Bits' Comparison Slider: a thin line with a round grip, dragging that keeps going briefly after a quick flick (off under reduced motion), and Before/After labels.
role="slider": arrows move it 5%, Page Up/Down 25%, Home/End go to either edge.aria-valuetextreads like "Before 40%, After 60%". The zoomed copy gets its tab stop back, so it moves by key too. The zoomed copy gets its tab stop back, so it moves by key too.side=…) become numbered list notes, since an arrow would cross the divider.modemust becolumns(the default, unchanged) orslider. Anything else goes tometa.issues, andmodeis listed among the compare's valid props.The slider script ships inside
comark-annotateand is inlined once per document, like zoom's. There's no new package and no Vue/React/Svelte versions, since annotate only has an HTML renderer.Docs: a Slider tab on the annotate page, a
moderow undercompare, and notes in the README and the agent skill.Checks
comark-annotatepass.modeissue.e2e/annotate.e2e.tspassed 16 runs locally.Three tests in
packages/annotate/test/annotate.test.tsfail, and they also fail onmainat 142b3d0: two expect the oldhrefmessage, and one expects theObject-key hint.pnpm readystops there, andzoom's doctor reports aVUE0004warning that is also onmain.🤖 Generated with Claude Code