make searching word and add branch last committed date to dropdown

600ca76f289cc0435b1d886b44fd49ec46bdf281

Tucker McKnight | Sun Dec 14 2025

make searching word and add branch last committed date to dropdown
frontend/main.js:79
Before
79
After
79
const dropdownBranchesResults = document.getElementById('dropdown-branches-results')
document.getElementById('dropdownBranchSearch')?.addEventListener('input', (event) => {
  const searchTerm = event.target.value
  console.log(searchTerm)
  let branches = window.branchesWithHrefs.filter((branch) => {
    return branch.name.includes(searchTerm)
  })
  dropdownBranchesResults.innerHTML = branchesListItems(branches, window.defaultBranch)
})
js_templates/repo.ts:2
Before
2
3
export const branchesListItems = (branches: Array<{name: string, href: string}>, defaultBranch: string): string => {
    return `<span class='dropdown-item'><a href='${branch.href}'>${branch.name}</a>${badge}</span>`
After
2
3
export const branchesListItems = (branches: Array<{name: string, href: string, date: string}>, defaultBranch: string): string => {
    return `<span class='dropdown-item my-1'><a href='${branch.href}'>${branch.name}</a>${badge}<span class="d-block ms-2">updated ${branch.date}</span></span>`
js_templates/repo.ts:27
Before
27
After
27
        date: repo.commits.get(branch.head).date.toDateString(),
js_templates/repo.ts:76
Before
76
                                    Date
After
76
                                    Last commit
js_templates/repo.ts:89
Before
89
                          <div class="dropdown-branches">
After
89
                          <div id="dropdown-branches-results" class="dropdown-branches">