This is an automated email from the ASF dual-hosted git repository.

shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 42ac710ae74 UI: Add a Smooth Operator scene for SmoothOperator tasks 
(#74917)
42ac710ae74 is described below

commit 42ac710ae74d24bc6812efaf59edc2a2db9e0226
Author: Shahar Epstein <[email protected]>
AuthorDate: Thu Nov 19 00:39:57 2026 +0200

    UI: Add a Smooth Operator scene for SmoothOperator tasks (#74917)
    
    SmoothOperator has only ever logged a link to Sade's "Smooth Operator",
    which nobody sees unless they open the task log. Task and task instance
    pages for a SmoothOperator now offer a record button that opens a
    full-screen 1980s supper-club scene over the dimmed Airflow page.
    
    The scene runs as a small Dag of its own, and that is the joke: the
    lights come up while dim_the_lights runs, the platter spins up and the
    tonearm cues onto the record while drop_the_needle runs, and the video
    plays once the SmoothOperator task itself runs, which is as quick as the
    real operator's execute. Airflow's own pause switch pauses the show the
    way it pauses a Dag, and any key or click skips to the finished run.
    
    Because the scene embeds a YouTube video, it asks first, in Airflow's
    own confirmation dialog, with the Google privacy and YouTube terms
    links beside a notice that names what YouTube may receive (IP address,
    browser or device information, the page's address or referrer
    including its host name) and store (cookies or local storage). The
    viewer may ask to be remembered in this browser; that is a single
    localStorage flag, described separately so it is not conflated with
    what YouTube gets, and the scene offers a way to take it back that
    loads nothing. The video is a plain, sandboxed embed on YouTube's
    privacy-enhanced host that mounts only once the player is visible and
    never smaller than YouTube's 200x200 minimum, as YouTube's embed rules
    require. The IFrame Player API is deliberately not used: it would run
    Google's script in Airflow's own origin, and driving the player through
    its undocumented postMessage protocol would breach YouTube's developer
    policies, so the scene is scripted rather than synchronised.
    
    There is deliberately no deployment-manager off switch: the embed is
    only requested after the user clicks Play and confirms, and an
    administrator who wants to block it entirely can do so with a
    Content-Security-Policy frame-src directive on the API server.
    
    The icon is Lucide's disc-album, ISC like the other Lucide icons the UI
    already uses, so no new icon set and no attribution. Only a
    SmoothOperator's header reads localStorage; every other task's header
    returns early with no hooks.
    
    The scene works with no network access, keeps its fades and the Dag
    run under reduced motion while dropping the ambient movement, and
    leaves the page's own shortcuts and the player's controls untouched.
---
 .../src/components/SmoothOperator/Atmosphere.tsx   | 124 ++++++
 .../ui/src/components/SmoothOperator/MiniDag.tsx   | 111 +++++
 .../ui/src/components/SmoothOperator/Player.tsx    | 122 ++++++
 .../ui/src/components/SmoothOperator/Record.tsx    | 267 ++++++++++++
 .../SmoothOperator/SmoothOperator.test.tsx         | 407 ++++++++++++++++++
 .../components/SmoothOperator/SmoothOperator.tsx   | 474 +++++++++++++++++++++
 .../ui/src/components/SmoothOperator/stage.ts      | 135 ++++++
 .../ui/src/components/SmoothOperator/youtube.ts    |  33 ++
 .../src/airflow/ui/src/pages/Task/Header.tsx       |  24 +-
 .../airflow/ui/src/pages/TaskInstance/Header.tsx   |   2 +
 10 files changed, 1689 insertions(+), 10 deletions(-)

diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/Atmosphere.tsx 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/Atmosphere.tsx
new file mode 100644
index 00000000000..5d113ee5478
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/components/SmoothOperator/Atmosphere.tsx
@@ -0,0 +1,124 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box } from "@chakra-ui/react";
+
+import {
+  BREATH,
+  COLORS,
+  driftKey,
+  driftPool,
+  fadeIn,
+  passBy,
+  type Phase,
+  PHASE_MS,
+  step,
+  sweep,
+  swell,
+  warm,
+} from "./stage";
+
+// A man in a hat, seen only as a shadow on the back wall.
+const Silhouette = () => (
+  <svg height="100%" viewBox="0 0 100 260">
+    <ellipse cx="50" cy="40" fill="currentColor" rx="36" ry="6" />
+    <rect fill="currentColor" height="30" rx="8" width="38" x="31" y="12" />
+    <ellipse cx="50" cy="56" fill="currentColor" rx="15" ry="19" />
+    <path d="M38 72 L62 72 L88 96 L80 260 L20 260 L12 96 Z" 
fill="currentColor" />
+  </svg>
+);
+
+// Decorative layers only; everything here sits behind the content and ignores 
the pointer.
+export const Atmosphere = ({ phase }: { readonly phase: Phase }) => (
+  <Box aria-hidden inset={0} overflow="hidden" pointerEvents="none" 
position="absolute">
+    {/* Dark until dim_the_lights runs; then the room fades up. */}
+    <Box
+      animation={phase === "dim" ? `${fadeIn} ${PHASE_MS.dim}ms ease-in-out 
both` : undefined}
+      inset={0}
+      opacity={phase === "queued" ? 0 : 1}
+      position="absolute"
+    >
+      <Box animation={`${swell} ${BREATH} ease-in-out infinite`} inset={0} 
position="absolute">
+        <Box
+          animation={`${driftKey} 37s ease-in-out infinite`}
+          bg={`radial-gradient(ellipse 55% 70% at 26% 18%, ${COLORS.key}, 
transparent 70%)`}
+          data-motion
+          inset="-15%"
+          position="absolute"
+        />
+        <Box
+          animation={`${driftPool} 53s ease-in-out infinite`}
+          data-motion
+          height="75vh"
+          position="absolute"
+          right="2%"
+          top="30%"
+          width="75vh"
+        >
+          <Box
+            bg={`radial-gradient(circle, ${COLORS.pool}, transparent 65%)`}
+            inset={0}
+            position="absolute"
+          />
+          {/* Cross-fading a rose pool over the amber one shifts the colour 
without repainting. */}
+          <Box
+            animation={`${warm} 61s ease-in-out infinite`}
+            bg={`radial-gradient(circle, ${COLORS.rose}, transparent 65%)`}
+            inset={0}
+            opacity={0}
+            position="absolute"
+          />
+        </Box>
+      </Box>
+      <Box
+        animation={`${sweep} 29s ease-in-out infinite`}
+        bg="conic-gradient(from 160deg at 50% 0%, transparent 0deg, rgba(255, 
214, 170, 0.13) 14deg, rgba(255, 214, 170, 0.05) 26deg, transparent 40deg)"
+        data-motion
+        height="150vh"
+        left="58%"
+        marginLeft="-70vh"
+        position="absolute"
+        top="-20vh"
+        transformOrigin="50% 0%"
+        width="140vh"
+      />
+    </Box>
+    <Box
+      // The first walk starts about 8 s in, once the video is up: the pass 
begins at 74% of the
+      // 47 s cycle. The silhouette walks under reduced motion too; one slow 
crossing a minute is
+      // a character, not a hazard, unlike the lights that never stop.
+      animation={`${passBy} 47s linear -27s infinite`}
+      color="rgba(0, 0, 0, 0.62)"
+      filter="blur(3px)"
+      height="46vh"
+      left={0}
+      opacity={0}
+      position="absolute"
+      top="16vh"
+    >
+      <Box animation={`${step} 0.9s ease-in-out infinite`} height="100%">
+        <Silhouette />
+      </Box>
+    </Box>
+    <Box
+      bg="radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(0, 0, 0, 
0.8) 100%)"
+      inset={0}
+      position="absolute"
+    />
+  </Box>
+);
diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/MiniDag.tsx 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/MiniDag.tsx
new file mode 100644
index 00000000000..d3680cbb747
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/components/SmoothOperator/MiniDag.tsx
@@ -0,0 +1,111 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { Box, Flex, Text } from "@chakra-ui/react";
+
+import { StateIcon } from "src/components/StateIcon";
+
+import { COLORS, COPY, isPast, type Phase, ring } from "./stage";
+
+// Each task runs during its own phase, then stays successful.
+const getTaskState = (phase: Phase, taskPhase: Phase): keyof typeof 
COPY.states => {
+  if (phase === taskPhase) {
+    return "running";
+  }
+
+  return isPast(phase, taskPhase) ? "success" : "queued";
+};
+
+/**
+ * The scene, run as a Dag: each task runs while its part of the show happens 
on stage.
+ */
+export const MiniDag = ({ phase, taskId }: { readonly phase: Phase; readonly 
taskId: string }) => {
+  const tasks: Array<{ id: string; state: keyof typeof COPY.states }> = [
+    { id: "dim_the_lights", state: getTaskState(phase, "dim") },
+    { id: "drop_the_needle", state: getTaskState(phase, "needle") },
+    { id: taskId, state: getTaskState(phase, "show") },
+  ];
+
+  return (
+    <>
+      {/* Only the finished run is announced: per-task updates would talk over 
the opening music. */}
+      <Text aria-live="polite" as="output" srOnly>
+        {phase === "done" ? `${taskId}: ${COPY.states.success}` : undefined}
+      </Text>
+      <Flex
+        alignItems="center"
+        aria-label={COPY.dag}
+        as="ol"
+        fontFamily="mono"
+        fontSize={{ base: "xs", lg: "md", md: "sm" }}
+        gap={{ base: 2, lg: 4, md: 3 }}
+        listStyleType="none"
+        minWidth={0}
+      >
+        {tasks.map(({ id, state }, index) => {
+          const isUpstreamDone = tasks[index - 1]?.state === "success";
+
+          return (
+            <Flex
+              alignItems="center"
+              as="li"
+              color={state === "queued" ? COLORS.muted : COLORS.cream}
+              gap={{ base: 2, md: 3 }}
+              key={id}
+              minWidth={0}
+              title={`${id}: ${COPY.states[state]}`}
+              transition="color 0.6s ease"
+            >
+              {index > 0 ? (
+                // The edge takes the upstream task's colour once it has 
succeeded, like the graph view.
+                <Box
+                  aria-hidden
+                  bg={isUpstreamDone ? "success.solid" : COLORS.muted}
+                  flexShrink={0}
+                  height="2px"
+                  opacity={isUpstreamDone ? 0.9 : 0.35}
+                  transition="background-color 0.6s ease, opacity 0.6s ease"
+                  width={{ base: 4, lg: 16, md: 8 }}
+                />
+              ) : undefined}
+              <Flex
+                alignItems="center"
+                animation={state === "running" ? `${ring} 1.6s ease-out 
infinite` : undefined}
+                bg={`${state}.solid`}
+                borderRadius="full"
+                color={`${state}.contrast`}
+                flexShrink={0}
+                height={{ base: "20px", lg: "32px", md: "26px" }}
+                justifyContent="center"
+                transition="background-color 0.6s ease"
+                width={{ base: "20px", lg: "32px", md: "26px" }}
+              >
+                <StateIcon size={16} state={state} />
+              </Flex>
+              {/* On phones only the SmoothOperator task keeps its name. */}
+              <Text display={{ base: id === taskId ? "block" : "none", md: 
"block" }} truncate>
+                {id}
+              </Text>
+              <Text srOnly>{COPY.states[state]}</Text>
+            </Flex>
+          );
+        })}
+      </Flex>
+    </>
+  );
+};
diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/Player.tsx 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/Player.tsx
new file mode 100644
index 00000000000..d2828b68cb1
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/components/SmoothOperator/Player.tsx
@@ -0,0 +1,122 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { useEffect, useRef, useState } from "react";
+
+import { Box } from "@chakra-ui/react";
+
+import { COLORS, COPY, prefersReducedMotion, TABLET_PORTRAIT } from "./stage";
+import { EMBED_URL } from "./youtube";
+
+/**
+ * The video, loaded with autoplay once its task runs. YouTube asks that 
autoplay never start before
+ * the player is visible (more than half on screen), so the iframe waits until 
the box is both faded
+ * in and in view; on a phone that can mean until the viewer scrolls to it.
+ */
+export const Player = ({ isShowtime }: { readonly isShowtime: boolean }) => {
+  const boxRef = useRef<HTMLDivElement>(null);
+  const [hasBeenSeen, setHasBeenSeen] = useState(false);
+
+  useEffect(() => {
+    const box = boxRef.current;
+
+    if (!isShowtime || hasBeenSeen || box === null) {
+      return undefined;
+    }
+    box.scrollIntoView({ behavior: prefersReducedMotion() ? "auto" : "smooth", 
block: "nearest" });
+    let ratio = 0;
+    // The observer ignores opacity, so a box that is still fading in counts 
as hidden.
+    const showIfVisible = () => {
+      if (ratio >= 0.5 && globalThis.getComputedStyle(box).opacity === "1") {
+        setHasBeenSeen(true);
+      }
+    };
+    const observer = new IntersectionObserver(
+      ([entry]) => {
+        if (entry !== undefined) {
+          // isIntersecting is true for any sliver; YouTube's rule is more 
than half on screen.
+          ratio = entry.intersectionRatio;
+          showIfVisible();
+        }
+      },
+      { threshold: 0.5 },
+    );
+    const onTransitionEnd = (event: TransitionEvent) => {
+      if (event.target === box && event.propertyName === "opacity") {
+        showIfVisible();
+      }
+    };
+
+    observer.observe(box);
+    box.addEventListener("transitionend", onTransitionEnd);
+
+    return () => {
+      observer.disconnect();
+      box.removeEventListener("transitionend", onTransitionEnd);
+    };
+  }, [hasBeenSeen, isShowtime]);
+
+  return (
+    <Box
+      // The 1984 video is 4:3; matching it avoids pillarbox bars.
+      aspectRatio={4 / 3}
+      bg={COLORS.ink}
+      boxShadow="0 30px 80px rgba(0, 0, 0, 0.6)"
+      // On a portrait tablet the title row sits above the video and takes 
about 300px.
+      css={{ [TABLET_PORTRAIT]: { maxWidth: "min(100%, calc((78dvh - 330px) * 
4 / 3)) !important" } }}
+      data-testid="smooth-player"
+      // Never taller than the space between the letterbox bars, so it can 
always be more than half
+      // on screen (a landscape phone would otherwise never let it autoplay).
+      maxWidth={{
+        base: "min(100%, calc((100dvh - 160px) * 4 / 3))",
+        md: "min(100%, calc((100dvh - 22vh - 64px) * 4 / 3))",
+      }}
+      // YouTube requires an embedded player to be at least 200x200 px. On a 
short landscape phone the
+      // height cap above would otherwise shrink both dimensions below that, 
so both are floored.
+      minHeight="200px"
+      minWidth="200px"
+      // Keeps its place in the layout, but stays out of sight until the 
SmoothOperator task runs.
+      opacity={isShowtime ? 1 : 0}
+      overflow="hidden"
+      position="relative"
+      ref={boxRef}
+      transition="opacity 0.8s ease"
+      width="100%"
+    >
+      {isShowtime && hasBeenSeen ? (
+        <>
+          {/* The frame is cross-origin, so allow-scripts with 
allow-same-origin only grants
+              youtube-nocookie.com its own origin and cannot reach the Airflow 
page. The player needs
+              both. allow-presentation lets it offer Cast and Presentation. */}
+          <iframe
+            allow="autoplay; encrypted-media; picture-in-picture; fullscreen"
+            height="100%"
+            // YouTube requires a Referer from embeds; this sends only 
Airflow's origin.
+            referrerPolicy="strict-origin-when-cross-origin"
+            // oxlint-disable-next-line react/iframe-missing-sandbox
+            sandbox="allow-scripts allow-same-origin allow-presentation 
allow-popups allow-popups-to-escape-sandbox"
+            src={EMBED_URL}
+            style={{ border: 0, display: "block", inset: 0, position: 
"absolute" }}
+            title={COPY.video}
+            width="100%"
+          />
+        </>
+      ) : undefined}
+    </Box>
+  );
+};
diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/Record.tsx 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/Record.tsx
new file mode 100644
index 00000000000..fd8a7f40a19
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/components/SmoothOperator/Record.tsx
@@ -0,0 +1,267 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { useEffect, useId, useRef, useState } from "react";
+
+import { Box, chakra } from "@chakra-ui/react";
+
+import { AirflowPin } from "src/assets/AirflowPin";
+
+import {
+  ARM_LEAD_IN,
+  ARM_REST,
+  COLORS,
+  COPY,
+  cue,
+  CUE_MS,
+  prefersReducedMotion,
+  SIDE_MS,
+  TABLET_PORTRAIT,
+  track,
+} from "./stage";
+
+// 33⅓ rpm is one turn every 1.8 s. The platter turns at speed for everyone: a 
record that is
+// playing has to look like it is playing. Reduced motion drops the ambient 
movement around it.
+const TURN_MS = 1800;
+// The motor brings the platter up to speed in well under a second.
+const SPIN_UP_MS = 700;
+// When the opening is skipped, the arm still swings over, just faster.
+const QUICK_CUE_MS = 700;
+
+// As large as the stage allows: what is left between the letterbox bars 
(22vh) after the title,
+// the gap and the stage padding, capped by the column width.
+const SIZE = {
+  base: "min(72vw, 300px)",
+  md: "min(36vw, calc(78dvh - 13.5rem))",
+  xl: "min(34vw, calc(78dvh - 16.5rem))",
+};
+
+type Props = {
+  readonly isPaused: boolean;
+  readonly isSpinning: boolean;
+  // "cueing" plays the lift–swing–lower move once; "down" and "rest" are 
where it ends up.
+  readonly needle: "cueing" | "down" | "rest";
+};
+
+export const Record = ({ isPaused, isSpinning, needle }: Props) => {
+  // useId() can contain characters that break url(#…) references.
+  const pathId = `so${useId().replaceAll(/[^\w-]/gu, "")}`;
+  const discRef = useRef<HTMLDivElement>(null);
+  const spinRef = useRef<Animation | undefined>(undefined);
+
+  useEffect(() => {
+    const disc = discRef.current;
+
+    if (disc === null || typeof disc.animate !== "function") {
+      return undefined;
+    }
+    const spin = disc.animate([{ transform: "rotate(0deg)" }, { transform: 
"rotate(360deg)" }], {
+      duration: TURN_MS,
+      iterations: Infinity,
+    });
+
+    // cancel() rejects `finished`; nothing awaits it.
+    spin.finished.catch(() => undefined);
+    spin.pause();
+    spinRef.current = spin;
+
+    return () => {
+      spin.cancel();
+      spinRef.current = undefined;
+    };
+  }, []);
+
+  // Once the motor starts it does not stop; ramp the rate up so the platter 
has inertia.
+  useEffect(() => {
+    const spin = spinRef.current;
+
+    if (!isSpinning || spin === undefined) {
+      return undefined;
+    }
+    const start = performance.now();
+    let frame = 0;
+    const step = (now: number) => {
+      const progress = Math.min(1, (now - start) / SPIN_UP_MS);
+
+      spin.playbackRate = 1 - (1 - progress) ** 3;
+      if (progress < 1) {
+        frame = requestAnimationFrame(step);
+      }
+    };
+
+    spin.playbackRate = 0;
+    frame = requestAnimationFrame(step);
+
+    return () => cancelAnimationFrame(frame);
+  }, [isSpinning]);
+
+  // The motor stops with the Dag. CSS animations pause via the stage's 
data-paused; the Web
+  // Animations spin needs telling directly.
+  useEffect(() => {
+    const spin = spinRef.current;
+
+    if (spin === undefined || !isSpinning) {
+      return undefined;
+    }
+    if (isPaused) {
+      spin.pause();
+    } else {
+      spin.play();
+    }
+
+    return undefined;
+  }, [isPaused, isSpinning]);
+
+  // Whether the arm got here through the full cue. A skipped opening still 
swings it over, quickly,
+  // and from then on it tracks slowly inward the way a side plays.
+  const [hasCued, setHasCued] = useState(false);
+
+  if (needle === "cueing" && !hasCued) {
+    setHasCued(true);
+  }
+  let armAnimation: string | undefined;
+
+  if (needle === "cueing") {
+    armAnimation = `${cue} ${CUE_MS}ms ease-in-out both`;
+  } else if (needle === "down") {
+    // Same duration as the running cue, so a skip mid-swing lets it finish 
instead of snapping.
+    const cueMs = hasCued ? CUE_MS : QUICK_CUE_MS;
+
+    // The slow creep across the side is ambient movement; reduced motion 
keeps the arm on the lead-in.
+    const trackAnimation = prefersReducedMotion() ? "" : `, ${track} 
${SIDE_MS}ms linear ${cueMs}ms forwards`;
+
+    armAnimation = `${cue} ${cueMs}ms ease-in-out both${trackAnimation}`;
+  }
+
+  // A DJ scratch: drag the platter back, let it catch up. The spin owns the 
disc's transform, so
+  // the scratch is composited on top of it rather than replacing it, and the 
spin carries on from
+  // wherever the platter lands. A deliberate click is not ambient motion, so 
reduced motion keeps it.
+  const scratch = () => {
+    const disc = discRef.current;
+
+    if (disc === null || typeof disc.animate !== "function") {
+      return;
+    }
+    disc.animate(
+      [
+        { transform: "rotate(0deg)" },
+        { transform: "rotate(-70deg)" },
+        { transform: "rotate(18deg)" },
+        { transform: "rotate(0deg)" },
+      ],
+      { composite: "add", duration: 650, easing: "ease-in-out" },
+    );
+  };
+
+  return (
+    <chakra.button
+      _focusVisible={{ outline: `2px solid ${COLORS.tungsten}`, outlineOffset: 
"2px" }}
+      aria-label={COPY.scratch}
+      borderRadius="full"
+      // Beside the title on a portrait tablet, leaving the height to the 
video.
+      css={{ [TABLET_PORTRAIT]: { height: "240px !important", width: "240px 
!important" } }}
+      cursor="pointer"
+      flexShrink={0}
+      height={SIZE}
+      onClick={scratch}
+      position="relative"
+      title={COPY.scratch}
+      width={SIZE}
+    >
+      <Box inset={0} position="absolute">
+        <Box
+          // Texture only: nothing painted here is light, because light does 
not turn with the platter.
+          // Fine grooves, plus a few denser bands between tracks so the eye 
can follow the rotation.
+          bg="radial-gradient(circle at center, transparent 0 31%, rgba(0, 0, 
0, 0.7) 31% 32.2%, transparent 32.2% 46%, rgba(0, 0, 0, 0.7) 46% 47%, 
transparent 47% 61%, rgba(0, 0, 0, 0.7) 61% 62.2%, transparent 62.2% 100%), 
repeating-radial-gradient(circle at center, #0b0b0c 0 1.5px, #19181a 1.5px 
2.5px)"
+          borderRadius="full"
+          boxShadow="0 24px 60px rgba(0, 0, 0, 0.7), inset 0 0 0 2px #000"
+          inset={0}
+          position="absolute"
+          ref={discRef}
+        >
+          <svg aria-hidden style={{ inset: "28%", position: "absolute" }} 
viewBox="0 0 100 100">
+            <circle cx="50" cy="50" fill={COLORS.cream} r="50" />
+            <circle
+              cx="50"
+              cy="50"
+              fill="none"
+              r="33"
+              stroke={COLORS.oxblood}
+              strokeOpacity="0.25"
+              strokeWidth="0.6"
+            />
+            <path d="M 50,50 m -40,0 a 40,40 0 1,1 80,0 a 40,40 0 1,1 -80,0" 
fill="none" id={pathId} />
+            {/* textLength stretches the label to exactly one lap of the path, 
so it never overlaps itself. */}
+            <text fill={COLORS.oxblood} fontFamily="monospace" fontSize="8" 
textLength="250">
+              <textPath href={`#${pathId}`}>{COPY.label}</textPath>
+            </text>
+          </svg>
+          <Box height="14%" left="43%" position="absolute" top="43%" 
width="14%">
+            <AirflowPin height="100%" width="100%" />
+          </Box>
+        </Box>
+      </Box>
+      {/* Fixed light. Concentric grooves throw the key light back as one soft 
wedge pointing at the
+          centre, and the grooves slide underneath it; the rim catches a 
little of the same light. */}
+      <Box
+        bg="conic-gradient(from 214deg at 50% 50%, transparent 0deg, rgba(255, 
232, 205, 0.08) 12deg, rgba(255, 232, 205, 0.42) 22deg, rgba(255, 232, 205, 
0.08) 32deg, transparent 44deg), conic-gradient(from 34deg at 50% 50%, 
transparent 0deg, rgba(255, 232, 205, 0.14) 22deg, transparent 44deg), 
radial-gradient(circle at 32% 26%, rgba(255, 232, 205, 0.12), transparent 52%)"
+        borderRadius="full"
+        boxShadow="inset 0 0 0 1px rgba(255, 232, 205, 0.10), inset 10px 12px 
18px -6px rgba(255, 232, 205, 0.18)"
+        inset={0}
+        pointerEvents="none"
+        position="absolute"
+      />
+      {/* The tonearm rests beside the record until drop_the_needle cues it 
onto the lead-in groove. */}
+      <Box
+        animation={armAnimation}
+        aria-hidden
+        filter="drop-shadow(0 8px 10px rgba(0, 0, 0, 0.55))"
+        height="74%"
+        pointerEvents="none"
+        position="absolute"
+        right="-11%"
+        top="-12%"
+        transform={`rotate(${needle === "rest" ? ARM_REST : ARM_LEAD_IN}deg)`}
+        transformOrigin="50% 11%"
+        width="22%"
+      >
+        <svg height="100%" viewBox="0 0 60 200" width="100%">
+          <defs>
+            <linearGradient id={`${pathId}-steel`} x1="0" x2="1">
+              <stop offset="0" stopColor="#6f6b72" />
+              <stop offset="0.45" stopColor="#ece8ea" />
+              <stop offset="1" stopColor="#6f6b72" />
+            </linearGradient>
+          </defs>
+          <rect fill="#1b191c" height="12" rx="3" width="16" x="22" y="0" />
+          <circle cx="30" cy="22" fill="#1b191c" r="16" stroke="#3b383d" 
strokeWidth="2" />
+          <path
+            d="M30 22 L30 158 Q30 168 24 174"
+            fill="none"
+            stroke={`url(#${pathId}-steel)`}
+            strokeLinecap="round"
+            strokeWidth="4"
+          />
+          <circle cx="30" cy="22" fill={`url(#${pathId}-steel)`} r="6.5" />
+          <path d="M16 170 L30 176 L26 192 L12 186 Z" fill="#26232a" />
+          <rect fill={COLORS.tungsten} height="4" opacity="0.8" rx="1" 
width="6" x="16" y="185" />
+        </svg>
+      </Box>
+    </chakra.button>
+  );
+};
diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/SmoothOperator.test.tsx
 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/SmoothOperator.test.tsx
