Show branches in two categories, separating WIPs from merged branches

920e38b7d6cf30d110291c537265fcdd0e0a0be0

Tucker McKnight <tucker@pangolin.lan> | Sun Feb 01 2026

Show branches in two categories, separating WIPs from merged branches
js_templates/branches.ts:9
Before
9
10
  return render(
    m('div', {class: "d-flex flex-wrap"}, data.branches.map((branch) => {
After
9
10
  const branchesWithWorkInProgress = data.branches.filter(branch => branch.ahead > 0)
  const branchesFullyMerged = data.branches.filter(branch => branch.ahead === 0)

  const branchCards = (branches) => {
    return m('div', {class: "d-flex flex-wrap"}, branches.map((branch) => {
js_templates/branches.ts:40
Before
40
  )
After
40
  }

  return render([
    m('h1', {class: 'fs-2'}, 'Branches with unmerged commits'),
    branchCards(branchesWithWorkInProgress),
    m('h1', {class: 'fs-2'}, 'Branches that are fully merged'),
    branchCards(branchesFullyMerged),
  ])