You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "shahar1 (via GitHub)" <gi...@apache.org> on 2026/10/17 12:42:58 UTC
[PR] UI: Enhance Smooth Operator easter egg [airflow]
shahar1 opened a new pull request, #74917:
URL: https://github.com/apache/airflow/pull/74917
I thought it would be nice to put some life into our only easter egg (1 out of 2 if we consider the spinning logo).
To test it out on breeze, change into the PR's branch and add the following Dag:
```python
from __future__ import annotations
import pendulum
from airflow.providers.standard.operators.smooth import SmoothOperator
from airflow.sdk import DAG
with DAG("smooth_operator_demo", schedule=None, start_date=pendulum.datetime(2026, 1, 1)):
SmoothOperator(task_id="smooth")
```
And...try figure out what happens (hint: you'll need to run the task first).
Technical details are in the AI summary - I tried to address potential security and privacy concerns as best as I could.
<details><summary>AI Summary (spoiler alert)</summary>`SmoothOperator` has only ever logged a link to Sade's "Smooth Operator", which nobody sees unless they open the task log. The task and task instance pages for a `SmoothOperator` now offer a record button (Lucide's disc-album icon, ISC like the other Lucide icons in the UI) 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; any key or click skips to the finished run.
**Consent and privacy.** 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). Airflow's own single localStorage flag is described separately. The viewer may ask to be remembered in this browser; the scene offers a footer link to take that back, which removes the stored flag and closes the scene without loading anything. Only a confirm is ever remembered, never a cancel.
**Why no YouTube IFrame Player API.** The video is a plain, sandboxed embed on YouTube's privacy-enhanced host, mounted only once the player is actually visible, 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, where it could make requests as the signed-in user; and driving the player through its undocumented `postMessage` protocol would breach YouTube's developer policies. So the scene is scripted rather than synchronised to playback.
The scene works with no network access (the player slot stays empty and the footer link still works), keeps its fades and the Dag run under `prefers-reduced-motion` while dropping the ambient movement, and leaves the page's own keyboard shortcuts and the player's controls untouched.
Nothing outside `airflow-core/src/airflow/ui/src/components/SmoothOperator/` changes except the two header wirings; the header component returns early for every other operator, so only a SmoothOperator's header touches localStorage. No new dependencies.
**Known limitation.** There is no deployment-manager switch to disable the egg. The embed is only requested after the user clicks Play and confirms; an administrator who wants to block it outright can add a `Content-Security-Policy: frame-src` directive on the API server. No newsfragment is added since this is an Easter egg; happy to add one on request.
**Verification.** 22 vitest tests for the component (each fails without the behaviour it guards); ESLint, `tsc`, the UI build, and prek's pre-commit and manual hooks all pass against `upstream/main`. The full UI suite fails the same set of files locally on pristine `main` as on this branch (local i18n/happy-dom environment), with no file failing on the branch that does not already fail on `main`. Behaviour was also verified in a real browser against a live Airflow with the real YouTube embed: no request to any Google host before the dialog is confirmed, the player mounting only once visible, and the consent-withdrawal path loading nothing. The design and the consent model went through two independent review rounds for code quality and for security and privacy.
</details>
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Claude Opus 5.5)
Generated-by: Claude Code (Claude Opus 5.5) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on PR #74917:
URL: https://github.com/apache/airflow/pull/74917#issuecomment-6277981301
Screenshot?
Also I think this could be a good demo of our new `applies_to` plugin that can show a new plugin tab only for a specific operator
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@airflow.apache.org>.
github-actions[bot] commented on PR #74917:
URL: https://github.com/apache/airflow/pull/74917#issuecomment-6993762120
Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to **[Airflow 3.4.1](https://github.com/apache/airflow/milestone/154)** based on: backport label targeting v3-4-test
If this milestone is not correct, please update it to the appropriate milestone.
> This comment was generated by [Milestone Tag Assistant](https://github.com/apache/airflow/blob/main/.github/workflows/milestone-tag-assistant.yml).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "shahar1 (via GitHub) via commits" <co...@airflow.apache.org>.
shahar1 merged PR #74917:
URL: https://github.com/apache/airflow/pull/74917
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "shahar1 (via GitHub)" <gi...@apache.org>.
shahar1 commented on PR #74917:
URL: https://github.com/apache/airflow/pull/74917#issuecomment-6298567195
> Screenshot?
>
> Also I think this could be a good demo of our new `applies_to` plugin that can show a new plugin tab only for a specific operator
<details><summary>Screenshot (SPOILER ALERT)</summary>
<img width="2557" height="1260" alt="image" src="https://github.com/user-attachments/assets/a7ab55b1-84e2-4a4d-92c4-c2edca182dd4" />
It's a modal opened over Airflow's UI.
</details>
It is possible to implement it with `applies_to`, but there will be some drawbacks:
- `standard` would need its own UI build (package.json, Vite config, etc.)
- The /plugins endpoint requires AccessView.PLUGINS, so users without that permission never see the tab.
- The UX will be different (related to the implementation detail I wrote in the summary above)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "choo121600 (via GitHub) via commits" <co...@airflow.apache.org>.
choo121600 commented on code in PR #74917:
URL: https://github.com/apache/airflow/pull/74917#discussion_r4597024226
##########
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.updatePlaybackRate(1 - (1 - progress) ** 3);
+ if (progress < 1) {
+ frame = requestAnimationFrame(step);
+ }
+ };
+
+ spin.updatePlaybackRate(0);
Review Comment:
**The record intermittently never turns**
The record sometimes does not turn. With the scene open in Chromium, the spin reported `playState: "running"` but `currentTime: -68341` and `transform: none` while the needle was down and the video was playing; the start time had been resolved about a minute into the future.
The order that produces it: the spin is created and `pause()`d (L80); when `isSpinning` turns true, this effect calls `updatePlaybackRate(0)` and the ramp keeps calling `updatePlaybackRate(r)` every frame, while the effect below calls `play()`. `updatePlaybackRate` applies asynchronously, and racing it with the pending `play()` can mis-resolve the start time. Replaying that call order on a standalone element, it failed 3 times in 20 (one stuck run was 402 s behind). Setting `playbackRate` directly, which applies synchronously and keeps the current time, turned 20 times out of 20, including when the Dag was paused before the spin started or mid-ramp. Toggling the scene's pause switch recovers a stuck record, because `pause()` + `play()` resolves the start time again.
happy-dom has no Web Animations implementation, so the vitest suite cannot catch this.
```suggestion
spin.playbackRate = 0;
```
##########
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.updatePlaybackRate(1 - (1 - progress) ** 3);
Review Comment:
**Set the ramp's rate directly too**
Same cause as the comment on L107: the per-frame ramp should set `playbackRate` directly, so each frame's rate applies at once rather than queueing another asynchronous update.
```suggestion
spin.playbackRate = 1 - (1 - progress) ** 3;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "choo121600 (via GitHub) via commits" <co...@airflow.apache.org>.
choo121600 commented on code in PR #74917:
URL: https://github.com/apache/airflow/pull/74917#discussion_r4597024226
##########
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.updatePlaybackRate(1 - (1 - progress) ** 3);
+ if (progress < 1) {
+ frame = requestAnimationFrame(step);
+ }
+ };
+
+ spin.updatePlaybackRate(0);
Review Comment:
The record sometimes never starts spinning: calling `updatePlaybackRate(0)` on the paused animation before `play()` can leave its start time far in the future. Setting `playbackRate` directly fixes it.
```suggestion
spin.playbackRate = 0;
```
##########
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.updatePlaybackRate(1 - (1 - progress) ** 3);
Review Comment:
Same here.
```suggestion
spin.playbackRate = 1 - (1 - progress) ** 3;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] UI: Enhance Smooth Operator experience [airflow]
Posted by "github-actions[bot] (via GitHub) via commits" <co...@airflow.apache.org>.
github-actions[bot] commented on PR #74917:
URL: https://github.com/apache/airflow/pull/74917#issuecomment-6993781723
### Backport successfully created: v3-4-test
Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
<table>
<tr>
<th>Status</th>
<th>Branch</th>
<th>Result</th>
</tr>
<tr>
<td>✅</td>
<td>v3-4-test</td>
<td><a href="https://github.com/apache/airflow/pull/77274"><img src="https://img.shields.io/badge/PR-77274-blue" alt="PR Link"></a></td>
</tr>
</table>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org