Make the branches dropdown work on new repos page

7db57c4a30497bdb48914a95353fbdb361fb52fe

Tucker McKnight <tucker@pangolin.lan> | Tue Dec 09 2025

Make the branches dropdown work on new repos page
js_templates/helpers/nav.ts:1
Before
0
1
2
3
import { type ReposConfiguration } from "../../src/configTypes.ts"
import path from 'path'

export const NavHelper = (reposConfig: ReposConfiguration, slugify: Function, repoName: string, branchName: string) => {
  const reposPath = reposConfig.path || ""
After
0
1

2
import { type ReposConfiguration } from "../../src/configTypes.ts"

⁣
export const NavHelper = (reposConfig: ReposConfiguration, slugify: Function, repoName: string, branchName: string) => {
  const reposPath = reposConfig.path || ""
js_templates/helpers/nav.ts:28
Before
27
28
29



30
31
    repoCurrentBranchHome: () => {
      return currentBranchPath
    },
⁣
⁣
⁣
    repoCurrentBranchFiles: () => {
      return `${currentBranchPath}/files`
    },
After
27
28
29
30
31
32
33
34
    repoCurrentBranchHome: () => {
      return currentBranchPath
    },
    repoBranchHome: (branchName: string) => {
      return `${rootBasePathBranches}/${slugify(branchName)}`
    },
    repoCurrentBranchFiles: () => {
      return `${currentBranchPath}/files`
    },
js_templates/repo.ts:25
Before
24
25
26



27
28
          <title>${repo.name}</title>
          <link rel="stylesheet" href="/css/design-board.css">
          <link href="https://unpkg.com/prismjs@1.20.0/themes/prism.css" rel="stylesheet" />
⁣
⁣
⁣
        </head>
        <body>
          <div class="container">
After
24
25
26
27
28
29
30
31
          <title>${repo.name}</title>
          <link rel="stylesheet" href="/css/design-board.css">
          <link href="https://unpkg.com/prismjs@1.20.0/themes/prism.css" rel="stylesheet" />
          <script>
            window.branches = ${JSON.stringify(repo.branches)};
          </script>
        </head>
        <body>
          <div class="container">