Skip to content

UI: Pass Dag, DagRun, TaskInstance, and Asset objects to React app plugins#70149

Merged
bbovenzi merged 1 commit into
apache:mainfrom
dheerajturaga:pass-context-objects-to-react-plugins
Jul 22, 2026
Merged

UI: Pass Dag, DagRun, TaskInstance, and Asset objects to React app plugins#70149
bbovenzi merged 1 commit into
apache:mainfrom
dheerajturaga:pass-context-objects-to-react-plugins

Conversation

@dheerajturaga

@dheerajturaga dheerajturaga commented Jul 21, 2026

Copy link
Copy Markdown
Member

Follows the pattern established in #69986, which enriched the props passed to React app plugins beyond bare route params by resolving assetUri from the UI's TanStack Query cache. This extends that pattern to the full context objects: React plugins now receive dag, dagRun, taskInstance, and asset as typed props alongside the existing route-id strings.

Each object is resolved from the query cache and gated on the route params it depends on, so it is served from the cache the parent details page already populated (no extra request) where present, and is undefined on routes or destinations that lack those ids (e.g. nav, base, dashboard).

Related: #69148

Screenshots from dummy plugin:
image

image
Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    Claude Code Opus 4.8

@boring-cyborg boring-cyborg Bot added area:plugins area:UI Related to UI/UX. For Frontend Developers. kind:documentation labels Jul 21, 2026
@dheerajturaga
dheerajturaga force-pushed the pass-context-objects-to-react-plugins branch from 8642279 to 69a335f Compare July 21, 2026 00:07
@bbovenzi bbovenzi added this to the Airflow 3.4.0 milestone Jul 21, 2026

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's update the documentation to let plugin developers know this and that its only for react plugins of course.

Comment thread airflow-core/src/airflow/ui/src/pages/ReactPlugin.tsx Outdated
Comment thread airflow-core/src/airflow/ui/src/pages/ReactPlugin.tsx
…ugins

Follows the pattern established in apache#69986, which enriched the props passed
to React app plugins beyond bare route params by resolving assetUri from the
UI's TanStack Query cache. This extends that pattern to the full context
objects: React plugins now receive dag, dagRun, taskInstance, and asset as
typed props alongside the existing route-id strings.

Each object is resolved from the query cache and gated on the route params
it depends on, so it is served from the cache the parent details page
already populated (no extra request) where present, and is undefined on
routes or destinations that lack those ids (e.g. nav, base, dashboard).
@dheerajturaga
dheerajturaga force-pushed the pass-context-objects-to-react-plugins branch from 69a335f to 73e2d55 Compare July 21, 2026 20:09
@dheerajturaga dheerajturaga added the ready for maintainer review Set after triaging when all criteria pass. label Jul 21, 2026
@bbovenzi
bbovenzi merged commit 8ce7c84 into apache:main Jul 22, 2026
90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:plugins area:UI Related to UI/UX. For Frontend Developers. kind:documentation ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants