Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/features/interview/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { LiveInterview } from './ui/live/LiveInterview'
export { InterviewTranscript } from './ui/InterviewTranscript'
export { InterviewSetupForm } from './ui/setup/InterviewSetupForm'
export type { DocOption } from './ui/setup/ContextDocumentPicker'
export { useCreateSession } from './model/useCreateSession'
Expand Down
39 changes: 39 additions & 0 deletions frontend/src/features/interview/ui/InterviewTranscript.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { isQuestion } from '@/domain/session'
import { Spinner } from '@/shared/ui/Spinner'
import { useSessionMessages } from '../model/useSessionMessages'
import { QuestionBubble } from './live/QuestionBubble'
import { AnswerBubble } from './live/AnswerBubble'

// 종료된 세션의 질문/답변 원문(읽기 전용). 라이브 버블을 재사용해
// 음성 질문 재생(TTS)·음성 답변 재생도 그대로 노출한다.
export function InterviewTranscript({ sessionId }: { sessionId: number }) {
const { data, isLoading } = useSessionMessages(sessionId)

if (isLoading) {
return (
<div className="flex justify-center py-8">
<Spinner />
</div>
)
}

const items = [...(data ?? [])].sort(
(a, b) => (a.sequenceNumber ?? 0) - (b.sequenceNumber ?? 0),
)
if (items.length === 0) return null

return (
<section className="flex flex-col gap-4">
<h2 className="text-h6 text-fg">질문 &amp; 답변</h2>
<div className="flex flex-col gap-3">
{items.map((m) =>
isQuestion(m) ? (
<QuestionBubble key={m.id} message={m} />
) : (
<AnswerBubble key={m.id} message={m} />
),
)}
</div>
</section>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SiteNav } from '@/widgets/site-nav'
import { SiteFooter } from '@/widgets/site-footer'
import { Button } from '@/shared/ui/Button'
import { FeedbackReport, useFeedback } from '@/features/feedback'
import { InterviewTranscript } from '@/features/interview'

export default function SessionFeedbackPage() {
const { id } = useParams<{ id: string }>()
Expand Down Expand Up @@ -38,7 +39,12 @@ export default function SessionFeedbackPage() {
</div>
)}

{data && <FeedbackReport feedback={data} shareable />}
{data && (
<>
<FeedbackReport feedback={data} shareable />
<InterviewTranscript sessionId={sessionId} />
</>
)}
</main>
<SiteFooter />
</div>
Expand Down