### Apache Airflow version

2.6.3

### What happened

Select tasks from List Task Instance page in UI and select clear
Only those tasks are cleared and downsteam tasks are not also cleared as they are in the DAG graph view

### What you think should happen instead

downstream tasks should also be cleared

### How to reproduce

Select tasks from List Task Instance page in UI for which there are downstream tasks and select clear

### Operating System

rocky

### Versions of Apache Airflow Providers

_No response_

### Deployment

Official Apache Airflow Helm Chart

### Deployment details

_No response_

### Anything else

_No response_

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)

"""Utility to get Flask-Appbuilder's string format "pk" for an object.
    Used to generate requests to FAB action views without *too* much difficulty.
    The implementation relies on FAB internals, but unfortunately I don't see
    a better way around it.
    Example usage::
        from airflow.www.views import TaskInstanceModelView
        ti = session.Query(TaskInstance).filter(...).one()
        pk = _get_appbuilder_pk_string(TaskInstanceModelView, ti)
        client.post("...", data={"action": "...", "rowid": pk})
    """
    pk_value = model_view_cls.datamodel.get_pk_value(instance)
    return model_view_cls._serialize_pk_if_composite(model_view_cls, pk_value)
def test_task_instance_delete(session, admin_client, create_task_instance):
    task_instance_to_delete = create_task_instance(
        task_id="test_task_instance_delete",
        execution_date=timezone.utcnow(),
        state=State.DEFERRED,
    )
    composite_key = _get_appbuilder_pk_string(TaskInstanceModelView, task_instance_to_delete)
    task_id = task_instance_to_delete.task_id
    assert session.query(TaskInstance).filter(TaskInstance.task_id == task_id).count() == 1
    admin_client.post(f"/taskinstance/delete/{composite_key}", follow_redirects=True)
    assert session.query(TaskInstance).filter(TaskInstance.task_id == task_id).count() == 0
def test_task_instance_delete_permission_denied(session, client_ti_without_dag_edit, create_task_instance):