Add a button to the branches cards, and make it link to the /branches page

755e69eee1ed61addf2117a6a2524308c3044e99

Tucker McKnight <tucker@pangolin.lan> | Tue Jan 20 2026

Add a button to the branches cards, and make it link to the /branches page
js_templates/branches.ts:15
Before
14
15
16
17
18
19
            ? `
              <div class="card bezel-gray m-2 flex-grow-1" style="flex-basis: 20rem; max-width: 20rem;">
                <div class="card-header">
                  <a class="card-title" href="${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}">${branch.branchName}</a>
                  ${branch.branchName === data.branchInfo.branchName ? '<div class="badge rounded-pill bg-secondary mx-1">current</div>' : ''}
                  ${branch.branchName === data.reposConfig.repos[branch.repoName].defaultBranch ? '<div class="badge rounded-pill bg-info text-dark mx-1">default</div>' : ''}
                </div>
After
14
15
16
17
18
19
            ? `
              <div class="card bezel-gray m-2 flex-grow-1" style="flex-basis: 20rem; max-width: 20rem;">
                <div class="card-header">
                  <a class="card-title" href="${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}/branches">${branch.branchName}</a>
                  ${branch.branchName === data.branchInfo.branchName ? '<div class="badge rounded-pill bg-secondary mx-1">current</div>' : ''}
                  ${branch.branchName === data.reposConfig.repos[branch.repoName].defaultBranch ? '<div class="badge rounded-pill bg-info text-dark mx-1">default</div>' : ''}
                </div>
js_templates/branches.ts:23
Before
22
23
24



25
26
                  <p>${branch.description || ''}</p>
                  <p>${branch.ahead} commits ahead, ${branch.behind} commits behind <span class="font-monospace">${branch.compareTo}</span></p>
                </div>
⁣
⁣
⁣
              </div>
            `
            : ''
After
22
23
24
25
26
27
28
29
                  <p>${branch.description || ''}</p>
                  <p>${branch.ahead} commits ahead, ${branch.behind} commits behind <span class="font-monospace">${branch.compareTo}</span></p>
                </div>
                <div class="card-footer">
                  <a class="m-1 btn btn-outline-primary shadow-none" href="${data.reposPath}/${slugify(branch.repoName)}/branches/${slugify(branch.branchName)}/branches">Switch to branch</a>
                </div>
              </div>
            `
            : ''