It's not easy to tell a merge which doesn't fix "needs work" from one
that does.
Why should a PR go automagically (!) from needs work to needs review after a merge?
Automatically changing the labels after commits is something done by our GitHub Actions setup (I think we implement this behaviour in https://github.com/sagemath/sage/blob/develop/.github/sync_labels.py).
I think the "correct" (i.e. how GitHub expects you to do it)
workflow is that draft PRs are used for PRs that the person making
the PR does not think are ready to be merged or be formally
reviewed, but is just looking for feedback on something
in-progress, or maybe wants to run the CI on their in-progress
work (it's difficult to test CI locally). Draft PRs can also be
used for a proof-of-concept that the developer wants to share and
ask for feedback on before making a more serious attempt later, or
to show off half-finished code that they don't expect to finish
soon in the hopes that someone else with more time might pick it
up and finish it.
GitHub also has features where reviewers can mark something as accepted, needs changes, etc. without setting any labels ("Review changes" in the "Files changed" tab of a PR). But any GitHub user can do this, they don't need any permissions in the SageMath organization (we probably want people to need some permissions to be able to approve a PR, otherwise someone could make two GitHub accounts and bypass the review process by approving their PR from their second account).
PR's should be draft by default. As a reviewer, I cannot convert to draft.
A draft PR cannot be merged even with a positive review, so I don't think we should default to drafts. But people making a PR can (and perhaps should) change their PRs to draft if they think reviewer comments will take some time to address.
Which is why the bot should never change the status of PR's marked as "needs work". Going from "needs work" to "needs review" should always be a manual step IMO. I am also highly annoyed by this.
I'm not sure if this is possible, but maybe a solution would be
to have the GitHub Action responsible for changing "needs work"
to "needs review" on PRs only do so when the author does not
have permission to update the labels themselves. I think the
current behaviour is mostly reasonable, but as people
have mentioned in this thread it isn't always ideal. Someone
with permissions on GitHub to change their PR from "needs work"
to "needs review" can do so when they believe they have
addressed the reviewer's feedback (which may take multiple
commits), but contributors without the GitHub permissions
(mostly new contributors, who we should try to make sure have a
smooth experience so that they continue contributing) cannot do
this. We would still have the same issues discussed here for PRs
from new contributors, but I think these are a minority of PRs,
so I'm not concerned that leaving the current behaviour only for
these users would make it difficult to find PRs that actually
need review.
> but this button removes the draft status.