Backport #40451 by @silverwind
The dashboard repo list read the entire `commit_status_summary` table on
every load when the page held an empty repo and the other repos'
statuses were cached, about 1.2 s with 1M rows. Those other repos also
showed and cached the status of an arbitrary older commit.
Also fixes the MySQL upsert not updating `target_url`.
Assisted-by: Claude Code:claude-opus-5-5
Co-authored-by: silverwind <me@silverwind.io>