fix: route curator tasks to unified service pages

This commit is contained in:
Sai-karthik
2026-07-11 23:02:29 +00:00
parent 63619f5047
commit 411ad591bf
5 changed files with 25 additions and 63 deletions
+2 -2
View File
@@ -14,8 +14,8 @@ const ICP_IDS: CuratorIcpId[] = [
const LIVE_ROUTE_PREFIX: Record<string, string> = {
"courses-service": "/agents/courses",
"resume-service": "/agents/resume",
"interview-service": "/agents/interview/preview",
"roleplay-service": "/agents/roleplay/builder",
"interview-service": "/agents/interview",
"roleplay-service": "/agents/roleplay",
"matchmaking-service": "/agents/matchmaking",
};
+1 -1
View File
@@ -113,7 +113,7 @@ function getInterviewActionRoute(task: DailyMissionTask) {
params.set("difficulty", source.searchParams.get("difficulty") ?? "medium");
params.set("media", "video");
params.set("source", "daily-mission");
return `/agents/interview/preview?${params.toString()}`;
return `/agents/interview?${params.toString()}`;
}
function compactAnswer(answer: string) {
+4 -4
View File
@@ -68,9 +68,9 @@ export const ALLOWED_NOTIFICATION_HREFS = new Set([
"/rewards",
"/agents/resume",
"/agents/interview",
"/agents/interview/setup",
"/agents/interview",
"/agents/roleplay",
"/agents/roleplay",
"/agents/roleplay/setup",
"/agents/qscore",
]);
@@ -80,9 +80,9 @@ export const ALLOWED_NOTIFICATION_HREF_PREFIXES = [
"/missions/available",
"/agents/resume",
"/agents/interview",
"/agents/interview/setup",
"/agents/interview",
"/agents/roleplay",
"/agents/roleplay",
"/agents/roleplay/setup",
"/agents/qscore",
] as const;
+2 -2
View File
@@ -93,11 +93,11 @@ function ctaFor(stage: MissionStage, snapshot: MissionSnapshot, context?: Missio
if (role === "Interview") {
params.set("mode", "mission");
params.set("prompt", `${stage.title} for ${profile.targetRole}`);
return { label: stage.status === "in_progress" ? "Continue mock" : "Start mock", href: `/agents/interview/setup?${params.toString()}` };
return { label: stage.status === "in_progress" ? "Continue mock" : "Start mock", href: `/agents/interview?${params.toString()}` };
}
if (role === "Roleplay") {
params.set("scenario", `${stage.title} for ${profile.targetRole}`);
return { label: stage.status === "in_progress" ? "Continue roleplay" : "Start roleplay", href: `/agents/roleplay/setup?${params.toString()}` };
return { label: stage.status === "in_progress" ? "Continue roleplay" : "Start roleplay", href: `/agents/roleplay?${params.toString()}` };
}
if (role === "Resume") {
params.set("focus", `${stage.title}: ${profile.targetRole}`);
+16 -54
View File
@@ -181,37 +181,18 @@ const serviceRegistry: ServiceRecord[] = [
frontend: {
baseUrl: frontendBaseUrl,
pages: {
discovery: {
service: {
path: "/agents/interview",
queryParams: ["fresh"],
usage: "Entry screen for role selection and resume of in-progress interview work.",
},
setup: {
path: "/agents/interview/setup",
queryParams: ["role", "type", "from_assignment", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId"],
usage: "Collects interview role, type, duration, persona, media mode, and personalization consent.",
},
preview: {
path: "/agents/interview/preview",
queryParams: ["role", "type", "persona", "duration", "difficulty", "media", "vip", "from_assignment", "personalize", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId"],
usage: "Curator default handoff. The page configures the session and opens the launch overlay.",
},
feedback: {
path: "/agents/interview/feedback",
queryParams: ["sessionId", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId"],
usage: "Opens feedback/review for a completed or processing session.",
},
session: {
path: "/agents/interview/preview",
queryParams: ["session_id", "goal", "role", "type"],
usage: "Legacy service-session launcher used by service agent results.",
aliases: ["discovery", "setup", "preview", "feedback", "session"],
queryParams: ["view", "phase", "sessionId", "role", "type", "persona", "duration", "difficulty", "media", "vip", "personalize", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId", "taskTitle", "taskSubtitle", "taskType"],
usage: "Single nuqs-driven interview surface for configuration, live practice, plan review, and feedback.",
},
},
usage: "Prefer preview for curator links and setup for mission CTAs that still need user choices.",
usage: "All interview UI states use /agents/interview with typed query state; no child UI routes exist.",
},
curator: {
defaultPage: "preview",
defaultActionLabel: "Open interview preview",
defaultPage: "service",
defaultActionLabel: "Open interview",
actionLabels: {
start: "Start mock",
review: "Review interview",
@@ -229,7 +210,7 @@ const serviceRegistry: ServiceRecord[] = [
usage: "Include missionInstanceId, missionId, stageId, curatorTaskId, role, and media when building stateful handoffs.",
},
usageDocs: [
"Call buildServiceLink('interview-service', 'preview', state) for curator handoffs.",
"Call buildServiceLink('interview-service', 'service', state) for curator handoffs.",
"Call getServiceEndpoint('interview-service', 'configure') for backend contract metadata.",
],
eventContract: {
@@ -280,37 +261,18 @@ const serviceRegistry: ServiceRecord[] = [
frontend: {
baseUrl: frontendBaseUrl,
pages: {
discovery: {
service: {
path: "/agents/roleplay",
queryParams: ["fresh"],
usage: "Entry screen for scenario discovery and resume of in-progress roleplay work.",
},
setup: {
path: "/agents/roleplay/setup",
queryParams: ["scenario", "scenario_text", "scenario_name", "from_assignment", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId"],
usage: "Collects roleplay scenario details and stores configure parameters for the builder.",
},
builder: {
path: "/agents/roleplay/builder",
queryParams: ["sessionId", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId", "role", "persona", "duration", "mode", "brief", "vip", "from_assignment_id"],
usage: "Curator default handoff for generating or resuming a roleplay plan.",
},
feedback: {
path: "/agents/roleplay/feedback",
queryParams: ["sessionId", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId"],
usage: "Opens feedback/review for a completed or processing session.",
},
session: {
path: "/agents/roleplay/builder",
queryParams: ["session_id", "goal", "role", "type"],
usage: "Legacy service-session launcher used by service agent results.",
aliases: ["discovery", "setup", "builder", "feedback", "session"],
queryParams: ["view", "phase", "sessionId", "scenario", "scenarioName", "brief", "role", "persona", "duration", "difficulty", "mode", "vip", "source", "missionInstanceId", "missionId", "stageId", "curatorTaskId", "taskTitle", "taskSubtitle", "taskType"],
usage: "Single nuqs-driven roleplay surface for configuration, scenario review, live practice, and feedback.",
},
},
usage: "Prefer builder for curator links and setup for mission CTAs that still need user choices.",
usage: "All roleplay UI states use /agents/roleplay with typed query state; no child UI routes exist.",
},
curator: {
defaultPage: "builder",
defaultActionLabel: "Open roleplay preview",
defaultPage: "service",
defaultActionLabel: "Open roleplay",
actionLabels: {
start: "Run drill",
review: "Review roleplay",
@@ -327,7 +289,7 @@ const serviceRegistry: ServiceRecord[] = [
usage: "Include role, brief, mission state, and curatorTaskId when building stateful handoffs.",
},
usageDocs: [
"Call buildServiceLink('roleplay-service', 'builder', state) for curator handoffs.",
"Call buildServiceLink('roleplay-service', 'service', state) for curator handoffs.",
"Call getServiceEndpoint('roleplay-service', 'configure') for backend contract metadata.",
],
eventContract: {