Skip to content

Commit de79e44

Browse files
samejrclaude
andcommitted
Redirect bookmarked /schedules to the unified Tasks page
The standalone /schedules listing was removed when the unified Tasks page took over. Existing bookmarks / shared links 404'd. Add a thin redirect that lands users on the Tasks page pre-filtered to Scheduled. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 598fc8e commit de79e44

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.schedules._index
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { type LoaderFunctionArgs, redirect } from "@remix-run/server-runtime";
2+
import { EnvironmentParamSchema, v3EnvironmentPath } from "~/utils/pathBuilder";
3+
4+
/**
5+
* The standalone `/schedules` listing page was removed when the unified
6+
* Tasks page subsumed the Agents / Standard / Schedules listings. This
7+
* thin redirect catches bookmarks and shared links pointing at the old
8+
* URL and sends users to the Tasks page pre-filtered to Scheduled tasks.
9+
*
10+
* Individual schedule routes (`/schedules/:scheduleParam`,
11+
* `/schedules/edit/:scheduleParam`, `/schedules/new`) live in sibling
12+
* route files and are unaffected.
13+
*/
14+
export async function loader({ params }: LoaderFunctionArgs) {
15+
const { organizationSlug, projectParam, envParam } = EnvironmentParamSchema.parse(params);
16+
const tasksPath = v3EnvironmentPath(
17+
{ slug: organizationSlug },
18+
{ slug: projectParam },
19+
{ slug: envParam }
20+
);
21+
return redirect(`${tasksPath}?types=SCHEDULED`);
22+
}

0 commit comments

Comments
 (0)