Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

1.7 KB
Raw Blame
import type {
    ImplementationSlotClaim,
    ReportTaskEntry,
} from 'products/signals/frontend/inbox/logics/inboxReportDetailLogic'
import { SignalReport } from 'products/signals/frontend/inbox/types'

import { TodayReportAbstract } from './TodayReportAbstract'
import { TodayReportEvidence } from './TodayReportEvidence'
import { TodayReportFeedback } from './TodayReportFeedback'
import { TodayReportHeader } from './TodayReportHeader'
import { TodayReportNextStep } from './TodayReportNextStep'
import { TodayReportProposal } from './TodayReportProposal'

interface TodayReportLiveState {
    reportTaskToOpen: ReportTaskEntry | null
    implementationSlotClaim: ImplementationSlotClaim | null
}

export function TodayReportBody({
    report,
    live,
}: {
    report: SignalReport
    live: TodayReportLiveState | null
}): JSX.Element {
    return (
        <article className="TodayReportArticle flex flex-col gap-10">
            <div className="flex flex-col gap-5">
                <TodayReportHeader report={report} />
                <TodayReportAbstract report={report} />
            </div>
            <section className="flex flex-col gap-4 empty:hidden" aria-label="Proposal">
                <TodayReportProposal reportId={report.id} />
                <TodayReportNextStep
                    report={report}
                    reportTaskToOpen={live?.reportTaskToOpen ?? null}
                    slotClaim={live?.implementationSlotClaim ?? null}
                />
            </section>
            <TodayReportEvidence report={report} />
            {live && (
                <footer>
                    <TodayReportFeedback report={report} />
                </footer>
            )}
        </article>
    )
}