11import {
22 ArrowPathIcon ,
3+ ArrowRightIcon ,
34 ClockIcon ,
45 CpuChipIcon ,
56 NoSymbolIcon ,
67 RectangleStackIcon ,
7- StopCircleIcon ,
8- StopIcon ,
98} from "@heroicons/react/20/solid" ;
109import { BeakerIcon , BookOpenIcon , CheckIcon } from "@heroicons/react/24/solid" ;
1110import { useLocation } from "@remix-run/react" ;
@@ -16,6 +15,7 @@ import { Button, LinkButton } from "~/components/primitives/Buttons";
1615import { Checkbox } from "~/components/primitives/Checkbox" ;
1716import { Dialog , DialogTrigger } from "~/components/primitives/Dialog" ;
1817import { Header3 } from "~/components/primitives/Headers" ;
18+ import { PopoverMenuItem } from "~/components/primitives/Popover" ;
1919import { useSelectedItems } from "~/components/primitives/SelectedItemsProvider" ;
2020import { SimpleTooltip } from "~/components/primitives/Tooltip" ;
2121import { useEnvironments } from "~/hooks/useEnvironments" ;
@@ -412,9 +412,65 @@ function RunActionsCell({ run, path }: { run: RunListItem; path: string }) {
412412 return (
413413 < TableCellMenu
414414 isSticky
415+ popoverContent = {
416+ < >
417+ < PopoverMenuItem
418+ to = { path }
419+ icon = { ArrowRightIcon }
420+ leadingIconClassName = "text-blue-500"
421+ title = "View run"
422+ />
423+ { ! run . isCancellable && (
424+ < Dialog >
425+ < DialogTrigger
426+ asChild
427+ className = "size-6 rounded-sm p-1 text-text-dimmed transition hover:bg-charcoal-700 hover:text-text-bright"
428+ >
429+ < Button
430+ variant = "small-menu-item"
431+ LeadingIcon = { NoSymbolIcon }
432+ leadingIconClassName = "text-error"
433+ fullWidth
434+ textAlignLeft
435+ className = "w-full px-1.5 py-[0.9rem]"
436+ >
437+ Cancel run
438+ </ Button >
439+ </ DialogTrigger >
440+ < CancelRunDialog
441+ runFriendlyId = { run . friendlyId }
442+ redirectPath = { `${ location . pathname } ${ location . search } ` }
443+ />
444+ </ Dialog >
445+ ) }
446+ { run . isReplayable && (
447+ < Dialog >
448+ < DialogTrigger
449+ asChild
450+ className = "h-6 w-6 rounded-sm p-1 text-text-dimmed transition hover:bg-charcoal-700 hover:text-text-bright"
451+ >
452+ < Button
453+ variant = "small-menu-item"
454+ LeadingIcon = { ArrowPathIcon }
455+ leadingIconClassName = "text-success"
456+ fullWidth
457+ textAlignLeft
458+ className = "w-full px-1.5 py-[0.9rem]"
459+ >
460+ Replay run
461+ </ Button >
462+ </ DialogTrigger >
463+ < ReplayRunDialog
464+ runFriendlyId = { run . friendlyId }
465+ failedRedirect = { `${ location . pathname } ${ location . search } ` }
466+ />
467+ </ Dialog >
468+ ) }
469+ </ >
470+ }
415471 hiddenButtons = {
416- < div className = "flex items-center gap-1 " >
417- { run . isCancellable && (
472+ < div className = "flex items-center" >
473+ { ! run . isCancellable && (
418474 < SimpleTooltip
419475 button = {
420476 < Dialog >
@@ -435,6 +491,9 @@ function RunActionsCell({ run, path }: { run: RunListItem; path: string }) {
435491 disableHoverableContent
436492 />
437493 ) }
494+ { ! run . isCancellable && run . isReplayable && (
495+ < div className = "mx-0.5 h-6 w-px bg-grid-dimmed" />
496+ ) }
438497 { run . isReplayable && (
439498 < SimpleTooltip
440499 button = {
0 commit comments