Before Gaia DR2 (2018) and DR3 (2022), many star positions had errors up to several milliarcseconds. A fixed “stars894” could mean:
| Goal | Success Metric |
|------|----------------|
| Eliminate duplicate stars under rapid interaction. | < 0.1 % of sessions (sampled 1 M+ interactions) show duplicate rendering. |
| Ensure tooltip always reflects the current rating. | 100 % of tooltip reads match the latest selectedRating in automated UI tests. |
| Remove animation‑induced jank on low‑end devices. | Frame‑time stays ≤ 16 ms on Android 6+ & iOS 11 devices (tested via Chrome DevTools “Performance” panel). |
| Keep backward compatibility – existing API contracts unchanged. | No breaking changes detected by the npm run lint:api CI job. |
| Symptom | Root Cause |
|---------|------------|
| ★ The Stars rating widget occasionally displayed duplicate star icons after a rapid series of user interactions (e.g., clicking, dragging). | The component’s render loop didn’t correctly debounce rapid state changes; a race condition in the setState callback caused the DOM update to fire twice. |
| ★ In some locales, the hover tooltip showed a stale rating value (e.g., “4.5” after the user had selected “3”). | The tooltip read from a cached value that was never invalidated after the onRate event. |
| ★ On low‑performance devices, the widget caused a minor jank (≈ 30 ms frame drop) when animating the “fill‑up” effect. | The animation used requestAnimationFrame but performed a full DOM re‑layout on every tick due to reading offsetWidth inside the animation callback. |
| Area | Before | After |
|------|--------|-------|
| Visual | Duplicate star icons could appear briefly, breaking the 5‑star silhouette. | Clean, single‑instance stars at all times. |
| Tooltip | Stale rating value lingered for up to 2 seconds. | Tooltip updates instantly on every rating change. |
| Interaction | Rapid clicks caused UI “jank” (visible lag). | Smooth fill‑animation; frame time stays ≤ 16 ms. |
| Accessibility | ARIA aria-valuenow occasionally lagged behind visual state. | ARIA values are now updated synchronously with the visual rating. |
All visual changes respect existing design tokens (color, size, spacing). No new UI elements are introduced.
