PrakshiGoyal10 commented on PR #69998:
URL: https://github.com/apache/airflow/pull/69998#issuecomment-6166401383

   Pushed `e33d691113`, which styles the repair confirmation page to match the 
Airflow UI: a card layout that follows the OS light/dark setting, plus a 
**Cancel** link back to the run. It is still a single inline stylesheet with no 
JavaScript and no front-end build. Screenshot 4 in the description is updated.
   
   On why a separate confirmation page is needed at all:
   
   - **Extra links can only navigate.** Core renders every extra link as a 
plain `<a href>` (`ExtraLinks.tsx`), so a click is always a `GET`, and a plugin 
has no hook to turn it into a form submit or a `POST`.
   - **A `GET` must not repair.** The UI's `_token` cookie is `SameSite=Lax`, 
so browsers still send it on top-level cross-site `GET` navigations. If the 
link repaired directly, a link posted elsewhere or a link preview fetching the 
URL could trigger a repair. So the `GET` only renders the page, and the repair 
happens on the page's same-site `POST`, which a cross-site request cannot 
authenticate.
   - **The new tab comes from core.** Airflow 3.1.x opens every extra link with 
`target="_blank"`. Current `main` opens same-origin links in the same tab, so 
on newer versions the page replaces the task view, and Repair or Cancel lands 
back on the run in that tab.
   
   To remove the separate page entirely, a follow-up could add a `react_apps` 
tab on the task instance (`destination: "task_instance"`, as `common.ai`'s HITL 
Review plugin does) with a real Repair button that posts to the same endpoint 
from inside the UI. The endpoint and its protections would stay as they are. 
I've kept that out of this PR because it adds a front-end toolchain to the 
provider. Happy to open it as a follow-up if that direction sounds right.
   
   ---
   Drafted-by: Claude Code (Opus 5.5); reviewed by @PrakshiGoyal10 before 
posting
   


-- 
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]

Reply via email to