Skip to content

Commit

The Branches page updates live too: a branch pushed, created, renamed or deleted shows while you are on it, and the notifications guide lists it among the pages that do.

syntaqxcommitted Parenteb2bf6dBrowse files
2 files+5−00/2 viewed
+1−0
177177 | --- | --- |
178178 | **Overview** and **Files** | A branch or tag is pushed, created or deleted, a check or run reports on a commit, a release is published, or a deployment moves. |
179179 | **Commits** | Commits are pushed to the branch. They wait under a **3 new commits · Show** bar at the top instead of moving the list while you read; checks on the commits shown update in place. |
180+| **Branches** | A branch is pushed, created, renamed or deleted. |
180181 | **Tags** | A tag is pushed or deleted, or a release is published. |
181182 | **Pull requests** and **Issues** | One is opened, updated, reviewed, commented on, checked, merged or closed. |
182183 | A **pull request** | Commits are pushed to it, its checks report, someone reviews or comments, or it is merged or closed. New items join its timeline where you are reading; if you are at the end of the page, it follows them down. |
+4−0
2222 import { refusal, requireRepo, requireWritableRepo } from "../../lib/access.server";
2323 import { type BranchTab, branchSections, branchTab, driftScale } from "../../lib/branches";
2424 import { readBranches } from "../../lib/branches.server";
25+import { repoPages } from "../../lib/repo-live";
26+import { useRepoLive } from "../../lib/use-repo-live";
2527 import { commitChecksFor } from "../../lib/commit-checks.server";
2628 import { page } from "../../lib/meta";
2729 import { deployments, repos, work } from "../../lib/services.server";
134136 const { tab, query, main, branches, total, matched, unread, names, checks, username, now, can, unprotected } = loaderData;
135137 const base = `/${params.owner}/${params.repo}`;
136138 const navigate = useNavigate();
139+ // New, moved and deleted branches show as they happen (lib/use-repo-live.ts).
140+ useRepoLive({ match: repoPages.refs() });
137141 // Branches deleted on this visit, kept to restore until the page is left.
138142 const [deleted, setDeleted] = useState<Record<string, ActiveBranch>>({});
139143 const [notice, setNotice] = useState<{ tone: "danger" | "success"; text: string } | null>(null);