Fix bug with branch sorting in dropdown menu

3c24cd55f6ec09ed472d756e97c933a278ad73cc

Tucker McKnight <tmcknight@instructure.com> | Thu Feb 05 2026

Fix bug with branch sorting in dropdown menu

Date comparison was happening with the stringified dates (e.g.
"Mon Jan. 1, 2026") instead of a dictionary-sortable format,
like ISO8601.
js_templates/common/branchesListItems.ts:27
Before
26
27
28
29
30
31
          ${branch.name}
        </span>${currentBadge}${defaultBadge}
        <span class="text-body d-block ms-2">
          updated ${branch.date}
        </span>
      </a>
    `
After
26
27
28
29
30
31
          ${branch.name}
        </span>${currentBadge}${defaultBadge}
        <span class="text-body d-block ms-2">
          updated ${new Date(branch.date).toDateString()}
        </span>
      </a>
    `
js_templates/common/htmlPage.ts:20
Before
19
20
21
22
23
24
      return {
        name: branch.name,
        href: nav.repoBranchHome(branch.name) + '/' + data.nav.path,
        date: repo.commits.get(branch.head).date.toDateString(),
      }
    })
After
19
20
21
22
23
24
      return {
        name: branch.name,
        href: nav.repoBranchHome(branch.name) + '/' + data.nav.path,
        date: repo.commits.get(branch.head).date.toISOString(),
      }
    })
wiki/index.md:51
Before
50
51
52
53
54
55
- [ ] Compute language bar graph based on lines of code, not count of files
  - Also make a way for users to ignore certain files or filetypes
- [ ] Amending a commit can make it incorrectly show up as being in one branch but not the other (see e6bbc544eb7000015a)
- [ ] Sorting branch list dropdown by last commit isn't sorting correctly
- [ ] Change URL scheme for snapshotted pages to account for:
  - branch snapshots
  - tag snapshots
After
50
51
52

53
54
- [ ] Compute language bar graph based on lines of code, not count of files
  - Also make a way for users to ignore certain files or filetypes
- [ ] Amending a commit can make it incorrectly show up as being in one branch but not the other (see e6bbc544eb7000015a)
⁣
- [ ] Change URL scheme for snapshotted pages to account for:
  - branch snapshots
  - tag snapshots
wiki/index.md:59
Before
58
59
60

61
62

### Completed

⁣
- [x] get rid of lodash
  - [Project page](./projects/node-18.md.html)
  - also use globs npm module instead of built-in node version, built-in requires
After
58
59
60
61
62
63

### Completed

- [x] Sorting branch list dropdown by last commit isn't sorting correctly
- [x] get rid of lodash
  - [Project page](./projects/node-18.md.html)
  - also use globs npm module instead of built-in node version, built-in requires