new file mode 100644
index 00000000000..3c3720d357d
--- /dev/null
+++ 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/SmoothOperator.test.tsx
@@ -0,0 +1,407 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import "@testing-library/jest-dom/vitest";
+import { act, cleanup, fireEvent, render, screen } from 
"@testing-library/react";
+import type { Window as HappyDOMWindow } from "happy-dom";
+import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 
"vitest";
+
+import { Wrapper } from "src/utils/Wrapper";
+
+import { SmoothOperatorButton } from "./SmoothOperator";
+import { COPY, PHASE_MS } from "./stage";
+import { PRIVACY_URL, TERMS_URL } from "./youtube";
+
+const IFRAME_TITLE = "Sade – Smooth Operator (official music video)";
+
+// Lets a test decide how much of the player box is on screen.
+let reportVisible: ((ratio: number) => void) | undefined;
+let ratioOnObserve = 1;
+
+class FakeIntersectionObserver {
+  private readonly callback: IntersectionObserverCallback;
+
+  private isObserving = false;
+
+  public constructor(callback: IntersectionObserverCallback) {
+    this.callback = callback;
+  }
+
+  public disconnect() {
+    this.isObserving = false;
+  }
+
+  public observe() {
+    this.isObserving = true;
+    reportVisible = (ratio) =>
+      this.isObserving &&
+      this.callback(
+        [{ intersectionRatio: ratio, isIntersecting: ratio > 0 } as 
IntersectionObserverEntry],
+        this as unknown as IntersectionObserver,
+      );
+    reportVisible(ratioOnObserve);
+  }
+}
+
+const flush = async (ms = 0) => {
+  await act(async () => {
+    await vi.advanceTimersByTimeAsync(ms);
+  });
+};
+const askToOpen = async () => {
+  render(<SmoothOperatorButton operatorName="SmoothOperator" taskId="smooth" 
/>, { wrapper: Wrapper });
+  fireEvent.click(screen.getByRole("button", { name: COPY.open }));
+  await flush();
+};
+const openScene = async () => {
+  await askToOpen();
+  fireEvent.click(screen.getByTestId("confirmation-confirm-button"));
+  await flush();
+};
+// The confirmation dialog stays mounted after it closes, so the scene's title 
is not the only
+// level-2 heading on the page; find it by name.
+const SCENE_HEADING = { level: 2, name: COPY.title.join(" ") };
+const sceneHeading = () => screen.getByRole("heading", SCENE_HEADING);
+const querySceneHeading = () => screen.queryByRole("heading", SCENE_HEADING);
+// Each phase's timer is only set once React has committed the previous one, 
so step through them.
+const runShow = async () => {
+  for (const ms of [PHASE_MS.queued, PHASE_MS.dim, PHASE_MS.needle, 
PHASE_MS.show]) {
+    // eslint-disable-next-line no-await-in-loop
+    await flush(ms);
+  }
+};
+// Chakra toggles on the hidden input's change event, so click that rather 
than the switch root,
+// then let React commit the new state before the clock moves on.
+const togglePause = async () => {
+  fireEvent.click(screen.getByTestId("smooth-pause").querySelector("input") as 
HTMLInputElement);
+  await flush();
+};
+const getTaskState = (taskId: string) =>
+  screen
+    .getByTitle(new RegExp(`^${taskId}: `, "u"))
+    .getAttribute("title")
+    ?.split(": ")[1];
+
+describe("SmoothOperatorButton", () => {
+  // Keep happy-dom from fetching the embed, or the YouTube page behind the 
Watch link (the shared
+  // MSW server rejects it); the tests only inspect what the page asks for.
+  beforeAll(() => {
+    const { navigation } = (globalThis as unknown as 
HappyDOMWindow).happyDOM.settings;
+
+    navigation.disableChildFrameNavigation = true;
+    navigation.disableChildPageNavigation = true;
+  });
+
+  beforeEach(() => {
+    vi.useFakeTimers();
+    vi.stubGlobal("IntersectionObserver", FakeIntersectionObserver);
+    ratioOnObserve = 1;
+  });
+
+  afterEach(() => {
+    vi.useRealTimers();
+    vi.unstubAllGlobals();
+    // A remembered consent lives in localStorage, which outlives a single 
test.
+    localStorage.removeItem("smooth-operator-consent");
+  });
+
+  it.each(["BashOperator", null])("renders nothing for %s", (operatorName) => {
+    render(<SmoothOperatorButton operatorName={operatorName} taskId="smooth" 
/>, { wrapper: Wrapper });
+
+    expect(screen.queryByRole("button")).not.toBeInTheDocument();
+  });
+
+  it("runs the scene as a Dag and only loads the video once the needle is 
down", async () => {
+    await openScene();
+
+    expect(getTaskState("dim_the_lights")).toMatch(/Queued/u);
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+
+    await flush(PHASE_MS.queued);
+    expect(getTaskState("dim_the_lights")).toMatch(/Running/u);
+
+    await flush(PHASE_MS.dim);
+    expect(getTaskState("dim_the_lights")).toMatch(/Success/u);
+    expect(getTaskState("drop_the_needle")).toMatch(/Running/u);
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+
+    await flush(PHASE_MS.needle);
+    expect(getTaskState("drop_the_needle")).toMatch(/Success/u);
+    expect(getTaskState("smooth")).toMatch(/Running/u);
+
+    await flush(PHASE_MS.show);
+    expect(getTaskState("smooth")).toMatch(/Success/u);
+  });
+
+  it("embeds a sandboxed player and never loads YouTube's API into the page", 
async () => {
+    await openScene();
+    await runShow();
+
+    const iframe = screen.getByTitle(IFRAME_TITLE);
+    const src = new URL(iframe.getAttribute("src") ?? "");
+
+    expect(src.origin).toBe("https://www.youtube-nocookie.com";);
+    expect(src.searchParams.get("autoplay")).toBe("1");
+    expect(src.searchParams.has("enablejsapi")).toBe(false);
+    expect(iframe.getAttribute("sandbox")).toBe(
+      "allow-scripts allow-same-origin allow-presentation allow-popups 
allow-popups-to-escape-sandbox",
+    );
+    
expect(iframe.getAttribute("referrerpolicy")).toBe("strict-origin-when-cross-origin");
+    expect(iframe.getAttribute("allow")).toContain("autoplay");
+    expect(document.querySelector('script[src*="youtube"]')).toBeNull();
+    expect("YT" in globalThis).toBe(false);
+  });
+
+  it("does not autoplay the video until more than half of the player is 
visible", async () => {
+    ratioOnObserve = 0;
+    await openScene();
+    await runShow();
+
+    expect(getTaskState("smooth")).toMatch(/Success/u);
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+
+    act(() => reportVisible?.(0.3));
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+
+    act(() => reportVisible?.(0.6));
+    expect(screen.getByTitle(IFRAME_TITLE)).toBeInTheDocument();
+  });
+
+  it.each([
+    { init: { key: "Enter" }, skips: true },
+    { init: { key: "x" }, skips: true },
+    { init: { key: "Tab" }, skips: false },
+    { init: { ctrlKey: true, key: "f" }, skips: false },
+  ])("routes $init.key during the opening (skips: $skips)", async ({ init, 
skips }) => {
+    const pageShortcut = vi.fn();
+
+    document.addEventListener("keydown", pageShortcut);
+    await openScene();
+    const event = new KeyboardEvent("keydown", { bubbles: true, cancelable: 
true, ...init });
+
+    act(() => {
+      sceneHeading().dispatchEvent(event);
+    });
+    document.removeEventListener("keydown", pageShortcut);
+
+    expect(getTaskState("smooth")).toMatch(skips ? /Success/u : /Queued/u);
+    // Enter must not also press whatever has focus.
+    expect(event.defaultPrevented).toBe(init.key === "Enter");
+    // Keys that belong to the scene never reach the task page's shortcuts.
+    expect(pageShortcut).toHaveBeenCalledTimes(init.key === "Tab" ? 1 : 0);
+  });
+
+  it("asks before opening, and requests nothing from YouTube until confirmed", 
async () => {
+    await askToOpen();
+
+    // Modal spreads its props onto the headless Dialog.Root, so a test id 
never reaches the DOM;
+    // the dialog role is the stable handle, and the scene's own dialog is not 
mounted yet.
+    const dialog = screen.getByRole("dialog");
+
+    expect(dialog).toHaveTextContent(COPY.confirmTitle);
+    expect(dialog).toHaveTextContent(COPY.confirmBody);
+    for (const [name, href] of [
+      [COPY.privacy, PRIVACY_URL],
+      [COPY.terms, TERMS_URL],
+    ] as const) {
+      const link = screen.getByRole("link", { name });
+
+      expect(link).toHaveAttribute("href", href);
+      expect(link).toHaveAttribute("target", "_blank");
+      expect(link).toHaveAttribute("rel", "noopener noreferrer");
+    }
+    // The scene, and with it the player, has not been mounted (the dialog's 
own title is also an h2).
+    expect(querySceneHeading()).not.toBeInTheDocument();
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+    expect(document.querySelector('link[rel="preconnect"], 
link[rel="dns-prefetch"]')).toBeNull();
+  });
+
+  it("opens nothing when the viewer cancels", async () => {
+    await askToOpen();
+
+    fireEvent.click(screen.getByTestId("confirmation-cancel-button"));
+    await flush();
+    await runShow();
+
+    expect(querySceneHeading()).not.toBeInTheDocument();
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+  });
+
+  it("asks again next time unless the viewer chose to be remembered", async () 
=> {
+    await openScene();
+    expect(localStorage.getItem("smooth-operator-consent")).toBeNull();
+    cleanup();
+
+    // Same browser, next visit: the dialog is back because the box was not 
ticked.
+    await askToOpen();
+    expect(screen.getByRole("dialog")).toHaveTextContent(COPY.confirmTitle);
+    expect(querySceneHeading()).not.toBeInTheDocument();
+  });
+
+  it("skips the dialog next time when the viewer chose to be remembered, and 
can undo it", async () => {
+    await askToOpen();
+    fireEvent.click(screen.getByRole("checkbox", { name: COPY.remember }));
+    await flush();
+    fireEvent.click(screen.getByTestId("confirmation-confirm-button"));
+    await flush();
+    expect(localStorage.getItem("smooth-operator-consent")).toBe("true");
+    cleanup();
+
+    // Next visit: straight to the scene, no dialog.
+    await askToOpen();
+    
expect(screen.queryByTestId("confirmation-confirm-button")).not.toBeInTheDocument();
+    expect(sceneHeading()).toBeInTheDocument();
+
+    // The scene offers a way back. Taking it must not count as a 
click-to-skip (which would load
+    // the video), and it closes the scene so nothing more is requested; the 
dialog returns next time.
+    fireEvent.click(screen.getByRole("button", { name: COPY.forget }));
+    await flush();
+    expect(localStorage.getItem("smooth-operator-consent")).toBeNull();
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+    await vi.waitFor(() => 
expect(querySceneHeading()).not.toBeInTheDocument());
+  });
+
+  it("activates a button on Enter instead of skipping the opening", async () 
=> {
+    await askToOpen();
+    fireEvent.click(screen.getByRole("checkbox", { name: COPY.remember }));
+    await flush();
+    fireEvent.click(screen.getByTestId("confirmation-confirm-button"));
+    await flush();
+
+    const forget = screen.getByRole("button", { name: COPY.forget });
+    const event = new KeyboardEvent("keydown", { bubbles: true, cancelable: 
true, key: "Enter" });
+
+    act(() => {
+      forget.dispatchEvent(event);
+    });
+
+    // Not swallowed by the stage's skip handler: the button keeps its native 
Enter activation.
+    expect(event.defaultPrevented).toBe(false);
+    expect(getTaskState("smooth")).toMatch(/Queued/u);
+  });
+
+  it("never remembers a cancel, even with the box ticked", async () => {
+    await askToOpen();
+    fireEvent.click(screen.getByRole("checkbox", { name: COPY.remember }));
+    await flush();
+    fireEvent.click(screen.getByTestId("confirmation-cancel-button"));
+    await flush();
+
+    expect(localStorage.getItem("smooth-operator-consent")).toBeNull();
+    expect(querySceneHeading()).not.toBeInTheDocument();
+  });
+
+  it("follows a footer link during the opening without skipping or loading the 
video", async () => {
+    await openScene();
+
+    fireEvent.click(screen.getByRole("link", { name: COPY.watch }));
+    await flush();
+
+    expect(getTaskState("smooth")).toMatch(/Queued/u);
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+  });
+
+  it("does not treat a foreign value in storage as consent", async () => {
+    // A stored 1 is truthy but is not the true this scene writes.
+    localStorage.setItem("smooth-operator-consent", "1");
+    await askToOpen();
+
+    
expect(screen.getByTestId("confirmation-confirm-button")).toBeInTheDocument();
+    expect(querySceneHeading()).not.toBeInTheDocument();
+  });
+
+  it("skips to the finished run on a click", async () => {
+    await openScene();
+
+    fireEvent.click(sceneHeading());
+
+    expect(getTaskState("smooth")).toMatch(/Success/u);
+  });
+
+  it("keeps the player unloaded while its box is still fading in", async () => 
{
+    const realGetComputedStyle = globalThis.getComputedStyle.bind(globalThis);
+    let isFading = true;
+
+    vi.spyOn(globalThis, "getComputedStyle").mockImplementation((element, 
pseudo) => {
+      const style = realGetComputedStyle(element, pseudo);
+
+      return isFading
+        ? new Proxy(style, {
+            get: (target, property) =>
+              property === "opacity" ? "0.4" : (Reflect.get(target, property) 
as unknown),
+          })
+        : style;
+    });
+    await openScene();
+    await runShow();
+
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+
+    isFading = false;
+    act(() => {
+      screen
+        .getByTestId("smooth-player")
+        .dispatchEvent(Object.assign(new Event("transitionend"), { 
propertyName: "opacity" }));
+    });
+
+    expect(screen.getByTitle(IFRAME_TITLE)).toBeInTheDocument();
+  });
+
+  it("closes on Escape, removing the video", async () => {
+    await openScene();
+    await runShow();
+
+    // The dialog's exit runs on real timers.
+    vi.useRealTimers();
+    fireEvent.keyDown(sceneHeading(), { key: "Escape" });
+
+    await vi.waitFor(() => 
expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument());
+  });
+
+  it("pauses the Dag where it is and resumes from there", async () => {
+    await openScene();
+    await flush(PHASE_MS.queued);
+    await flush(PHASE_MS.dim / 2);
+    expect(getTaskState("dim_the_lights")).toMatch(/Running/u);
+
+    // Pause: the clock stops, however long we wait.
+    await togglePause();
+    await flush(PHASE_MS.dim * 2);
+    expect(getTaskState("dim_the_lights")).toMatch(/Running/u);
+    expect(screen.getByLabelText("Unpause Dag")).toBeInTheDocument();
+
+    // Unpause: the phase picks up where it left off and runs only the half it 
had left.
+    await togglePause();
+    await flush(PHASE_MS.dim / 2 + 10);
+    expect(getTaskState("dim_the_lights")).toMatch(/Success/u);
+    expect(getTaskState("drop_the_needle")).toMatch(/Running/u);
+  });
+
+  it("still runs the Dag when the viewer prefers reduced motion", async () => {
+    vi.stubGlobal("matchMedia", (query: string) => ({ matches: 
query.includes("reduce") }));
+    await openScene();
+
+    expect(getTaskState("dim_the_lights")).toMatch(/Queued/u);
+    expect(screen.queryByTitle(IFRAME_TITLE)).not.toBeInTheDocument();
+
+    await runShow();
+
+    expect(getTaskState("smooth")).toMatch(/Success/u);
+    expect(screen.getByTitle(IFRAME_TITLE)).toBeInTheDocument();
+  });
+});
diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/SmoothOperator.tsx 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/SmoothOperator.tsx
new file mode 100644
index 00000000000..0b3eb213f98
--- /dev/null
+++ 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/SmoothOperator.tsx
@@ -0,0 +1,474 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { type RefObject, useEffect, useRef, useState } from "react";
+
+import { Box, Flex, Grid, Heading, Link, Text, VStack } from 
"@chakra-ui/react";
+import { FiArrowUpRight } from "react-icons/fi";
+import { LuDiscAlbum } from "react-icons/lu";
+import { useLocalStorage } from "usehooks-ts";
+
+import { Checkbox, Dialog, IconButton, Switch, Tooltip } from 
"src/system-components";
+
+import { ConfirmationModal } from "src/components/ConfirmationModal";
+
+import { Atmosphere } from "./Atmosphere";
+import { MiniDag } from "./MiniDag";
+import { Player } from "./Player";
+import { Record } from "./Record";
+import {
+  COLORS,
+  COPY,
+  DISPLAY_FONT,
+  fadeIn,
+  fadeOut,
+  isPast,
+  type Phase,
+  PHASE_MS,
+  PHASES,
+  TABLET_PORTRAIT,
+} from "./stage";
+import { PRIVACY_URL, TERMS_URL, WATCH_URL } from "./youtube";
+
+const BAR_HEIGHT = { base: "56px", md: "11vh" };
+
+type Props = {
+  readonly operatorName?: string | null;
+  readonly taskId: string;
+};
+
+// Steps through the scene's phases on timers. The run itself is the story, so 
it plays for
+// everyone; reduced motion only tames the movement inside each phase. Pausing 
the Dag, as on a
+// real one, stops the clock where it is and resumes from there.
+const useShow = () => {
+  const [phase, setPhase] = useState<Phase>("queued");
+  const [isPaused, setIsPaused] = useState(false);
+  // How much of the current phase had already played before a pause.
+  const elapsedRef = useRef(0);
+
+  useEffect(() => {
+    if (phase === "done" || isPaused) {
+      return undefined;
+    }
+    const startedAt = performance.now();
+    let fired = false;
+    const timer = setTimeout(
+      () => {
+        fired = true;
+        elapsedRef.current = 0;
+        setPhase((current) => PHASES[PHASES.indexOf(current) + 1] ?? "done");
+      },
+      Math.max(0, PHASE_MS[phase] - elapsedRef.current),
+    );
+
+    return () => {
+      clearTimeout(timer);
+      // Only a pause (or skip) interrupts a phase; a phase that ran to its 
end carries nothing over.
+      if (!fired) {
+        elapsedRef.current += performance.now() - startedAt;
+      }
+    };
+  }, [isPaused, phase]);
+
+  return {
+    isPaused,
+    phase,
+    skip: () => setPhase("done"),
+    togglePause: () => setIsPaused((paused) => !paused),
+  };
+};
+
+const PolicyLinks = () => (
+  <>
+    {[
+      { href: PRIVACY_URL, label: COPY.privacy },
+      { href: TERMS_URL, label: COPY.terms },
+    ].map(({ href, label }) => (
+      <Link color={COLORS.muted} href={href} key={href} rel="noopener 
noreferrer" target="_blank">
+        {label}
+      </Link>
+    ))}
+  </>
+);
+
+const Stage = ({
+  onForget,
+  rootRef,
+  taskId,
+}: {
+  // Set when the viewer chose to skip the confirmation next time; lets the 
scene undo that.
+  readonly onForget?: () => void;
+  readonly rootRef: RefObject<HTMLDivElement | null>;
+  readonly taskId: string;
+}) => {
+  const { isPaused, phase, skip, togglePause } = useShow();
+  const isDark = phase === "queued" || phase === "dim";
+
+  return (
+    <Box
+      backdropFilter="blur(16px) sepia(1) saturate(2.2) hue-rotate(-35deg) 
brightness(0.32)"
+      bg="rgba(42, 10, 14, 0.5)"
+      color={COLORS.cream}
+      css={{
+        "& ::selection": { background: COLORS.tungsten, color: COLORS.ink },
+        // A paused Dag runs nothing: every animation on stage holds its frame.
+        "&[data-paused] *": { animationPlayState: "paused !important" },
+        // Reduced motion keeps the fades (they carry the Dag's story) and 
stops the ambient movement
+        // in the backdrop: the drifting lights and the sweep.
+        "@media (prefers-reduced-motion: reduce)": {
+          "& [data-motion]": { animation: "none !important", transition: "none 
!important" },
+        },
+      }}
+      data-paused={isPaused ? "" : undefined}
+      display="flex"
+      flexDirection="column"
+      height="100dvh"
+      // Any click during the opening skips to the finished run, unless it is 
on a link: following
+      // "Watch on YouTube" or the policy links must not also mount the video.
+      onClick={
+        phase === "done"
+          ? undefined
+          : (event) => {
+              if (event.target instanceof Element && event.target.closest("a") 
!== null) {
+                return;
+              }
+              skip();
+            }
+      }
+      onKeyDown={(event) => {
+        // Escape closes the dialog and Tab stays in its focus trap; other 
keys belong to the scene,
+        // not to the task page's shortcuts underneath.
+        if (event.key === "Escape" || event.key === "Tab") {
+          return;
+        }
+        event.stopPropagation();
+        // Enter or Space on a link or button activates it instead of skipping 
the opening.
+        if (
+          (event.key === "Enter" || event.key === " ") &&
+          event.target instanceof Element &&
+          event.target.closest("a, button") !== null
+        ) {
+          return;
+        }
+        if (phase === "done" || event.altKey || event.ctrlKey || 
event.metaKey) {
+          return;
+        }
+        skip();
+        // Skipping the opening must not also press whatever has focus.
+        if (event.key === "Enter" || event.key === " ") {
+          event.preventDefault();
+        }
+      }}
+      // The dialog's first focus lands here rather than on the record under 
the curtain.
+      outline="none"
+      overflow="hidden"
+      position="relative"
+      ref={rootRef}
+      tabIndex={-1}
+      width="100vw"
+    >
+      <Atmosphere phase={phase} />
+      <Flex
+        alignItems="center"
+        bg="#000"
+        flexShrink={0}
+        height={BAR_HEIGHT}
+        // Centred like a marquee: the Dag is the plot.
+        justifyContent="center"
+        paddingX={{ base: 12, md: 20 }}
+        position="relative"
+        // Above the curtain, so the Dag is seen queued in the dark and 
dim_the_lights running.
+        zIndex={2}
+      >
+        <MiniDag phase={phase} taskId={taskId} />
+        {/* Airflow's own pause switch, doing to the show what it does to a 
Dag. The stage is always
+            dark, so its colours are the dark-mode ones whatever theme the 
rest of the app is using:
+            the theme resolves them at :root, so they are set here rather than 
inherited. */}
+        <Tooltip content={isPaused ? COPY.unpause : COPY.pause}>
+          <Switch
+            checked={!isPaused}
+            css={{
+              // Airflow's dark-mode switch, measured: a white track when on, 
a slate one when off, a
+              // grey ring on both, and a drop shadow that keeps the white 
thumb visible on white.
+              "& [data-part=control]": {
+                background: "oklch(0.28 0.035 251)",
+                boxShadow: "inset 0 0 0 1px oklch(0.63 0.042 252)",
+              },
+              "& [data-part=control][data-state=checked]": { background: 
"white" },
+              "& [data-part=thumb]": {
+                background: "white",
+                boxShadow: "0 2px 4px rgba(0, 0, 0, 0.64), inset 0 0 1px 
rgba(199, 207, 216, 0.3)",
+              },
+            }}
+            data-testid="smooth-pause"
+            inputProps={{ "aria-label": isPaused ? COPY.unpause : COPY.pause }}
+            onCheckedChange={togglePause}
+            onClick={(event) => event.stopPropagation()}
+            position="absolute"
+            right={{ base: 12, md: 16 }}
+          />
+        </Tooltip>
+      </Flex>
+      <Grid
+        alignItems="center"
+        columnGap={{ base: 6, xl: 16 }}
+        // Two columns leave a portrait tablet with a postage-stamp video; 
stack there instead.
+        css={{ [TABLET_PORTRAIT]: { gridTemplateColumns: "minmax(0, 1fr) 
!important" } }}
+        flex={1}
+        minHeight={0}
+        // The desktop layout is sized to fit between the bars; only the 
stacked phone layout scrolls.
+        overflowY={{ base: "auto", md: "hidden" }}
+        paddingX={{ base: 4, md: "6vw" }}
+        paddingY={{ base: 6, md: 4 }}
+        position="relative"
+        rowGap={8}
+        templateColumns={{ base: "minmax(0, 1fr)", md: "minmax(0, 5fr) 
minmax(0, 7fr)" }}
+      >
+        <VStack
+          alignItems="flex-start"
+          css={{ [TABLET_PORTRAIT]: { alignItems: "center", flexDirection: 
"row" } }}
+          gap={{ base: 6, md: 10 }}
+          minWidth={0}
+        >
+          <Dialog.Title asChild>
+            <Heading
+              as="h2"
+              fontFamily={DISPLAY_FONT}
+              fontSize={{ base: "5xl", lg: "7xl", md: "6xl", xl: "8xl" }}
+              fontWeight="normal"
+              letterSpacing="-0.02em"
+              lineHeight={0.92}
+              textShadow="0 0 48px rgba(214, 38, 48, 0.45)"
+            >
+              {COPY.title[0]}{" "}
+              <Box as="em" display="block" paddingLeft="0.6em">
+                {COPY.title[1]}
+              </Box>
+            </Heading>
+          </Dialog.Title>
+          <Box
+            css={{
+              "@media (max-height: 500px)": { display: "none" },
+              // Beside the title on a portrait tablet: room for the tonearm's 
base under the bar.
+              [TABLET_PORTRAIT]: { paddingTop: "1.5rem" },
+            }}
+            // 0.6 × the heading's font size (5xl/6xl/7xl/8xl), so the record 
hangs under "Operator".
+            paddingLeft={{ base: "1.8rem", lg: "2.7rem", md: "2.25rem", xl: 
"3.6rem" }}
+          >
+            <Record
+              // The platter turns before the arm comes down, as on a real 
turntable.
+              isPaused={isPaused}
+              isSpinning={isPast(phase, "dim")}
+              needle={phase === "needle" ? "cueing" : isPast(phase, "needle") 
? "down" : "rest"}
+            />
+          </Box>
+        </VStack>
+        <Flex
+          css={{ [TABLET_PORTRAIT]: { justifyContent: "center !important" } }}
+          justifyContent={{ md: "flex-end" }}
+          minWidth={0}
+          width="100%"
+        >
+          {/* The video loads once the needle is down and autoplays where the 
browser allows it;
+              otherwise YouTube shows its own play button. */}
+          <Player isShowtime={isPast(phase, "needle")} />
+        </Flex>
+      </Grid>
+      <Flex
+        alignItems="center"
+        bg="#000"
+        columnGap={6}
+        flexShrink={0}
+        flexWrap="wrap"
+        fontSize="sm"
+        justifyContent={{ base: "center", md: "space-between" }}
+        minHeight={BAR_HEIGHT}
+        paddingX={{ base: 4, md: 8 }}
+        paddingY={2}
+        position="relative"
+        rowGap={1}
+        // Chrome, like the top bar: above the title card, so its links work 
from the first frame and
+        // a click on them never lands on the curtain and skips the opening 
instead.
+        zIndex={2}
+      >
+        <Text color={COLORS.muted} fontFamily={DISPLAY_FONT} 
fontStyle="italic">
+          {COPY.credit}
+        </Text>
+        <Flex columnGap={5} flexWrap="wrap">
+          <Link color={COLORS.tungsten} href={WATCH_URL} rel="noopener 
noreferrer" target="_blank">
+            {COPY.watch}
+            <FiArrowUpRight />
+          </Link>
+          <PolicyLinks />
+          {onForget === undefined ? undefined : (
+            <Link
+              as="button"
+              color={COLORS.muted}
+              // Withdrawing consent must not also count as a click-to-skip, 
or it would load the video.
+              onClick={(event) => {
+                event.stopPropagation();
+                onForget();
+              }}
+              type="button"
+            >
+              {COPY.forget}
+            </Link>
+          )}
+        </Flex>
+      </Flex>
+      {/* Stays mounted so a skip can fade it rather than cut to the lit room. 
*/}
+      <Flex
+        alignItems="center"
+        animation={phase === "dim" ? `${fadeOut} ${PHASE_MS.dim}ms ease-in-out 
both` : undefined}
+        aria-hidden={!isDark}
+        bg="#000"
+        cursor={isDark ? "pointer" : undefined}
+        direction="column"
+        gap={3}
+        inset={0}
+        justifyContent="center"
+        opacity={isDark ? 1 : 0}
+        pointerEvents={isDark ? undefined : "none"}
+        position="absolute"
+        transition="opacity 0.4s ease"
+        zIndex={1}
+      >
+        <Text
+          // The card leaves as soon as the lights start coming up.
+          animation={phase === "queued" ? `${fadeIn} 0.6s ease-out both` : 
`${fadeOut} 0.5s ease-in both`}
+          color={COLORS.cream}
+          fontFamily={DISPLAY_FONT}
+          fontSize={{ base: "lg", md: "2xl" }}
+          fontStyle="italic"
+          letterSpacing="0.04em"
+        >
+          {COPY.presents}
+        </Text>
+        {/* Fades out with the card instead of vanishing the moment the lights 
start. */}
+        <Text
+          animation={
+            phase === "queued" ? `${fadeIn} 0.6s ease-out 0.8s both` : 
`${fadeOut} 0.5s ease-in both`
+          }
+          color={COLORS.muted}
+          fontSize="xs"
+        >
+          {COPY.skip}
+        </Text>
+      </Flex>
+    </Box>
+  );
+};
+
+// Stays in this browser only; nothing about the choice leaves it.
+const CONSENT_KEY = "smooth-operator-consent";
+
+const SmoothOperatorScene = ({ taskId }: Pick<Props, "taskId">) => {
+  const [isConfirming, setIsConfirming] = useState(false);
+  const [isOpen, setIsOpen] = useState(false);
+  // Only a Confirm is ever remembered: remembering a Cancel would lock the 
scene away with no way back.
+  // Forgetting removes the key outright, so nothing about the choice is left 
in storage.
+  const [hasConsented, setHasConsented, forgetConsent] = 
useLocalStorage(CONSENT_KEY, false, {
+    // The hook JSON-parses whatever is stored, so a foreign or tampered value 
such as 1 or "yes"
+    // would otherwise arrive as a truthy non-boolean; only the exact true 
this scene writes counts.
+    deserializer: (raw) => raw === "true",
+  });
+  const [shouldRemember, setShouldRemember] = useState(false);
+  const rootRef = useRef<HTMLDivElement>(null);
+
+  const ask = () => {
+    if (hasConsented) {
+      setIsOpen(true);
+    } else {
+      setShouldRemember(false);
+      setIsConfirming(true);
+    }
+  };
+  const confirm = () => {
+    if (shouldRemember) {
+      setHasConsented(true);
+    }
+    setIsOpen(true);
+  };
+
+  return (
+    <>
+      <IconButton bg="bg" label={COPY.open} onClick={ask} size="sm" 
variant="outline">
+        <LuDiscAlbum />
+      </IconButton>
+      {/* The scene loads a YouTube video, so it asks first, the way Airflow 
asks before pausing a Dag.
+          Nothing is requested from Google until this is confirmed. */}
+      <ConfirmationModal
+        header={COPY.confirmTitle}
+        onConfirm={confirm}
+        onOpenChange={() => setIsConfirming(false)}
+        open={isConfirming}
+      >
+        <Text>{COPY.confirmBody}</Text>
+        <Flex columnGap={4} fontSize="sm" marginTop={3}>
+          <PolicyLinks />
+        </Flex>
+        <Checkbox
+          checked={shouldRemember}
+          marginTop={4}
+          onCheckedChange={(event) => 
setShouldRemember(Boolean(event.checked))}
+        >
+          {COPY.remember}
+        </Checkbox>
+        <Text color="fg.muted" fontSize="xs" marginTop={1}>
+          {COPY.rememberNote}
+        </Text>
+      </ConfirmationModal>
+      <Dialog.Root
+        initialFocusEl={() => rootRef.current}
+        lazyMount
+        onOpenChange={() => setIsOpen(false)}
+        open={isOpen}
+        size="full"
+        unmountOnExit
+      >
+        <Dialog.Content backdrop={false} bg="transparent" boxShadow="none" 
overflow="hidden">
+          <Stage
+            // Forgetting also closes the scene, so withdrawing before the 
needle drops sends nothing.
+            onForget={
+              hasConsented
+                ? () => {
+                    forgetConsent();
+                    setIsOpen(false);
+                  }
+                : undefined
+            }
+            rootRef={rootRef}
+            taskId={taskId}
+          />
+          <Dialog.CloseTrigger
+            closeButtonProps={{ color: COLORS.cream, size: "md" }}
+            position="absolute"
+            right={{ base: 2, md: 6 }}
+            top={{ base: "8px", md: "calc(5.5vh - 18px)" }}
+            zIndex={3}
+          />
+        </Dialog.Content>
+      </Dialog.Root>
+    </>
+  );
+};
+
+// Returns early with no hooks of its own, so only a SmoothOperator's header 
reads localStorage or
+// registers the storage listeners; every other task's header renders nothing 
here.
+export const SmoothOperatorButton = ({ operatorName, taskId }: Props) =>
+  operatorName === "SmoothOperator" ? <SmoothOperatorScene taskId={taskId} /> 
: undefined;
diff --git a/airflow-core/src/airflow/ui/src/components/SmoothOperator/stage.ts 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/stage.ts
new file mode 100644
index 00000000000..8f2d144cea8
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/components/SmoothOperator/stage.ts
@@ -0,0 +1,135 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { keyframes } from "@emotion/react";
+
+// A late-set supper club: red tungsten light on oxblood, cream type, no other 
colour.
+// Fixed rather than theme tokens because the stage looks the same in light 
and dark mode.
+export const COLORS = {
+  cream: "#f1e4d0",
+  ink: "#0b0607",
+  key: "rgba(214, 38, 48, 0.55)",
+  muted: "#a8927e",
+  oxblood: "#2a0a0e",
+  pool: "rgba(255, 170, 92, 0.32)",
+  rose: "rgba(240, 96, 120, 0.3)",
+  tungsten: "#ffb877",
+};
+// The scene's own words. Plain English on purpose: this is an Easter egg, not 
a product surface,
+// and the film-credit voice does not translate.
+export const COPY = {
+  confirmBody:
+    "Playing loads an embedded YouTube player that autoplays the video. 
YouTube may receive your IP address, browser or device information, and this 
page's address or referrer, including its host name. It may also store data on 
your device, such as cookies or local storage. YouTube's terms and privacy 
policy apply.",
+  confirmTitle: "Play it smooth?",
+  credit: "Sade, Smooth Operator (1984)",
+  dag: "The Smooth Operator Dag",
+  forget: "Close and ask before playing next time",
+  label: "SMOOTH OPERATOR · SIDE A · 33⅓ RPM · ",
+  open: "Play it smooth",
+  pause: "Pause Dag",
+  presents: "Apache Airflow presents",
+  privacy: "Privacy",
+  remember: "Remember this for next time",
+  rememberNote:
+    "Remembering keeps a single flag in this browser's local storage; Airflow 
sends nothing anywhere and you can clear it from the scene.",
+  scratch: "Scratch the record",
+  skip: "Tap or press any key to skip",
+  states: { queued: "Queued", running: "Running", success: "Success" },
+  terms: "YouTube Terms",
+  title: ["Smooth", "Operator"],
+  unpause: "Unpause Dag",
+  video: "Sade – Smooth Operator (official music video)",
+  watch: "Watch on YouTube",
+};
+export const prefersReducedMotion = () => 
globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches;
+export const DISPLAY_FONT = `"Iowan Old Style", "Palatino Linotype", Palatino, 
"Book Antiqua", Georgia, serif`;
+// The song sits near 118 BPM, so four bars last about 8 s. The light breathes 
at that length; it is
+// not synchronised to the audio, so it stays slow and shallow enough never to 
read as a missed beat.
+export const BREATH = "8.12s";
+
+// Also the lights coming up from black, and (as fadeOut) the curtain lifting.
+export const fadeIn = keyframes`from { opacity: 0; } to { opacity: 1; }`;
+export const fadeOut = keyframes`from { opacity: 1; } to { opacity: 0; }`;
+export const TABLET_PORTRAIT = "@media (min-width: 48rem) and (orientation: 
portrait)";
+
+/**
+ * The scene runs as a tiny Dag. Each phase is one task running; "done" is a 
finished run.
+ * - queued: black house, title card.
+ * - dim: the red lights come up (dim_the_lights).
+ * - needle: the platter spins up and the tonearm cues onto the record 
(drop_the_needle).
+ * - show: the video is loaded with autoplay (the SmoothOperator task itself).
+ */
+export type Phase = "dim" | "done" | "needle" | "queued" | "show";
+export const PHASES: Array<Phase> = ["queued", "dim", "needle", "show", 
"done"];
+export const PHASE_MS: Record<Exclude<Phase, "done">, number> = {
+  dim: 2400,
+  needle: 2600,
+  queued: 2200,
+  show: 1200,
+};
+// The tonearm's cue has to finish inside drop_the_needle's phase.
+export const CUE_MS = 2400;
+export const isPast = (phase: Phase, other: Phase) => PHASES.indexOf(phase) > 
PHASES.indexOf(other);
+
+// A running task's chip sends out a soft ring, so the eye finds the task that 
is working.
+export const ring = keyframes`0% { box-shadow: 0 0 0 0 rgba(0, 199, 212, 
0.55); } 100% { box-shadow: 0 0 0 10px rgba(0, 199, 212, 0); }`;
+// Tonearm angles: resting off the record, over the lead-in groove, and near 
the label at the end
+// of the side.
+export const ARM_REST = -9;
+export const ARM_LEAD_IN = 3;
+const ARM_RUN_OUT = 20;
+
+// The video's length, so the arm reaches the run-out about when the song 
ends. Ambient only: the page
+// does not know the player's position.
+export const SIDE_MS = 258_000;
+// A cueing lever: lift, swing over the lead-in groove, lower. The shadow 
grows while the arm is up.
+export const cue = keyframes`
+  0% { transform: rotate(${ARM_REST}deg) scale(1); filter: drop-shadow(0 8px 
10px rgba(0, 0, 0, 0.55)); }
+  18% { transform: rotate(${ARM_REST}deg) scale(1.05); filter: drop-shadow(0 
20px 18px rgba(0, 0, 0, 0.4)); }
+  78% { transform: rotate(${ARM_LEAD_IN}deg) scale(1.05); filter: 
drop-shadow(0 20px 18px rgba(0, 0, 0, 0.4)); }
+  100% { transform: rotate(${ARM_LEAD_IN}deg) scale(1); filter: drop-shadow(0 
8px 10px rgba(0, 0, 0, 0.55)); }
+`;
+export const track = keyframes`from { transform: rotate(${ARM_LEAD_IN}deg); } 
to { transform: rotate(${ARM_RUN_OUT}deg); }`;
+
+// The light moves on its own. Cycle lengths are coprime, so the room rarely 
looks the same twice.
+export const driftKey = keyframes`
+  0%, 100% { transform: translate(-6vw, -4vh) scale(1); }
+  23% { transform: translate(7vw, -1vh) scale(1.12); }
+  51% { transform: translate(15vw, 5vh) scale(0.94); }
+  77% { transform: translate(-1vw, 7vh) scale(1.06); }
+`;
+export const driftPool = keyframes`
+  0%, 100% { transform: translate(4vw, 3vh) scale(1.05); }
+  31% { transform: translate(-9vw, -2vh) scale(0.92); }
+  64% { transform: translate(-3vw, -7vh) scale(1.15); }
+`;
+export const sweep = keyframes`
+  0%, 100% { transform: rotate(-10deg); }
+  38% { transform: rotate(6deg); }
+  71% { transform: rotate(-3deg); }
+`;
+export const warm = keyframes`0%, 100% { opacity: 0; } 50% { opacity: 1; }`;
+export const swell = keyframes`0%, 100% { opacity: 1; } 50% { opacity: 0.92; 
}`;
+export const step = keyframes`0%, 100% { transform: translateY(0); } 50% { 
transform: translateY(-1.5%); }`;
+// Someone in a hat walks past the light once per cycle, then the room is 
quiet again.
+export const passBy = keyframes`
+  0%, 74% { opacity: 0; transform: translateX(-30vw); }
+  76% { opacity: 1; }
+  98% { opacity: 1; }
+  100% { opacity: 0; transform: translateX(125vw); }
+`;
diff --git 
a/airflow-core/src/airflow/ui/src/components/SmoothOperator/youtube.ts 
b/airflow-core/src/airflow/ui/src/components/SmoothOperator/youtube.ts
new file mode 100644
index 00000000000..cf6c597c3a8
--- /dev/null
+++ b/airflow-core/src/airflow/ui/src/components/SmoothOperator/youtube.ts
@@ -0,0 +1,33 @@
+/*!
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+// Official upload on the SadeVEVO channel, the same video the SmoothOperator 
task logs.
+const VIDEO_ID = "4TYv2PhG89A";
+
+export const WATCH_URL = `https://www.youtube.com/watch?v=${VIDEO_ID}`;
+// Embedding the player shares the viewer's IP address and the Airflow site's 
address with Google;
+// the scene tells viewers so before it contacts YouTube, and links the policy 
and terms.
+export const PRIVACY_URL = "https://policies.google.com/privacy";;
+export const TERMS_URL = "https://www.youtube.com/t/terms";;
+
+// A plain embed on YouTube's privacy-enhanced host. That host only stops 
views from being used to
+// personalise ads; it still collects data, the frame keeps storage in its own 
origin, and with
+// autoplay that collection starts without the viewer touching the player. No 
IFrame Player API
+// script: it would run Google's code in Airflow's own origin, and the scene 
does not need the
+// player's state. Like any embed, it tells Google the Airflow origin through 
the Referer.
+export const EMBED_URL = 
`https://www.youtube-nocookie.com/embed/${VIDEO_ID}?autoplay=1&playsinline=1&rel=0`;
diff --git a/airflow-core/src/airflow/ui/src/pages/Task/Header.tsx 
b/airflow-core/src/airflow/ui/src/pages/Task/Header.tsx
index 0fb6c8aad40..9840ce3d71a 100644
--- a/airflow-core/src/airflow/ui/src/pages/Task/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/Task/Header.tsx
@@ -23,6 +23,7 @@ import type { TaskResponse } from 
"openapi/requests/types.gen";
 
 import DisplayMarkdownButton from "src/components/DisplayMarkdownButton";
 import { HeaderCard } from "src/components/HeaderCard";
+import { SmoothOperatorButton } from 
"src/components/SmoothOperator/SmoothOperator";
 
 import { TaskIcon } from "src/assets/TaskIcon";
 
@@ -32,16 +33,19 @@ export const Header = ({ task }: { readonly task: 
TaskResponse }) => {
   return (
     <HeaderCard
       actions={
-        task.doc_md === null ? undefined : (
-          <DisplayMarkdownButton
-            bg="bg"
-            header={translate("task.documentation")}
-            icon={<FiBookOpen />}
-            mdContent={task.doc_md}
-            text={translate("docs.documentation")}
-            variant="outline"
-          />
-        )
+        <>
+          {task.doc_md === null ? undefined : (
+            <DisplayMarkdownButton
+              bg="bg"
+              header={translate("task.documentation")}
+              icon={<FiBookOpen />}
+              mdContent={task.doc_md}
+              text={translate("docs.documentation")}
+              variant="outline"
+            />
+          )}
+          <SmoothOperatorButton operatorName={task.operator_name} 
taskId={task.task_id ?? ""} />
+        </>
       }
       icon={<TaskIcon />}
       stats={[
diff --git a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx 
b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
index edf55f64488..282073685e7 100644
--- a/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx
@@ -35,6 +35,7 @@ import { MarkTaskInstanceAsButton } from 
"src/components/MarkAs";
 import { NotePreview } from "src/components/NotePreview";
 import { PluginActions } from "src/components/PluginActions";
 import ReactMarkdown from "src/components/ReactMarkdown";
+import { SmoothOperatorButton } from 
"src/components/SmoothOperator/SmoothOperator";
 import { TeamName } from "src/components/TeamName";
 import Time from "src/components/Time";
 
@@ -191,6 +192,7 @@ export const Header = ({ taskInstance }: { readonly 
taskInstance: TaskInstanceRe
               buttonProps={{ bg: "bg", variant: "outline" }}
               entity={{ destination: "task_instance", taskInstance }}
             />
+            <SmoothOperatorButton operatorName={taskInstance.operator_name} 
taskId={taskInstance.task_id} />
           </>
         }
         icon={<MdOutlineTask />}

Reply via email to