diff --git a/site/app/tasks/[name]/[jobId]/trajectory/components/trajectory-page.tsx b/site/app/tasks/[name]/[jobId]/trajectory/components/trajectory-page.tsx
index e6d6b8ed58..62d45bf2ef 100644
--- a/site/app/tasks/[name]/[jobId]/trajectory/components/trajectory-page.tsx
+++ b/site/app/tasks/[name]/[jobId]/trajectory/components/trajectory-page.tsx
@@ -1,16 +1,15 @@
"use client";
import { useEffect, useRef, useState } from "react";
-import { Loader2 } from "lucide-react";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { ScrollArea } from "@/components/ui/scroll-area";
+import { Skeleton } from "@/components/ui/skeleton";
type TrajectoryPageProps = {
trajectoryUrl: string;
fallbackUrl: string;
stderrText: string | null;
verifierText: string | null;
- topOffsetClassName?: string;
};
export function TrajectoryPage({
@@ -18,7 +17,6 @@ export function TrajectoryPage({
fallbackUrl,
stderrText,
verifierText,
- topOffsetClassName = "top-28",
}: TrajectoryPageProps) {
const [iframeLoading, setIframeLoading] = useState(false);
const [activeTab, setActiveTab] = useState("trajectory");
@@ -54,46 +52,40 @@ export function TrajectoryPage({
};
return (
-
-
-
+
+
-
-
+
+
Trajectory
Log
Test
-
+
{iframeLoading && (
-
-
-
-
-
-
Loading
-
+
+
)}
-
+
{renderLogContent(stderrText, "No stderr content available for this trial.")}
@@ -114,7 +106,7 @@ export function TrajectoryPage({
-
+
{renderLogContent(verifierText, "No verifier test output available for this trial.")}
@@ -122,8 +114,33 @@ export function TrajectoryPage({
+
+
+ );
+}
+
+function TrajectorySkeleton() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
);
}
diff --git a/site/app/tasks/[name]/[jobId]/trajectory/page.tsx b/site/app/tasks/[name]/[jobId]/trajectory/page.tsx
index bc228f39ab..9826122a9f 100644
--- a/site/app/tasks/[name]/[jobId]/trajectory/page.tsx
+++ b/site/app/tasks/[name]/[jobId]/trajectory/page.tsx
@@ -1,9 +1,8 @@
-import type { CSSProperties } from "react";
import tasksData from "@/zealt/tasks.json";
import { TrajectoryPage } from "./components/trajectory-page";
import zealtConfig from "@/zealt/config.json";
import { redirect } from "next/navigation";
-import { AlertTriangle, Check, HelpCircle, X as XIcon } from "lucide-react";
+import { AlertTriangle, Check, ExternalLink, HelpCircle, X as XIcon } from "lucide-react";
type RouteParams = {
@@ -135,6 +134,10 @@ function buildFallbackUrl(jobName: string, trialName: string) {
return `${zealtConfig.github_repo}/blob/main/jobs/${jobName}/${trialName}/result.json`
}
+function buildTaskDirUrl(taskName: string) {
+ return `${zealtConfig.github_repo}/tree/main/tasks/${encodeURIComponent(taskName)}`;
+}
+
function splitTrialName(trialName: string): { taskName: string; jobId: string } | null {
const separatorIndex = trialName.lastIndexOf("__");
if (separatorIndex <= 0 || separatorIndex >= trialName.length - 2) {
@@ -148,7 +151,7 @@ function splitTrialName(trialName: string): { taskName: string; jobId: string }
}
function getServerBaseUrl() {
- return process.env.CLIPS_BASE_URL || 'https://cc.getpochi.com';
+ return process.env.CLIPS_BASE_URL || 'https://fletch.getpochi.com';
}
function getGithubOwnerRepo(): string {
@@ -267,32 +270,40 @@ export default async function TrajectoryRoutePage({
const trialStatus = getTrialStatus(trialEntry);
const statusMeta = getStatusMeta(trialStatus);
const StatusIcon = statusMeta.Icon;
- const contentTopOffsetClassName = "top-36 sm:top-32 lg:top-28";
+ const taskDirUrl = buildTaskDirUrl(resolvedParams.name);
const trajectoryUrl = clipId && trialEntry
? buildClipUrl(trialEntry.job_name, trialEntry.trial_name, resolvedParams.name)
: null;
- // FIXME
- if (!trajectoryUrl) {
+ // Redirect
+ if (!trajectoryUrl || !trialEntry) {
redirect(fallbackUrl ?? '/tasks');
}
+
const stderrText = trialEntry?.stderr_text ?? null;
const verifierText = trialEntry?.verifier_text ?? null;
- const pageThemeVars = {
- "--background": "oklch(0.268 0.004 106.643)",
- "--border": "oklch(0.362 0.01 106.893)",
- } as CSSProperties;
return (
-
+
-
+
-
- {headerTitle}
-
+
@@ -306,13 +317,14 @@ export default async function TrajectoryRoutePage({
-
+
+
+
);
}
\ No newline at end of file
diff --git a/site/app/tasks/components/tasks-page-client.tsx b/site/app/tasks/components/tasks-page-client.tsx
index 707d85e974..3d787e754c 100644
--- a/site/app/tasks/components/tasks-page-client.tsx
+++ b/site/app/tasks/components/tasks-page-client.tsx
@@ -349,7 +349,7 @@ export function TasksPageClient({ tasksData }: TasksPageClientProps) {
};
const selectedTaskInstructionUrl = selectedTask
- ? `${zealtConfig.github_repo}/tree/main/tasks/${selectedTask}/instruction.md`
+ ? `${zealtConfig.github_repo}/tree/main/tasks/${selectedTask}`
: "";
const selectedTaskInstruction = selectedTask
@@ -378,7 +378,7 @@ export function TasksPageClient({ tasksData }: TasksPageClientProps) {