Skip to content

[PF-1994] Migrate Slider to @base-ui/react + Tailwind#4955

Open
vedrani wants to merge 16 commits into
feature/picasso-modernization-tempfrom
migrate-Slider
Open

[PF-1994] Migrate Slider to @base-ui/react + Tailwind#4955
vedrani wants to merge 16 commits into
feature/picasso-modernization-tempfrom
migrate-Slider

Conversation

@vedrani
Copy link
Copy Markdown
Collaborator

@vedrani vedrani commented May 13, 2026

Slider migration diff

Generated: 2026-05-13 14:41:19 CEST

Package: packages/base/Slider

Files

No file additions, deletions, or renames.

Imports

Removed:

packages/base/Slider/dist-package/src/SliderMark/SliderMark.d.ts:import React from 'react';
packages/base/Slider/dist-package/src/SliderValueLabel/SliderValueLabel.d.ts:import type { RefObject } from 'react';
packages/base/Slider/dist-package/src/SliderValueLabel/SliderValueLabel.d.ts:import type { SliderValueLabelSlotProps } from '@mui/base/Slider';
packages/base/Slider/src/Slider/Slider.tsx:import { Slider as MUIBaseSlider } from '@mui/base/Slider'
packages/base/Slider/src/Slider/Slider.tsx:import { useCombinedRefs, useOnScreen } from '@toptal/picasso-utils'
packages/base/Slider/src/SliderValueLabel/SliderValueLabel.tsx:import type { RefObject } from 'react'
packages/base/Slider/src/SliderValueLabel/SliderValueLabel.tsx:import type { SliderValueLabelSlotProps } from '@mui/base/Slider'

Added:

packages/base/Slider/dist-package/src/SliderValueLabel/SliderValueLabel.d.ts:import type { ReactNode, RefObject } from 'react';
packages/base/Slider/src/Slider/Slider.tsx:import type { FocusEventHandler } from 'react'
packages/base/Slider/src/Slider/Slider.tsx:import type { SliderRootChangeEventDetails } from '@base-ui/react/slider'
packages/base/Slider/src/Slider/Slider.tsx:import { Slider as BaseUISlider } from '@base-ui/react/slider'
packages/base/Slider/src/Slider/Slider.tsx:import { useOnScreen } from '@toptal/picasso-utils'
packages/base/Slider/src/SliderValueLabel/SliderValueLabel.tsx:import type { ReactNode, RefObject } from 'react'

MUI v4 / JSS residue check

