Watch
0
0
Fork
You've already forked hyperhive
0

swarm-ui: the moved tabs' redirects come from one table, with tests

The four tab moves each hand-wrote a redirect route. They are one table now,
MOVED_ROUTES, and movedHref says where an old address goes with its query
kept; /builds?run= still lands on the build's card. The builds page's own
redirect helper is gone.
This commit is contained in:
iris 2026-10-26 22:48:45 +01:00 • committed by mara
commit c28ca7aab5

View file

@ -37,11 +37,6 @@ export const OUTCOME_TONE: Record<BuildOutcome, BadgeTone> = {
error: "warning",
};
/** Where an old `/builds` link goes: the jobs page, keeping its query. */
export function jobsHref(search: string): string {
return search === "" ? "/jobs" : `/jobs?${search}`;
}
/** The run a `?run=<id>` query names, or `null` when it names none. */
export function wantedRun(search: string): string | null {
const id = new URLSearchParams(search).get("run");