forge
Explore
Log in

Don't you dare go Hollow

✨ studio library rows open their own note page

Browse files at this commit

c923286e3fdee822637a7f30569cc28d43e72024Burak BoduroğluParent: f1158ba
  • feat
    • ✨ studio library rows open their own note page
Show full message
feat: ✨ studio library rows open their own note page
- new route /ai/studio/$noteId (search: episode) for one note's summary
  and episodes; the landing page keeps the title, note picker and library
- picking a note or a library row navigates there instead of opening the
  note in place; an episode row opens its note page with that episode
  loaded in the player
- the note page has no picker or library, only a "Kitaplığa dön" link back
- the run inspector side panel is removed with its strings
src/components/ai/note-studio-panel.tsxmodified+107 -101
@@ -1,13 +1,15 @@
1-import { Show, Suspense, createMemo, createSignal } from "solid-js";
1+import { Show, Suspense, createMemo } from "solid-js";
2+import { Link, useNavigate } from "@tanstack/solid-router";
23 import { createResource } from "@/lib/create-resource";
34 import { getCourseNotes } from "@/api/course-notes";
45 import { getCourses } from "@/api/courses";
56 import { getMyCourses } from "@/api/reports";
6-import { formatApiError, type CourseNote } from "@/api/client";
7+import { formatApiError, type CourseNote, type Role } from "@/api/client";
78 import { PodcastPanel } from "@/components/notes/podcast-panel";
89 import { RagOutputsPanel } from "@/components/notes/rag-outputs-panel";
910 import { StudioOutputLibrary } from "@/components/ai/studio-output-library";
10-import { Button } from "@/components/ui/button";
11+import { RecordNotFound } from "@/components/layout/record-not-found";
12+import { buttonVariants } from "@/components/ui/button";
1113 import { EmptyState } from "@/components/ui/empty-state";
1214 import { ErrorAlert } from "@/components/ui/error-alert";
1315 import { IconChevronLeft } from "@/components/ui/icons";
@@ -22,44 +24,44 @@ import { hasMinRole } from "@/lib/roles";
2224
2325 type StudioNote = CourseNote & { courseTitle: string; courseCreatorId: string };
2426
25-/** Pick a lesson note, then read its AI outputs and produce its podcast —
26- * the same two panels the note reader shows, gathered on the AI hub. */
27+/** Every lesson note the account can produce from, with its course. */
28+async function loadStudioNotes(role: Role): Promise<StudioNote[]> {
29+ const courses = role === "student" ? await getMyCourses({ limit: 100 }) : await getCourses({ limit: 100 });
30+ const rows = await Promise.all(
31+ courses.items.map(async (course) => {
32+ try {
33+ const page = await getCourseNotes(course.id, { limit: 100 });
34+ return page.items.map<StudioNote>((note) => ({
35+ ...note,
36+ courseTitle: course.title,
37+ courseCreatorId: course.creator.id,
38+ }));
39+ } catch {
40+ return [];
41+ }
42+ }),
43+ );
44+ return rows.flat();
45+}
46+
47+function useStudioNotes() {
48+ const auth = useAuth();
49+ return createResource(() => auth.user()?.role ?? null, loadStudioNotes);
50+}
51+
52+/**
53+ * The studio's landing page: what it makes, a picker to start on any note,
54+ * and the library of everything produced so far. Picking a note or a row
55+ * opens that note's own page (`/ai/studio/$noteId`); nothing opens in place.
56+ */
2757 export function NoteStudioPanel() {
2858 const t = useT();
29- const auth = useAuth();
30- const [selectedId, setSelectedId] = createSignal("");
31- let outputsSection: HTMLElement | undefined;
32- const [notes, { refetch }] = createResource(
33- () => auth.user()?.role ?? null,
34- async (role) => {
35- const courses = role === "student" ? await getMyCourses({ limit: 100 }) : await getCourses({ limit: 100 });
36- const rows = await Promise.all(
37- courses.items.map(async (course) => {
38- try {
39- const page = await getCourseNotes(course.id, { limit: 100 });
40- return page.items.map<StudioNote>((note) => ({
41- ...note,
42- courseTitle: course.title,
43- courseCreatorId: course.creator.id,
44- }));
45- } catch {
46- return [];
47- }
48- }),
49- );
50- return rows.flat();
51- },
52- );
59+ const navigate = useNavigate();
60+ const [notes, { refetch }] = useStudioNotes();
5361 const options = createMemo(() => (notes() ?? []).map((note) => ({ value: note.id, label: `${note.courseTitle} · ${note.title}` })));
54- const selected = createMemo(() => (notes() ?? []).find((note) => note.id === selectedId()) ?? null);
55- const canManageSelected = () => {
56- const note = selected();
57- const user = auth.user();
58- return !!note && !!user && (hasMinRole(user.role, "manager") || note.courseCreatorId === user.id);
59- };
60- const selectLibraryNote = (noteId: string) => {
61- setSelectedId(noteId);
62- requestAnimationFrame(() => outputsSection?.scrollIntoView({ behavior: "smooth", block: "start" }));
62+ const open = (noteId: string, episode?: string) => {
63+ if (!noteId) return;
64+ void navigate({ to: "/ai/studio/$noteId", params: { noteId }, search: { episode } });
6365 };
6466
6567 return (
@@ -72,14 +74,11 @@ export function NoteStudioPanel() {
7274 when={(notes()?.length ?? 0) > 0}
7375 fallback={<EmptyState kind="notes" title={t("podcast.noNotes")} description={t("podcast.noNotesHint")} />}
7476 >
75- {/* Laid out the way a studio home reads: a plain title and one line
76- saying what it makes, the source picker, the producers, then
77- everything produced so far. Flat hairline cards, no banner and no
78- shadow stack — the work is the content, not the chrome. */}
77+ {/* A studio home: a plain title and one line saying what it makes,
78+ the way to start on a note, then everything produced so far.
79+ Flat hairline cards, no banner and no shadow stack. */}
7980 <div class="w-full space-y-8">
80- {/* On a phone an open note needs the screen more than the page
81- title does; the picker below still says where you are. */}
82- <header class={cn("space-y-1.5", selected() && "max-sm:hidden")}>
81+ <header class="space-y-1.5">
8382 <h1 class="text-2xl font-semibold tracking-tight text-text-strong">{t("aiHub.tab.studio")}</h1>
8483 <p class="text-sm text-muted-foreground">{t("aiStudio.heading")}</p>
8584 </header>
@@ -89,70 +88,77 @@ export function NoteStudioPanel() {
8988 <SearchableSelect
9089 id="sound-studio-note"
9190 class="w-full"
92- value={selectedId()}
93- onChange={setSelectedId}
91+ value=""
92+ onChange={(noteId) => open(noteId)}
9493 options={options()}
9594 placeholder={t("podcast.selectNote")}
9695 />
9796 </div>
9897
99- <Show
100- when={selected()}
101- fallback={
102- <div class="rounded-xl border border-dashed border-border-line px-6 py-12 text-center">
103- <p class="text-sm font-medium text-text-strong">{t("aiStudio.pickPrompt")}</p>
104- <p class="mx-auto mt-1 max-w-md text-sm text-muted-foreground">{t("aiStudio.pickPromptHint")}</p>
105- </div>
106- }
107- >
108- {(note) => (
109- <section ref={outputsSection} class="scroll-mt-20 space-y-4">
110- {/* The library steps aside while a note is open; this is the
111- way back to it without emptying the picker by hand. */}
112- <div class="flex items-center gap-3">
113- <Button
114- type="button"
115- variant="outline"
116- size="sm"
117- class="h-8 shrink-0 gap-1 rounded-lg max-sm:h-10 max-sm:w-10 max-sm:px-0"
118- aria-label={t("aiStudio.backToLibrary")}
119- onClick={() => setSelectedId("")}
120- >
121- <IconChevronLeft class="h-4 w-4" />
122- <span class="hidden sm:inline">{t("aiStudio.backToLibrary")}</span>
123- </Button>
124- <div class="min-w-0 flex-1">
125- <h2 class="truncate text-base font-semibold text-text-strong">{note().title}</h2>
126- <p class="truncate text-xs text-muted-foreground">{note().courseTitle}</p>
127- </div>
128- </div>
129- <div class="grid grid-cols-1 gap-4 xl:grid-cols-2">
130- <RagOutputsPanel
131- noteId={note().id}
132- source={courseNoteFiles}
133- canManage={canManageSelected()}
134- active
135- noteTitle={note().title}
136- />
137- <PodcastPanel noteId={note().id} noteTitle={note().title} active />
138- </div>
139- </section>
140- )}
141- </Show>
142-
143- {/* The library is the landing view. Once a note is open the page is
144- about producing for that note, so the list of everything else
145- steps out of the way. */}
146- <Show when={!selected()}>
147- <StudioOutputLibrary
148- notes={(notes() ?? []).map((note) => ({ id: note.id, title: note.title, courseTitle: note.courseTitle }))}
149- selectedId={selectedId()}
150- onSelect={selectLibraryNote}
151- />
152- </Show>
98+ <StudioOutputLibrary
99+ notes={(notes() ?? []).map((note) => ({ id: note.id, title: note.title, courseTitle: note.courseTitle }))}
100+ selectedId=""
101+ onSelect={open}
102+ />
153103 </div>
154104 </Show>
155105 </Show>
156106 </Suspense>
157107 );
158108 }
109+
110+/**
111+ * One note's studio page: its summary and its episodes, nothing else — no
112+ * picker, no library. "Kitaplığa dön" is the way back. `episode` preselects
113+ * an episode opened from the library.
114+ */
115+export function NoteStudioDetail(props: { noteId: string; episode?: string }) {
116+ const t = useT();
117+ const auth = useAuth();
118+ const [notes, { refetch }] = useStudioNotes();
119+ const note = createMemo(() => (notes() ?? []).find((row) => row.id === props.noteId) ?? null);
120+ const canManage = () => {
121+ const current = note();
122+ const user = auth.user();
123+ return !!current && !!user && (hasMinRole(user.role, "manager") || current.courseCreatorId === user.id);
124+ };
125+
126+ return (
127+ <Suspense fallback={<PageSpinner />}>
128+ <Show when={notes.error}>
129+ <ErrorAlert message={formatApiError(notes.error)} onRetry={() => void refetch()} />
130+ </Show>
131+ <Show when={!notes.error && notes()}>
132+ <Show when={note()} fallback={<RecordNotFound backTo="/ai/studio" />}>
133+ {(current) => (
134+ <div class="w-full space-y-6">
135+ <div class="space-y-3">
136+ <Link
137+ to="/ai/studio"
138+ class={cn(buttonVariants({ variant: "ghost", size: "sm" }), "-ml-2 h-8 gap-1 rounded-lg text-muted-foreground")}
139+ >
140+ <IconChevronLeft class="h-4 w-4" />
141+ {t("aiStudio.backToLibrary")}
142+ </Link>
143+ <header class="space-y-1">
144+ <h1 class="text-2xl font-semibold tracking-tight text-text-strong">{current().title}</h1>
145+ <p class="text-sm text-muted-foreground">{current().courseTitle}</p>
146+ </header>
147+ </div>
148+ <div class="grid grid-cols-1 gap-4 xl:grid-cols-2">
149+ <RagOutputsPanel
150+ noteId={current().id}
151+ source={courseNoteFiles}
152+ canManage={canManage()}
153+ active
154+ noteTitle={current().title}
155+ />
156+ <PodcastPanel noteId={current().id} noteTitle={current().title} episode={props.episode} active />
157+ </div>
158+ </div>
159+ )}
160+ </Show>
161+ </Show>
162+ </Suspense>
163+ );
164+}
src/components/ai/studio-output-library.test.tsxmodified+3 -5
@@ -120,14 +120,13 @@ describe("StudioOutputLibrary", () => {
120120 expect(screen.queryByText("Bölüm 12")).toBeNull();
121121 });
122122
123- it("opens the run inspector for an episode instead of selecting its note", async () => {
123+ it("opens an episode's note page with that episode picked", async () => {
124124 const onSelect = renderLibrary();
125125
126126 await waitFor(() => expect(screen.getAllByText("Hücre").length).toBe(2));
127127 fireEvent.click(screen.getAllByRole("button", { name: /Hücre/ })[0]!);
128128
129- await waitFor(() => expect(screen.getByText("Üretim ayrıntısı")).toBeTruthy());
130- expect(onSelect).not.toHaveBeenCalled();
129+ expect(onSelect).toHaveBeenCalledWith("note-1", expect.any(String));
131130 });
132131
133132 it("opens the note for a summary row, which has no artifact of its own", async () => {
@@ -136,7 +135,6 @@ describe("StudioOutputLibrary", () => {
136135 await waitFor(() => expect(screen.getByText("Kuvvet")).toBeTruthy());
137136 fireEvent.click(screen.getByRole("button", { name: /Kuvvet/ }));
138137
139- expect(onSelect).toHaveBeenCalledWith("note-2");
140- expect(screen.queryByText("Üretim ayrıntısı")).toBeNull();
138+ expect(onSelect).toHaveBeenCalledWith("note-2", undefined);
141139 });
142140 });
src/components/ai/studio-output-library.tsxmodified+5 -15
@@ -3,7 +3,6 @@ import { createResource } from "@/lib/create-resource";
33 import { getCourseNoteRag } from "@/api/course-notes";
44 import { listPodcastJobs } from "@/api/podcast";
55 import type { PodcastJobSummary } from "@/api/client";
6-import { StudioRunInspector } from "@/components/ai/studio-run-inspector";
76 import { Badge } from "@/components/ui/badge";
87 import { EmptyInline } from "@/components/ui/empty-inline";
98 import { IconSparkles, IconWaveform } from "@/components/ui/icons";
@@ -41,11 +40,11 @@ const LIBRARY_PAGE_SIZE = 10;
4140 export function StudioOutputLibrary(props: {
4241 notes: StudioLibraryNote[];
4342 selectedId: string;
44- onSelect: (noteId: string) => void;
43+ /** Opens the row's own page: the note, with the episode picked for a podcast row. */
44+ onSelect: (noteId: string, episodeId?: string) => void;
4545 }) {
4646 const t = useT();
4747 const { locale } = usePreferences();
48- const [inspecting, setInspecting] = createSignal<PodcastJobSummary | null>(null);
4948 const source = createMemo(() => props.notes.map((note) => note.id).join(","));
5049
5150 const stateVariant = (state: string) => {
@@ -131,10 +130,9 @@ export function StudioOutputLibrary(props: {
131130 });
132131
133132 const open = (item: StudioArtifact) => {
134- // A produced episode has an artifact of its own to inspect; a summary is
135- // rendered by the note's own producer panel, so that row opens the note.
136- if (item.job) setInspecting(item.job);
137- else props.onSelect(item.noteId);
133+ // Every row opens a page of its own; an episode opens its note's page
134+ // with that episode loaded in the player.
135+ props.onSelect(item.noteId, item.job?.job_id);
138136 };
139137
140138 return (
@@ -232,14 +230,6 @@ export function StudioOutputLibrary(props: {
232230 </Show>
233231 </Suspense>
234232
235- <StudioRunInspector
236- job={inspecting()}
237- onOpenChange={(next) => { if (!next) setInspecting(null); }}
238- formatLabel={formatLabel}
239- stateLabel={stateLabel}
240- stateVariant={stateVariant}
241- title={t("aiStudio.run.title")}
242- />
243233 </section>
244234 );
245235 }
src/components/ai/studio-run-inspector.tsxdeleted+0 -89
@@ -1,89 +0,0 @@
1-import { Show } from "solid-js";
2-import type { PodcastJobSummary } from "@/api/client";
3-import { PodcastPlayer } from "@/components/notes/podcast-player";
4-import { Alert } from "@/components/ui/alert";
5-import { Badge } from "@/components/ui/badge";
6-import { SidePanel } from "@/components/ui/side-panel";
7-import { formatDateTime, formatDurationClock } from "@/lib/format";
8-import { usePreferences, useT } from "@/stores/preferences-context";
9-
10-/** One label/value line of run metadata. */
11-function MetaRow(props: { label: string; value: string }) {
12- return (
13- <div class="flex items-baseline justify-between gap-3 py-1.5 text-sm">
14- <dt class="shrink-0 text-muted-foreground">{props.label}</dt>
15- <dd class="min-w-0 truncate text-right font-medium tabular-nums text-text-strong">{props.value}</dd>
16- </div>
17- );
18-}
19-
20-/**
21- * One produced episode, opened from the studio library.
22- *
23- * Everything here comes off the job row the list already holds — state, the
24- * narration the service settled on, when it started and finished, how long the
25- * audio runs — plus the audio door, which is addressed by job id. A job that
26- * never finished has no player, and says why instead.
27- */
28-export function StudioRunInspector(props: {
29- job: PodcastJobSummary | null;
30- onOpenChange: (open: boolean) => void;
31- /** Resolves the narration's label; unknown formats come back verbatim. */
32- formatLabel: (format: string | null) => string;
33- stateLabel: (state: string) => string;
34- stateVariant: (state: string) => "success" | "destructive" | "secondary" | "warning";
35- title: string;
36-}) {
37- const t = useT();
38- const { locale } = usePreferences();
39- const job = () => props.job;
40- const sourceName = () => job()?.source_title ?? job()?.source_id ?? "";
41-
42- return (
43- <SidePanel
44- size="wide"
45- open={job() != null}
46- onOpenChange={props.onOpenChange}
47- title={props.title}
48- description={sourceName()}
49- >
50- <Show when={job()}>
51- {(row) => (
52- <div class="space-y-4">
53- <div class="flex flex-wrap items-center gap-2">
54- <Badge variant={props.stateVariant(row().state)}>{props.stateLabel(row().state)}</Badge>
55- <Show when={props.formatLabel(row().format)}>
56- {(label) => <Badge variant="outline">{label()}</Badge>}
57- </Show>
58- </div>
59-
60- <dl class="divide-y divide-border-hairline border-y border-border-hairline">
61- <MetaRow label={t("aiStudio.run.source")} value={sourceName()} />
62- <MetaRow label={t("aiStudio.run.started")} value={formatDateTime(row().created_at, locale())} />
63- <Show when={row().finished_at != null}>
64- <MetaRow label={t("aiStudio.run.ended")} value={formatDateTime(row().finished_at!, locale())} />
65- </Show>
66- <Show when={row().duration_secs != null}>
67- <MetaRow
68- label={t("aiStudio.run.length")}
69- value={formatDurationClock(row().duration_secs! * 1_000)}
70- />
71- </Show>
72- </dl>
73-
74- <Show when={row().state === "failed" && row().error_code}>
75- {(code) => <Alert variant="destructive">{code()}</Alert>}
76- </Show>
77-
78- <Show
79- when={row().state === "done"}
80- fallback={<p class="text-sm text-muted-foreground">{t("podcast.history.emptyHint")}</p>}
81- >
82- <PodcastPlayer jobId={row().job_id} title={sourceName()} durationSecs={row().duration_secs} />
83- </Show>
84- </div>
85- )}
86- </Show>
87- </SidePanel>
88- );
89-}
src/components/notes/podcast-history.tsxmodified+3 -1
@@ -40,6 +40,8 @@ export function PodcastHistory(props: {
4040 noteId?: string;
4141 active?: boolean;
4242 refetchKey?: string | number;
43+ /** An episode to open with, e.g. one picked in the studio library. */
44+ episode?: string;
4345 /** The transcript of the episode the panel just produced, if the service sent one. */
4446 transcript?: { jobId: string; segments: PodcastTranscriptSegment[] } | null;
4547 }) {
@@ -56,7 +58,7 @@ export function PodcastHistory(props: {
5658 props.noteId;
5759 pageSize();
5860 setPage(0);
59- setSelected("");
61+ setSelected(props.episode ?? "");
6062 setAutoplay(false);
6163 });
6264
src/components/notes/podcast-panel.tsxmodified+2 -1
@@ -15,7 +15,7 @@ import { useT } from "@/stores/preferences-context";
1515
1616 const POLL_MS = 2_000;
1717
18-export function PodcastPanel(props: { noteId: string; active?: boolean; noteTitle?: string }) {
18+export function PodcastPanel(props: { noteId: string; active?: boolean; noteTitle?: string; episode?: string }) {
1919 const t = useT();
2020 const [format, setFormat] = createSignal<PodcastFormat>("duz_okuma");
2121 const [jobId, setJobId] = createSignal("");
@@ -241,6 +241,7 @@ export function PodcastPanel(props: { noteId: string; active?: boolean; noteTitl
241241 <PodcastHistory
242242 noteId={props.noteId}
243243 active={active()}
244+ episode={props.episode}
244245 refetchKey={status()?.state === "done" ? jobId() : ""}
245246 transcript={
246247 artifacts()?.transcript?.length ? { jobId: artifacts()!.job_id, segments: artifacts()!.transcript! } : null
src/i18n/locales/en.tsmodified+0 -5
@@ -709,11 +709,6 @@ export const en: Dict = {
709709 "aiStudio.tab.summary": "AI summary",
710710 "aiStudio.outputs.title": "Studio outputs",
711711 "aiStudio.outputs.description": "Select a lesson note and keep its summary and podcast together for quick access.",
712- "aiStudio.run.title": "Run detail",
713- "aiStudio.run.source": "Source note",
714- "aiStudio.run.started": "Started",
715- "aiStudio.run.ended": "Ended",
716- "aiStudio.run.length": "Length",
717712 "aiStudio.library.title": "Your generated library",
718713 "aiStudio.backToLibrary": "Back to library",
719714 "aiStudio.library.description": "Every summary and podcast you produced, newest first.",
src/i18n/locales/tr.tsmodified+0 -5
@@ -705,11 +705,6 @@ export const tr: Dict = {
705705 "aiStudio.tab.summary": "Yapay zekâ özeti",
706706 "aiStudio.outputs.title": "Hazır çıktılar",
707707 "aiStudio.outputs.description": "Bir ders notu seçin; özetini ve podcast'ini hızlı erişim için aynı alanda üretin.",
708- "aiStudio.run.title": "Üretim ayrıntısı",
709- "aiStudio.run.source": "Kaynak not",
710- "aiStudio.run.started": "Başladı",
711- "aiStudio.run.ended": "Bitti",
712- "aiStudio.run.length": "Uzunluk",
713708 "aiStudio.library.title": "Üretim kitaplığın",
714709 "aiStudio.backToLibrary": "Kitaplığa dön",
715710 "aiStudio.library.description": "Ürettiğin her özet ve podcast, en yenisi üstte.",
src/i18n/messages.tsmodified+0 -5
@@ -693,11 +693,6 @@ export type MessageKey =
693693 | "aiStudio.tab.summary"
694694 | "aiStudio.outputs.title"
695695 | "aiStudio.outputs.description"
696- | "aiStudio.run.title"
697- | "aiStudio.run.source"
698- | "aiStudio.run.started"
699- | "aiStudio.run.ended"
700- | "aiStudio.run.length"
701696 | "aiStudio.library.title"
702697 | "aiStudio.backToLibrary"
703698 | "aiStudio.library.description"
src/pages/ai-studio-note-page.tsxadded+13 -0
@@ -0,0 +1,13 @@
1+import { useParams, useSearch } from "@tanstack/solid-router";
2+import { NoteStudioDetail } from "@/components/ai/note-studio-panel";
3+import { RouteGuard } from "@/components/layout/route-guard";
4+
5+export default function AiStudioNotePage() {
6+ const params = useParams({ from: "/ai/studio/$noteId" });
7+ const search = useSearch({ from: "/ai/studio/$noteId" });
8+ return (
9+ <RouteGuard minRole="student">
10+ <NoteStudioDetail noteId={params().noteId} episode={search().episode} />
11+ </RouteGuard>
12+ );
13+}
src/routes/router.tsxmodified+12 -0
@@ -74,6 +74,7 @@ const PaymentStatementPage = lazyRoute(() => import("@/pages/payment-statement-p
7474 const WhiteboardsPage = lazyRoute(() => import("@/pages/whiteboards-page"));
7575 const WhiteboardPage = lazyRoute(() => import("@/pages/whiteboard-page"));
7676 const AiStudioPage = lazyRoute(() => import("@/pages/ai-studio-page"));
77+const AiStudioNotePage = lazyRoute(() => import("@/pages/ai-studio-note-page"));
7778 const AiStudyPage = lazyRoute(() => import("@/pages/ai-study-page"));
7879 const AiInsightsPage = lazyRoute(() => import("@/pages/ai-insights-page"));
7980 const AiInsightStudentPage = lazyRoute(() => import("@/pages/ai-insight-student-page"));
@@ -477,6 +478,16 @@ const aiStudioRoute = createRoute({
477478 component: AiStudioPage,
478479 });
479480
481+// One note's studio page; `episode` preselects an episode from the library.
482+const aiStudioNoteRoute = createRoute({
483+ getParentRoute: () => rootRoute,
484+ path: "/ai/studio/$noteId",
485+ validateSearch: (search: Record<string, unknown>) => ({
486+ episode: typeof search.episode === "string" && search.episode ? search.episode : undefined,
487+ }),
488+ component: AiStudioNotePage,
489+});
490+
480491 const aiStudyRoute = createRoute({
481492 getParentRoute: () => rootRoute,
482493 path: "/ai/study",
@@ -624,6 +635,7 @@ const routeTree = rootRoute.addChildren([
624635 whiteboardRoute,
625636 aiRoute,
626637 aiStudioRoute,
638+ aiStudioNoteRoute,
627639 aiStudyRoute,
628640 aiInsightsRoute,
629641 aiInsightStudentRoute,