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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]