Realtime update of pipeline status in Files view
Description
When using the the GitLab UI to edit files, after submitting changes, there's no easy way to jump to the CI/CD Pipeline resulting from the change. If you refresh the file page, there will be a little pipeline status next to the commit SHA. We should make that icon update in realtime so that it appears without needing to refresh.
Proposal
Update this pipeline icon in realtime in the commit widget shown at the top of any page in Repository > Files.
The simple and boring solution is:
- show no status icon for the "empty state" (page load)
- show no status icon for the "loading" state (waiting for async request)
- show the status icon returned by backend as soon as it is received
- update the status icon as soon as further requests (poll) return
Further improvements:
- Define if a commit is expected to have a pipeline: https://gitlab.com/gitlab-org/gitlab-ce/issues/41808
- Show pipeline mini-graph in Files views: https://gitlab.com/gitlab-org/gitlab-ce/issues/41810
Design
Simply show nothing until we have actual information:
show no status icon for the "empty state" (page load)
show no status icon for the "loading" state (waiting for async request)
show the status icon returned by backend as soon as it is received
update the status icon as soon as further requests (poll) return