The Tooltip That Thrashes
Decide what you would build from the brief alone. Everything below it is available, but the exercise stops working if you open it first.
A table shows a positioned tooltip on hover. Each tooltip measures the target cell, measures itself, checks the viewport, then positions itself. Hovering along a row makes the page stutter. Diagnose and fix.
Debouncing the hover handler so the measurement runs less often. The stutter while sweeping across a row disappears, because the work now happens once at the end of the sweep — and the tooltip is now noticeably late, which reads as unresponsiveness rather than as jank. The forced synchronous layout is still there, unchanged, waiting for the first case where it runs in a frame that is already busy. Debouncing changes how often a costly operation runs; it never makes the operation cheaper, and here it trades a visible symptom for a less visible one plus a latency regression.