Check Count
@material-ui/* source imports 0
JSS calls (makeStyles/createStyles/withStyles) 0
@material-ui/core in package.json 0
0

Migration is NOT complete until all three are 0.

package.json delta

@@ -22,7 +22,7 @@
   },
   "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
   "dependencies": {
-    "@mui/base": "5.0.0-beta.58",
+    "@base-ui/react": "^1.4.1",
     "@toptal/picasso-shared": "15.0.0",
     "@toptal/picasso-tooltip": "2.0.5",
     "@toptal/picasso-utils": "4.0.0"
@@ -32,7 +32,7 @@
     "@toptal/picasso-tailwind-merge": "^2.0.0",
     "@toptal/picasso-provider": "*",
     "@toptal/picasso-tailwind": ">2.1.0",
-    "react": ">=16.12.0 < 19.0.0"
+    "react": ">=16.12.0"
   },
   "exports": {
     ".": "./dist-package/src/index.js"

Prop-surface diff

Click to expand .d.ts diff

Review carefully: any - line on a public export is a breaking change. See docs/migration/rules/api-preservation.md.

Happo

Happo log: migration-runs/2026-05-13/Slider/happo.log (0
? flagged lines).

Designer: review screen diffs >0.5% per docs/migration/migration-plan.md §6.3.

React 19 smoke

Stubbed (pending PF-1994). The real smoke wires up during PF-1994's first migration.

@vedrani vedrani requested a review from a team as a code owner May 13, 2026 12:41
@vedrani vedrani self-assigned this May 13, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 13, 2026

🦋 Changeset detected

Latest commit: fa60f0e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@toptal/picasso-slider Major
@toptal/picasso Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 13, 2026

⚠️ Following packages are missing changesets. Please check if they don't require one.

@toptal/picasso-utils
@toptal/picasso-tailwind-merge

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 13, 2026
Comment thread packages/base/Slider/src/Slider/Slider.tsx Outdated
Comment thread packages/base/Slider/src/Slider/Slider.tsx Outdated
</span>
<input
aria-orientation="horizontal"
aria-valuenow="0"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-valuemax="100"
          aria-valuemin="0"
          aria-valuenow="0"

I think those were useful

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Orchestrator agent (autonomous review-response)

Good eye. This is a base-ui behavior change — its <Slider.Thumb> renders an <input type="range"> with native max/min/aria-valuenow but no longer emits explicit aria-valuemin/aria-valuemax. Per the HTML AAM (and WAI-ARIA 1.2), implicit aria-valuemax/aria-valuemin are derived from the native max/min attributes on <input type="range">, so screen readers see the equivalent semantics through the native attributes that are still there. Base-ui doesn't expose props to pass arbitrary attrs to its inner input.

Two options:

  • Leave as-is — rely on native max/min (spec-compliant; what base-ui ships).
  • Patch back — reach into base-ui's input via the inputRef prop and setAttribute imperatively in an effect (works, but somewhat hacky and fragile against future base-ui releases).

Leaning toward leave-as-is given native attrs are the canonical source. Want me to add the imperative patch anyway? 👍 to confirm, or share thoughts.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Orchestrator agent (autonomous review-response)

Update: the orchestrator's Happo gate flagged the migrated DOM as a regression (pixel-perfect is required for a UI-kit refactor). Inspecting the diff pairs revealed two real issues that fixing the visuals — also restoring the centered thumb that you observed — addresses:

  1. Thumb position offset. Base-ui's <Slider.Thumb> ships with style="inset-inline-start: X%; top: 50%", which puts the thumb's top-left at the anchor — not centered. Added -translate-x-1/2 -translate-y-1/2 to recenter on the anchor point (parity with the prior -mt -ml behavior in @mui/base).
  2. Indicator opacity inheritance. Base-ui nests <Slider.Indicator> inside <Slider.Track>. Our opacity-[0.24] on the track was faded the blue indicator child to 24% (most visible on the Range story — the connecting blue line between thumbs was nearly invisible). Moved the opacity onto the color (bg-gray-500/[0.24]) so it only affects the gray fill, not descendants.

Re: the aria-valuemin/max — they remain implicit via the native max/min on <input type="range"> (no base-ui prop to forward arbitrary aria attrs). This is unchanged by the visual fix and still equivalent semantics per HTML-AAM. Leaving as-is. Pushing the CSS fix in the next gate run.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Orchestrator agent (autonomous review-response)

Correction to last iteration: the Tailwind -translate-x-1/2 -translate-y-1/2 I added to the thumb was wrong and got reverted. Root cause: jsdom doesn't serialize CSS Transforms 2's individual-axis translate: property into the inline-style string, so my Jest snapshot read showed no centering — but base-ui's <Slider.Thumb> source (node_modules/@base-ui/react/slider/thumb/SliderThumb.js) actually sets translate: ${rtl ? 1 : -1}*50% ${vertical ? 1 : -1}*50% directly, which Chrome applies. My added Tailwind translates composed with it (CSS translate: and transform: translate() are independent) and over-shifted the thumb. Also bit me: Picasso's jss-snapshot-serializer.cjs strips Tailwind suffixes (-translate-x-1/2-translate-x), which made my snapshot update wrong and Static checks fail — confirmed by job 76089179101.

What stays from last iteration: the indicator opacity fix. <Slider.Indicator> is now a CHILD of <Slider.Track> (it was a sibling in @mui/base), so the Track's opacity-[0.24] was being inherited by the blue indicator (faded to 24%, visible as the missing blue connector between thumbs on the Range story). Kept the fix opacity-[0.24] bg-gray-500bg-gray-500/[0.24] so opacity stays on the bg color only.

Net diff vs. master: one Tailwind class change on the Track (opacity-[0.24] bg-gray-500bg-gray-500/[0.24]). Aria-valuemin/max stays implicit via native max/min — unchanged from prior thread.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep having

aria-valuemax="100"
aria-valuemin="0"
aria-valuenow="0"

for accessibility purposes

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Orchestrator agent (autonomous review-response)

Done — added explicit aria-valuemin, aria-valuemax, aria-valuenow to each Slider.Thumb. Snapshot updated to show all three attributes on the thumb div.

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 15, 2026
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 15, 2026

🤖 Orchestrator agent (autonomous review-response)

Happo fix — computed-style diagnostic

Following the new pixel-perfect protocol, ran a getComputedStyle() diff between the deployed baseline (https://picasso.toptal.net/iframe.html?id=components-slider--slider, master at commit 8e027cf1b) and the local Storybook (worktree at 4f932e5e). Dumped to migration-runs/2026-05-13/Slider/computed-styles-{baseline,local}.json.

Single concrete diff identified on the thumb element:

Property Baseline Local Visual delta
margin-inline-start -6px 0px thumb anchor offset differs
translate none -50% -50% base-ui centers via Transforms-2
Effective rect x 62 60.5 −1.5px shift, all stories
width / height / vertical-center identical identical

OLD @mui/base did inset-inline-start: 0 + margin-left: -6px → thumb center at +1.5px right of percentage anchor (asymmetric: -6px instead of -7.5px for a 15px-wide thumb).

NEW @base-ui/react does inset-inline-start: 0 + translate: -50% → thumb center exactly on percentage anchor.

Net: NEW thumb is 1.5px left of baseline → drives all 8 Storybook diffs (Default, Initial value, Marks, Range, Tooltip, Controlled, Disable track, Hide thumb) plus the Cypress range/when-tooltip-intersect diff. Same shift applies regardless of value%, since margin is value-independent.

Fix (packages/base/Slider/src/Slider/Slider.tsx):

   const thumbClassName = twJoin(
     'group/thumb flex justify-center items-center w-[15px] h-[15px]',
     'rounded-[50%] bg-blue-500 border-[2px] border-solid border-white',
-    'outline-0 absolute transition-shadow cursor-pointer',
+    'outline-0 absolute transition-shadow cursor-pointer ml-[1.5px]',
     isThumbHidden && 'hidden'
   )

Math: inset-inline-start: 0 (base-ui) + margin-left: 1.5px + translate-x: -7.5px = -6px from Control left. Control left = rail left at x=68 → thumb left at x=62, matching baseline exactly.

Verified live via Playwright after rebuild:

  • Pre-fix: thumb rect x=60.5, right=75.5, computed margin-left: 0px
  • Post-fix: thumb rect x=62, right=77, computed margin-left: 1.5pxbyte-identical to baseline rect x=62, right=77

Snapshot updated to include ml-[1.5px] (jss-snapshot-serializer leaves single-bracket utilities untouched).

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 15, 2026
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 15, 2026

🤖 Orchestrator agent (autonomous review-response)

Happo fix iter-7 — full computed-style diagnostic

Now that the Happo upload completed for the previous head, fresh diff PNGs are available. Ran getComputedStyle() diff between picasso.toptal.net baseline (master 8e027cf1b) and local Storybook (worktree at 2a8a5ad13). Three concrete diffs identified — all fixed this iteration:

1. Track color-space mismatch (Tailwind v4 OKLAB)

Property Baseline Local pre-fix Cause
background-color rgb(196, 198, 202) oklab(0.82616 -0.0005 -0.0059 / 0.24) Tailwind v4.2.1 emits OKLAB for bg-color/[alpha] modifiers
opacity 0.24 1 local used color-channel alpha not element opacity

Reverting Track to opacity-[0.24] bg-gray-500 (matches OLD exactly) requires the Indicator NOT to be a descendant of Track (otherwise opacity propagates). Solution: render <Slider.Indicator> as a sibling of <Slider.Track> inside <Slider.Control>. The Indicator only reads useSliderRootContext (verified at node_modules/@base-ui/react/slider/indicator/SliderIndicator.js:77), so it works outside the Track. Both Track and Indicator override base-ui's forced inline position: relative with Tailwind !absolute (position: absolute !important).

2. Thumb horizontal offset (asymmetric centering)

Property Baseline Local pre-fix Result
margin-inline-start -6px 0px OLD used -ml-[6px] (asymmetric, not -7.5px) so center sits +1.5px right of inset-inline-start: 0
translate none -50% -50% NEW base-ui centers via Transforms-2 individual-axis property → center exactly on 0%
Thumb rect x 62 60.5 local was 1.5px left of baseline (affected all 8 stories)

Fix: ml-[1.5px] on thumb className. New math: inset-inline-start: 0 + margin-left: 1.5px + translate-x: -7.5px = -6px from Control left → thumb x=62 ✓.

3. Mark vertical offset (Control vs root parent)

Property Baseline Local pre-fix Result
Mark top (computed) 1.5px (from root padding-box) 1.5px (from Control border-top) local Control sits at root+6px, so mark's effective y is 6px lower
Mark rect .y - root.y +1.5px +7.5px mark visually 6px below rail center in local

Fix: -top-[4.5px] on SliderMark className. New math: Control_y(root.y+6) + (-4.5) = root.y + 1.5 → mark.y matches baseline.

4. Bonus — root height +1px

Removing flow contribution from Control with -mb-[1px] (Control still has h-[1px] for positioning context, but the negative bottom margin collapses 1px of its flow space). Brings root rect height from 13px (local) to 12px (baseline).

Verification (Playwright, post-rebuild)

sliders[0..11] rect heights:  baseline=[12]*12   local=[12]*12   ✓
thumb x (Default):            baseline=62        local=62        ✓
mark rel-y (Hide thumb):      baseline=+1.5      local=+1.5      ✓
Track bg-color:               baseline=rgb(196,198,202)/0.24 opacity   local=rgb(196,198,202) opacity=0.24   ✓
Indicator opacity:            baseline=1         local=1         ✓

Files changed:

  • packages/base/Slider/src/Slider/Slider.tsx — restructure Indicator outside Track, !absolute overrides, ml-[1.5px] on thumb, -mb-[1px] on Control
  • packages/base/Slider/src/SliderMark/SliderMark.tsx-top-[4.5px] instead of top-[1.5px]
  • __snapshots__/test.tsx.snap — sync DOM tree + classes

Diagnostic data saved to migration-runs/2026-05-13/Slider/computed-styles-{baseline,local}.json.

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 15, 2026
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 18, 2026

🤖 Orchestrator agent (autonomous review-response)

Happo fix iter-8 — input rect mismatch

Prior iteration closed 2 of 9 diffs (Cypress range/tooltip + "Hide thumb" Storybook). Remaining 7 stories all have a visible thumb. Re-ran getComputedStyle() on the input element inside the thumb.

One more diff identified:

Element / Property Baseline (master) Local (pre-fix iter-8)
Input style attribute border: 0; clip: rect(0,0,0,0); height: 100%; margin: -1px; ... position: absolute; ... width: 100%; (no top/left) clip-path: inset(50%); ... margin: -1px; ... position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; (explicit top/left)
Input top (computed) 1px (flex-derived static position, centered in thumb) 0px (top-left of thumb padding-box)
Input rect x, y (64, 1394.7) (centered in thumb at 62,1392.7) (63, 1393.7) (offset to top-left, -1 margin shift)

OLD @mui/base set the input style without explicit top/left, so the input used its static position. Since the thumb is display: flex; justify-content: center; align-items: center, the static position is the thumb's flex-center. NEW @base-ui/react spreads visuallyHidden style with top: 0; left: 0 set explicitly, anchoring the input to the thumb's padding-box top-left.

Both clip the input to invisible (legacy clip vs modern clip-path: inset(50%)), so the input has no visible pixels — but the input's reference rect differs, which apparently leaks into sub-pixel anti-aliasing of the overall thumb rendering.

Fix in packages/base/Slider/src/Slider/Slider.tsx:

   const thumbClassName = twJoin(
     'group/thumb flex justify-center items-center w-[15px] h-[15px]',
     'rounded-[50%] bg-blue-500 border-[2px] border-solid border-white',
     'outline-0 absolute transition-shadow cursor-pointer ml-[1.5px]',
+    '[&_input]:!top-auto [&_input]:!left-auto',
     isThumbHidden && 'hidden'
   )

[&_input]:!top-auto generates CSS .parent input { top: auto !important } which beats base-ui's inline top: 0. With top/left: auto on the absolute input, it falls back to its static position (centered in flex thumb). Matches baseline.

Playwright verification (post-rebuild):

  • Input rect x, y baseline=(64, 1394.7), local pre-fix=(63, 1393.7), local post-fix=(64, 1394.7)
  • Input computed top: baseline=1px, local post-fix=1px

Snapshot updated to include the new utility (jss-snapshot-serializer leaves [&_input]:!top-auto untouched — the regex [a-zA-Z0-9]*-[a-zA-Z0-9]*-[0-9]* requires the third group to be digits, which auto isn't).

Net accumulated fix list across all iterations:

  • ml-[1.5px] on thumb — closes 1.5px horizontal offset
  • [&_input]:!top-auto [&_input]:!left-auto on thumb — closes input-rect offset (this iteration)
  • -top-[4.5px] on SliderMark — closes mark vertical offset
  • Indicator out of Track (sibling) + !absolute on both — restores OLD's RGB+opacity (no OKLAB color-mix from bg-color/[alpha])
  • -mb-[1px] on Control — collapses 1px flow contribution to match baseline root height

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 18, 2026
vedrani added 5 commits May 18, 2026 13:16
Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994
Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 1] address review feedback
Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 2] address review feedback
Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 3] address review feedback
Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 4] address review feedback
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Fails
🚫

Commit 597ff44 does not meet requirements of Commit Message Quality:

  • body lines must not exceed 79 characters

Generated by 🚫 dangerJS against fa60f0e

@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 20, 2026
// eslint-disable-next-line react/no-array-index-key
key={`thumb-${index}`}
index={index}
id={thumbId}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The id prop is documented as "Id attribute of the input element," but it's now passed to <Slider.Thumb>, which puts it on the thumb div rather than the input. It also only goes to the first thumb (index === 0 ? id : undefined). Was this placement intentional? If anything targets #id expecting the input (or the old root element), this changes where it lands.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Orchestrator agent (autonomous review-response)

Good catch. In @base-ui/react, id on Slider.Thumb goes to the thumb div, not the inner <input type="range"> (which gets an auto-generated id). To forward id to the input we'd need an imperative inputRef callback:

<Slider.Thumb inputRef={(el) => { if (el && thumbId) el.id = thumbId }} ...>

This preserves the documented semantics. Apply this? 👍 to confirm, or let me know if you'd prefer to update the prop docs to reflect the new placement instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, this is not great. let's keep this way OR maybe we can put the id on the root? that would make more sense, don't you think?

Comment thread packages/base/Slider/src/Slider/Slider.tsx Outdated
Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 12] address review feedback
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 20, 2026

🤖 Orchestrator agent (autonomous review-response)

Two issues addressed in latest push:

Happo range/when-tooltip-intersect (60→543px body height): traced to @base-ui/react's Slider.Thumb rendering <input type="range"> with position:fixed; height:100% for VoiceOver sizing. Happo's DOM-snapshot renderer includes fixed elements in the capture height. Fixed via inputRef restoring position:absolute; 1×1px to match old @mui/base behavior.

Danger commit-message failure: commit 597ff445f has an 88-char body line. Sandbox policy blocks git history rewrites (filter-branch, checkout --detach). Needs operator git rebase -i HEAD~2 to wrap the body lines to ≤79 chars.

Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 12] address review feedback
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 20, 2026
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 20, 2026

🤖 Orchestrator agent (autonomous review-response)

Danger fails on commit 597ff445f — body has an 86-char line (exceeds 79). Fix requires rewriting that commit's message; the agent doesn't have history-rewrite tooling on this sweep. Operator: rebase + reword 597ff445f, then force-push. Suggested wrapped body ready locally.

<MUIBaseSlider
ref={sliderRef}
<BaseUISlider.Root
ref={ref as React.Ref<HTMLDivElement>}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type casting is not allowed in Picasso codebase

Copy link
Copy Markdown
Collaborator

@denieler denieler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clicking area for thumbs in Slider before this change was significantly bigger, so it was easier to use Slide as a user. I think this is necessary to fix in this PR

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 21, 2026

🤖 Orchestrator agent (autonomous review-response)

Done — root cause confirmed. @mui/base/Slider attached onMouseDown to the Root (13px tall via py-[6px]); @base-ui/react attaches onPointerDown to SliderControl, which was h-[1px]. Moved py-[6px] -my-[6px] + cursor-pointer from Root to Control. Click target back to ~13px, no visual position change.

Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 14] address review feedback
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 21, 2026
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 21, 2026

🛑 Orchestrator escalation — Slider

Trigger: migrate-loop stuck on deterministic gate stages: happo:snapshots:Slider/Controlled value/chrome-desktop+Slider/Default/chrome-desktop+Slider/Disable track highlight/chrome-desktop+Slider/Initial value/chrome-desktop+Slider/Marks/chrome-desktop+Slider/Range/chrome-desktop+Slider/Tooltip/chrome-desktop (identical content across 2 consecutive iters). Worktree left dirty for operator inspection.
Iterations: 3 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: /Users/vivanac/Projects/picasso/migration-runs/2026-05-21/Slider-v2/worktree/migration-runs/2026-05-21/Slider/report.md

See docs/migration/references/escalation.md for the full handoff procedure.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 21, 2026

🛑 Orchestrator escalation — Slider

Trigger: migrate-loop stuck on deterministic gate stages: happo:0: (identical content across 2 consecutive iters). Worktree left dirty for operator inspection.
Iterations: 3 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: /Users/vivanac/Projects/picasso/migration-runs/2026-05-21/Slider-v2/worktree/migration-runs/2026-05-21/Slider/report.md

See docs/migration/references/escalation.md for the full handoff procedure.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 22, 2026

🛑 Orchestrator escalation — Slider

Trigger: gate passed without any agent source changes (0 commits produced across iters)
Iterations: 1 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: /Users/vivanac/Projects/picasso/migration-runs/2026-05-22/Slider-v2/worktree/migration-runs/2026-05-22/Slider/report.md

See docs/migration/references/escalation.md for the full handoff procedure.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 22, 2026

🛑 Orchestrator escalation — Slider

Trigger: migrate-loop stuck on deterministic gate stages: (identical content across 2 consecutive iters). Worktree left dirty for operator inspection.
Iterations: 2 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: /Users/vivanac/Projects/picasso/migration-runs/2026-05-22/Slider-v2/worktree/migration-runs/2026-05-22/Slider/report.md

See docs/migration/references/escalation.md for the full handoff procedure.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 22, 2026

🛑 Orchestrator escalation — Slider

Trigger: migrate-loop stuck on deterministic gate stages: happo:snapshots:Slider/Controlled value/chrome-desktop+Slider/Default/chrome-desktop+Slider/Disable track highlight/chrome-desktop+Slider/Hide thumb when value is null or undefined/chrome-desktop+Slider/Initial value/chrome-desktop+Slider/Marks/chrome-desktop+Slider/Range/chrome-desktop+Slider/Tooltip/chrome-desktop (identical content across 2 consecutive iters). Worktree left dirty for operator inspection.
Iterations: 3 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: /Users/vivanac/Projects/picasso/migration-runs/2026-05-22/Slider-v2/worktree/migration-runs/2026-05-22/Slider/report.md

See docs/migration/references/escalation.md for the full handoff procedure.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 22, 2026

🤖 Orchestrator agent (autonomous review-response)

Danger fails on commit 597ff445f — body line "Drop after-fix-thumbs.json, baseline-tooltip-computed.json, local-thumb-computed.json," is 84 chars. Fixing requires interactive rebase + force-push (destructive on the migration branch). Want me to rewrite the offending commit body, or will you handle it? 👍 to authorize the history rewrite.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 22, 2026

🤖 Orchestrator agent (autonomous review-response)

Playwright runtime verification on localhost:9001/iframe.html?id=components-slider--slider: DOM probe and side-by-side screenshots show identical positions to picasso.toptal.net baseline for all tooltip pills (outer span x=69.52, w=31.96, inner x=73.52, w=23.96, thumb x=78, w=15 — same in both). Console clean. Remaining Happo diffs appear to be sub-pixel rendering noise or unrelated flake (UserBadge).

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 22, 2026

🤖 Orchestrator agent (autonomous review-response)

Re-verified at Happo's chrome-desktop (1280×1024). DOM probe of "Display persistently" tooltip (the 0 pill) is byte-identical between localhost:9001 and picasso.toptal.net baseline: outer span x=69.52, w=31.96; inner x=73.52, w=23.96; thumb x=78, w=15. Same left, right, transform, translate. Only tag differs (<span> vs <div>).

The persistent Slider/Tooltip/chrome-desktop Happo diff sits at the pixelmatch noise floor — visually indistinguishable, but pixelmatch keeps flagging it.

Operator cleanup needed: commit 4fc5f2e50 accidentally committed 4 Playwright PNGs ({baseline,local}--components-slider--slider*.png) at repo root. The MCP saved screenshots to cwd instead of ../playwright/ (sandbox blocks me from writing outside the worktree). I cannot git rm (sandbox blocks destructive ops). Could you git rm these in a follow-up commit?

Tier 0 component. See PR description for prop-surface diff,
import diff, and Happo summary.

Refs: PF-1994

[review-iter 15] address review feedback
@github-actions
Copy link
Copy Markdown
Contributor

📖 Storybook Preview

🚀 Your Storybook preview is ready: View Storybook

📍 Preview URL: https://toptal.github.io/picasso/prs/4955/

This preview is updated automatically when you push changes to this PR.

github-actions Bot added a commit that referenced this pull request May 23, 2026
@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 24, 2026

🛑 Orchestrator escalation — Slider

Trigger: gate did not pass after 10 iterations
Iterations: 10 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: (none)

See docs/migration/references/escalation.md for the full handoff procedure.

@vedrani
Copy link
Copy Markdown
Collaborator Author

vedrani commented May 24, 2026

🛑 Orchestrator escalation — Slider

Trigger: 2 consecutive iterations failed on the same gate stages (build,cypress,happo,jest); agent is stuck
Iterations: 2 / 3
PR: #4955
Worktree: migration-runs/2026-05-13/Slider/worktree
Last gate report: /Users/vivanac/Projects/picasso/migration-runs/2026-05-24/Slider-v2/worktree/migration-runs/2026-05-24/Slider/report.md

See docs/migration/references/escalation.md for the full handoff procedure.

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.

3 participants