@@ -75,20 +75,20 @@ const EMPTY_IDS: ReadonlySet<string> = new Set()
7575const ACTION_BUTTON_STYLES = [
7676 'size-[24px] rounded-md p-0' ,
7777 'border-none bg-transparent text-[var(--text-icon)]' ,
78- 'hover-hover:bg-[var(--surface-5)] hover-hover:!text-[var(--text-primary)]' ,
79- 'dark:hover-hover:bg-[var(--surface-4)]' ,
80- 'transition-[background-color,color,opacity,transform] duration-150 active:scale-[0.96]' ,
78+ 'transition-[background-color,color,opacity,transform] duration-150' ,
8179 'group-data-[node-selected]:text-[var(--surface-2)]' ,
82- 'hover-hover:group-data-[node-selected]:bg-[var(--surface-2)]' ,
83- 'hover-hover:group-data-[node-selected]:!text-[var(--text-primary)]' ,
8480] . join ( ' ' )
8581
8682const FIRST_ACTION_STYLES =
8783 "!w-[40px] [clip-path:path('M23.75_0A8_8_0_0_0_17.6_2.88L3.41_19.9A2.5_2.5_0_0_0_5.34_24L36_24A4_4_0_0_0_40_20L40_4A4_4_0_0_0_36_0Z')] [&>svg]:translate-x-[8px] [&>svg]:translate-y-px"
8884
85+ /** A 24px target even at MIN_ZOOM, extending above/left of the unchanged 40px painted slot. */
86+ const RUN_ACTION_HIT_STYLES =
87+ 'group/run relative -ml-[14px] size-[54px] shrink-0 border-none bg-transparent! p-0'
88+
8989/** The running run slot: graphite fill, inverse glyph - the editor's own treatment. */
9090const RUNNING_RUN_STYLES =
91- '!bg-[var(--text-secondary)] !text-[var(--text-inverse)] hover-hover:!bg-[var(--white)] hover-hover:!text-[var(--surface-inverted)]'
91+ '!bg-[var(--text-secondary)] !text-[var(--text-inverse)] group- hover-hover/run :!bg-[var(--white)] group- hover-hover/run :!text-[var(--surface-inverted)]'
9292/** A bystander card's actions dim mid-run; the run/stop slot keeps its ordinary chrome. */
9393const BYSTANDER_ACTION_STYLES =
9494 '!bg-transparent !opacity-25 hover-hover:!bg-transparent dark:hover-hover:!bg-transparent'
@@ -227,7 +227,7 @@ function PreviewActionBar({ block, running, workflowRunning, onRunToggle }: Prev
227227 return (
228228 < div
229229 data-workflow-action-bar-swell = ''
230- className = '-top-[28px] pointer-events-auto absolute right-[24px] z-[40] h-[28px] w-fit overflow-hidden rounded-lg px-[0.2rem] py-0.5'
230+ className = '-top-[28px] pointer-events-auto absolute right-[24px] z-[40] h-[28px] w-fit rounded-lg px-[0.2rem] py-0.5'
231231 >
232232 < div className = 'pointer-events-none relative flex h-full flex-row items-center gap-[2px] opacity-0 transition-opacity duration-[30ms] [transition-timing-function:cubic-bezier(0.23,1,0.32,1)] group-data-[action-menu-ready]:pointer-events-auto group-data-[action-menu-ready]:opacity-100 group-data-[action-menu-ready]:duration-100' >
233233 { sweeping && (
@@ -250,35 +250,42 @@ function PreviewActionBar({ block, running, workflowRunning, onRunToggle }: Prev
250250 ) }
251251 < Tooltip . Root preferAbove >
252252 < Tooltip . Trigger asChild >
253- < span className = 'inline-flex' >
253+ < span className = 'inline-flex h-full items-end ' >
254254 < Button
255255 type = 'button'
256256 variant = 'ghost'
257257 aria-label = { workflowRunning ? 'Stop workflow' : `Run ${ block . name } ` }
258- className = { cn (
259- ACTION_BUTTON_STYLES ,
260- FIRST_ACTION_STYLES ,
261- running && RUNNING_RUN_STYLES ,
262- workflowRunning && 'group/run'
263- ) }
258+ className = { RUN_ACTION_HIT_STYLES }
264259 onClick = { ( event ) => {
265260 event . stopPropagation ( )
266261 onRunToggle ( )
267262 } }
268263 >
269- { workflowRunning ? (
270- running ? (
271- < RunningActionIcon />
264+ < span
265+ className = { cn (
266+ 'pointer-events-none absolute right-0 bottom-0 flex items-center justify-center' ,
267+ ACTION_BUTTON_STYLES ,
268+ FIRST_ACTION_STYLES ,
269+ 'group-hover-hover/run:!text-[var(--text-primary)] group-hover-hover/run:bg-[var(--surface-5)] dark:group-hover-hover/run:bg-[var(--surface-4)]' ,
270+ 'group-hover-hover/run:group-data-[node-selected]:!text-[var(--text-primary)] group-hover-hover/run:group-data-[node-selected]:bg-[var(--surface-2)]' ,
271+ 'group-active/run:scale-[0.96]' ,
272+ running && RUNNING_RUN_STYLES
273+ ) }
274+ >
275+ { workflowRunning ? (
276+ running ? (
277+ < RunningActionIcon />
278+ ) : (
279+ < Square
280+ className = 'size-[11px] fill-current'
281+ aria-hidden = 'true'
282+ strokeWidth = { 0 }
283+ />
284+ )
272285 ) : (
273- < Square
274- className = 'size-[11px] fill-current'
275- aria-hidden = 'true'
276- strokeWidth = { 0 }
277- />
278- )
279- ) : (
280- < PlayOutline className = 'size-[14px]' />
281- ) }
286+ < PlayOutline className = 'size-[14px]' />
287+ ) }
288+ </ span >
282289 </ Button >
283290 </ span >
284291 </ Tooltip . Trigger >
@@ -291,17 +298,14 @@ function PreviewActionBar({ block, running, workflowRunning, onRunToggle }: Prev
291298 < Button
292299 type = 'button'
293300 variant = 'ghost'
294- aria-label = { label }
301+ disabled
302+ aria-label = { `${ label } unavailable in preview` }
295303 className = { cn (
296304 ACTION_BUTTON_STYLES ,
297305 label === 'Delete' && LAST_ACTION_STYLES ,
298306 workflowRunning && ! running && BYSTANDER_ACTION_STYLES ,
299307 sweeping && SWEEP_SLOT_STYLES
300308 ) }
301- onClick = { ( event ) => {
302- event . preventDefault ( )
303- event . stopPropagation ( )
304- } }
305309 >
306310 < Icon className = 'size-[14px]' />
307311 </ Button >
0 commit comments