| 22 | 22 | | import { refusal, requireRepo, requireWritableRepo } from "../../lib/access.server"; |
| 23 | 23 | | import { type BranchTab, branchSections, branchTab, driftScale } from "../../lib/branches"; |
| 24 | 24 | | import { readBranches } from "../../lib/branches.server"; |
| 25 | + | import { repoPages } from "../../lib/repo-live"; |
| 26 | + | import { useRepoLive } from "../../lib/use-repo-live"; |
| 25 | 27 | | import { commitChecksFor } from "../../lib/commit-checks.server"; |
| 26 | 28 | | import { page } from "../../lib/meta"; |
| 27 | 29 | | import { deployments, repos, work } from "../../lib/services.server"; |
| ⋯ |
| 134 | 136 | | const { tab, query, main, branches, total, matched, unread, names, checks, username, now, can, unprotected } = loaderData; |
| 135 | 137 | | const base = `/${params.owner}/${params.repo}`; |
| 136 | 138 | | const navigate = useNavigate(); |
| 139 | + | // New, moved and deleted branches show as they happen (lib/use-repo-live.ts). |
| 140 | + | useRepoLive({ match: repoPages.refs() }); |
| 137 | 141 | | // Branches deleted on this visit, kept to restore until the page is left. |
| 138 | 142 | | const [deleted, setDeleted] = useState<Record<string, ActiveBranch>>({}); |
| 139 | 143 | | const [notice, setNotice] = useState<{ tone: "danger" | "success"; text: string } | null>(null); |