Avoid creating too long system note with added commit references

Problem

I've just gain the prod db access and here is what I've found.

We have this commit note.

added 10824 commits

  • a758f791 - Update broken sbt Debian repo in Scala template
  • 2d84f108 - Fix use of deprecated apt-key cmd
  • b2a03c37 - Clarify best way to move servers
  • ...

and references all 10824 commits in that system note which slows it down significantly.

I'm not too sure why we have to list all of those commits in the first place. That may have been caused by a rebase. Should we think about adding a limit there to avoid creating more issues like this in the future? Also, I'm not sure if we should continue to improve performance for that MR given that this is an unusual note. 🤔

As mentioned in #355838 (comment 1039880794), !73756 (merged) has a problematic note that references over 10k commits which fails to load.

We need to understand if that was an edge case we haven't considered and decide what we are going to do to avoid creating more system notes like that.

We may need some guidance from UX team if we change how we treat these system notes.

Solution

Limit the number of commits in the system note to the most recent 10 commits, linking to a compare page with the truncated/hidden commits:

User added 30 commits 1 month ago

Compare with previous version


Related to #355838 (closed)

Edited by Pedro Moreira da Silva