After Rails was updated to 7.1 in r22488, RepositoriesController#diff
always fails with the following error. The error is due to the change made by r21883.
Missing template, responding with 404: Missing template layouts/base.html.erb with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :rsb]}.
Although r21883 was necessary to fix the problem that the layout is not applied for the diff of .js files (#37626), I think the change should be reverted at this point. Currently, the diff feature is not available for all file types, but if r21883 is reverted, diff will be available for all but a few file extensions.
I think we should revert r21883 and then figure out how to solve the issue reported in #37626.