The Misaligned Comparison by Jayme VolstadThe Misaligned Comparison by Jayme Volstad

The Misaligned Comparison

Portfolio project
Jayme Volstad

Designing a Reproducible Visual Debugging Challenge

Project type: Independent engineering and evaluation-design project Role: Frontend Engineering · Interaction Design · QA & Evaluation Design
Interactive design-system comparison
Interactive design-system comparison

Overview

A before-and-after comparison component should make visual differences easier to inspect. Instead, a collection of subtle layout and interaction defects made the comparison itself unreliable.
I turned an existing design-system comparison problem into a self-contained frontend debugging challenge, complete with a deliberately defective starter application, a corrected reference implementation, an objective evaluation rubric, and automated browser verification.
The goal was not simply to make the interface look right. It was to make its behavior measurable, reproducible, accessible, and reliable across viewport sizes and interaction methods.
The Problem
The original comparison interface contained two authentic geometric defects:
Cross-layer misalignment: Different horizontal padding values caused the same interface elements to shift by approximately 16–24 pixels across the comparison boundary.
Edge clipping: The 44 × 44 pixel slider handle extended outside its clipping container at the 0% and 100% positions.
Identifying cross-layer alignment defects
Identifying cross-layer alignment defects
I expanded the challenge with two additional engineering failure categories:
Resize desynchronization caused by cached pixel measurements.
Incomplete pointer handling and keyboard accessibility.
These defects exposed a larger issue: visual correctness, interaction state, and responsive geometry were being treated as separate concerns when they needed to operate as one coordinated system.

Engineering Approach

I built the challenge around four interconnected requirements:
1. Shared geometry
Established a common horizontal frame inset across all specimen variants, preserving the existing 85-node DOM and identical text content.
Corrected slider handle remains fully visible at the 100% boundary.
Corrected slider handle remains fully visible at the 100% boundary.
2. Normalized interaction state
Replaced cached pixel positioning with a controlled percentage-based slider state. The divider, clipping boundary, and handle now derive from the same value.
3. Responsive behavior
Introduced ResizeObserver-based scaling so the specimen remains synchronized with its actual container dimensions.
Before: Cached pixel positioning causes the divider and clipping boundary to separate during resizing.
Before: Cached pixel positioning causes the divider and clipping boundary to separate during resizing.
After: Percentage-based positioning maintains alignment after resizing.
After: Percentage-based positioning maintains alignment after resizing.
4. Accessible interaction
Implemented Pointer Events, pointer capture, cancellation cleanup, boundary clamping, and the expected WAI-ARIA slider keyboard controls.

Verification & Results

I created seven deterministic Playwright verification gates covering:
85-node DOM and text parity.
Cross-layer alignment within 1 pixel.
Unclipped slider positioning at 0%, 50%, and 100%.
Responsive resizing and scale synchronization.
Pointer capture outside the comparison container.
Pointer cancellation cleanup.
Keyboard accessibility and synchronized comparison modes.
Recorded Results
Automated Playwright tests: 1/7 → 7/7
Cross-layer alignment drift: 16–24 px → 0.00 px
TypeScript: Passed
ESLint: Passed
Production builds: Passed
The reference implementation satisfied all seven automated verification requirements while preserving the original 85-node DOM and text content.

Deliverables

Public GitHub repository.
Intentionally defective React/TypeScript starter.
Complete reference implementation.
Seven automated Playwright tests.
100-point candidate evaluation rubric.
Evaluator notes and false-positive analysis.
High-resolution visual evidence and annotated walkthrough.
Reproducible verification report.

Technology

React 19 · TypeScript · Vite · Playwright · Chromium · CSS · Pointer Events · ResizeObserver · WAI-ARIA

The Outcome

The result is both a working reference implementation and a reusable frontend engineering evaluation.
Rather than relying on subjective visual inspection, the challenge establishes measurable expectations for layout, behavior, responsiveness, and accessibility.
It can be used as a portfolio demonstration, an engineering assessment, or a foundation for evaluating visual-to-code implementation quality.

0 likes · 1 view · Dec 2, 2026

Created a React and TypeScript debugging challenge for repairing a before/after slider, with a reference solution and Playwright verification.

Tags