feat: implement sections 6-7 - span selection, preview, and label assignment popover

This commit is contained in:
Marko Djordjevic 2026-02-14 10:10:41 +01:00
parent c9d2cbfc4b
commit 586f02ed69
11 changed files with 647 additions and 22483 deletions

View file

@ -161,6 +161,14 @@ export default function Home() {
await fetchAnnotations(activeChartId);
};
const handleSpanAnnotationsChange = async () => {
await fetchSpanAnnotations(activeChartId);
};
const handleSelectedSpanChange = (spanId: number | null) => {
setSelectedSpanId(spanId);
};
const handleLabelDelete = async (id: number) => {
setAnnotations(annotations.filter((a) => a.id !== id));
if (selectedLabelId === id) {
@ -264,6 +272,11 @@ export default function Home() {
selectedLabelId={selectedLabelId}
onLabelSelect={handleLabelSelect}
activeChartId={activeChartId}
spanAnnotations={spanAnnotations}
spanLabelTypes={spanLabelTypes}
selectedSpanId={selectedSpanId}
onSpanAnnotationsChange={handleSpanAnnotationsChange}
onSelectedSpanChange={handleSelectedSpanChange}
/>
</main>
</div>