fix: column_text Typ fuer Sub-Sessions in Korrektur-Tabelle
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 28s
CI / test-python-klausur (push) Failing after 2m9s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 20s
Some checks failed
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-school (push) Successful in 29s
CI / test-go-edu-search (push) Successful in 28s
CI / test-python-klausur (push) Failing after 2m9s
CI / test-python-agent-core (push) Successful in 19s
CI / test-nodejs-website (push) Successful in 20s
_cells_to_vocab_entries kannte column_text nicht, daher wurden keine Eintraege erzeugt. Jetzt mappt column_text -> 'text' Feld. Frontend: column_text in FIELD_LABELS/COL_TYPE_TO_FIELD/COL_TYPE_COLOR. Label: "Tabelle" statt "Vokabeltabelle" fuer Sub-Sessions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -36,6 +36,7 @@ const FIELD_LABELS: Record<string, string> = {
|
||||
example: 'Beispiel',
|
||||
source_page: 'Seite',
|
||||
marker: 'Marker',
|
||||
text: 'Text',
|
||||
}
|
||||
|
||||
/** Map column type to WordEntry field name */
|
||||
@@ -45,6 +46,7 @@ const COL_TYPE_TO_FIELD: Record<string, string> = {
|
||||
column_example: 'example',
|
||||
page_ref: 'source_page',
|
||||
column_marker: 'marker',
|
||||
column_text: 'text',
|
||||
}
|
||||
|
||||
/** Column type → color class */
|
||||
@@ -54,6 +56,7 @@ const COL_TYPE_COLOR: Record<string, string> = {
|
||||
column_example: 'text-orange-600 dark:text-orange-400',
|
||||
page_ref: 'text-cyan-600 dark:text-cyan-400',
|
||||
column_marker: 'text-gray-500 dark:text-gray-400',
|
||||
column_text: 'text-gray-700 dark:text-gray-300',
|
||||
}
|
||||
|
||||
type RowStatus = 'pending' | 'active' | 'reviewed' | 'corrected' | 'skipped'
|
||||
@@ -472,7 +475,7 @@ export function StepLlmReview({ sessionId, onNext }: StepLlmReviewProps) {
|
||||
{/* Right: Full vocabulary table */}
|
||||
<div className="col-span-2" ref={tableRef}>
|
||||
<div className="text-xs font-medium text-gray-500 dark:text-gray-400 mb-1">
|
||||
Vokabeltabelle ({vocabEntries.length} Eintraege)
|
||||
{columnsUsed.length === 1 && columnsUsed[0]?.type === 'column_text' ? 'Tabelle' : 'Vokabeltabelle'} ({vocabEntries.length} Eintraege)
|
||||
</div>
|
||||
<div className="border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden">
|
||||
<div className="max-h-[70vh] overflow-y-auto">
|
||||
|
||||
@@ -1241,6 +1241,7 @@ def _cells_to_vocab_entries(
|
||||
'column_example': 'example',
|
||||
'page_ref': 'source_page',
|
||||
'column_marker': 'marker',
|
||||
'column_text': 'text', # generic single-column (box sub-sessions)
|
||||
}
|
||||
bbox_key_map = {
|
||||
'column_en': 'bbox_en',
|
||||
@@ -1248,6 +1249,7 @@ def _cells_to_vocab_entries(
|
||||
'column_example': 'bbox_ex',
|
||||
'page_ref': 'bbox_ref',
|
||||
'column_marker': 'bbox_marker',
|
||||
'column_text': 'bbox_text',
|
||||
}
|
||||
|
||||
# Group cells by row_index
|
||||
@@ -1264,6 +1266,7 @@ def _cells_to_vocab_entries(
|
||||
'english': '',
|
||||
'german': '',
|
||||
'example': '',
|
||||
'text': '', # generic single-column (box sub-sessions)
|
||||
'source_page': '',
|
||||
'marker': '',
|
||||
'confidence': 0.0,
|
||||
@@ -1273,6 +1276,7 @@ def _cells_to_vocab_entries(
|
||||
'bbox_ex': None,
|
||||
'bbox_ref': None,
|
||||
'bbox_marker': None,
|
||||
'bbox_text': None,
|
||||
'ocr_engine': row_cells[0].get('ocr_engine', '') if row_cells else '',
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user