@@ -400,6 +400,9 @@ func (m *sidebarCmp) filesBlockCompact(maxWidth int) string {
400400
401401 fileList := []string{section, ""}
402402 sort.Slice(files, func(i, j int) bool {
403+ if files[i].History.latestVersion.CreatedAt == files[j].History.latestVersion.CreatedAt {
404+ return files[i].FilePath < files[j].FilePath
405+ }
403406 return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt
404407 })
405408
@@ -626,8 +629,11 @@ func (m *sidebarCmp) filesBlock() string {
626629 }
627630
628631 fileList := []string{section, ""}
629− // order files by the latest version's created time
632+ // order files by the latest version's created time, then by path for stability
630633 sort.Slice(files, func(i, j int) bool {
634+ if files[i].History.latestVersion.CreatedAt == files[j].History.latestVersion.CreatedAt {
635+ return files[i].FilePath < files[j].FilePath
636+ }
631637 return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt
632638 })
633639