@@ -400,6 +400,9 @@ func (m *sidebarCmp) filesBlockCompact(maxWidth int) string {
401 fileList := []string{section, ""}
401 fileList := []string{section, ""}
402 sort.Slice(files, func(i, j int) bool {
402 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
403 return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt
406 return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt
@@ -626,8 +629,11 @@ func (m *sidebarCmp) filesBlock() string {
628 fileList := []string{section, ""}
631 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
630 sort.Slice(files, func(i, j int) bool {
633 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
631 return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt
637 return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt