StepBoxGridReview: show box border color from structure detection
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 41s
CI / test-go-edu-search (push) Successful in 45s
CI / test-python-klausur (push) Failing after 2m46s
CI / test-python-agent-core (push) Successful in 35s
CI / test-nodejs-website (push) Successful in 35s
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 41s
CI / test-go-edu-search (push) Successful in 45s
CI / test-python-klausur (push) Failing after 2m46s
CI / test-python-agent-core (push) Successful in 35s
CI / test-nodejs-website (push) Successful in 35s
- Use box_bg_hex for border color (from Step 7 structure detection) - Numbered color badges per box - Show color name in box header - Add box_bg_color/box_bg_hex to GridZone type Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -75,6 +75,8 @@ export interface GridZone {
|
|||||||
vsplit_group?: number
|
vsplit_group?: number
|
||||||
box_layout_type?: 'flowing' | 'columnar' | 'bullet_list' | 'header_only'
|
box_layout_type?: 'flowing' | 'columnar' | 'bullet_list' | 'header_only'
|
||||||
box_grid_reviewed?: boolean
|
box_grid_reviewed?: boolean
|
||||||
|
box_bg_color?: string
|
||||||
|
box_bg_hex?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BBox {
|
export interface BBox {
|
||||||
|
|||||||
@@ -192,15 +192,27 @@ export function StepBoxGridReview({ sessionId, onNext }: StepBoxGridReviewProps)
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Box zones */}
|
{/* Box zones */}
|
||||||
{boxZones.map((zone, boxIdx) => (
|
{boxZones.map((zone, boxIdx) => {
|
||||||
|
const boxColor = zone.box_bg_hex || '#d97706' // amber fallback
|
||||||
|
const boxColorName = zone.box_bg_color || 'box'
|
||||||
|
return (
|
||||||
<div
|
<div
|
||||||
key={zone.zone_index}
|
key={zone.zone_index}
|
||||||
className="bg-white dark:bg-gray-800 rounded-xl border-2 border-amber-300 dark:border-amber-700 overflow-hidden"
|
className="bg-white dark:bg-gray-800 rounded-xl overflow-hidden"
|
||||||
|
style={{ border: `3px solid ${boxColor}` }}
|
||||||
>
|
>
|
||||||
{/* Box header */}
|
{/* Box header */}
|
||||||
<div className="flex items-center justify-between px-4 py-3 bg-amber-50 dark:bg-amber-900/30 border-b border-amber-200 dark:border-amber-800">
|
<div
|
||||||
|
className="flex items-center justify-between px-4 py-3 border-b"
|
||||||
|
style={{ backgroundColor: `${boxColor}15`, borderColor: `${boxColor}30` }}
|
||||||
|
>
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
<span className="text-lg">📦</span>
|
<div
|
||||||
|
className="w-8 h-8 rounded-lg flex items-center justify-center text-white text-sm font-bold"
|
||||||
|
style={{ backgroundColor: boxColor }}
|
||||||
|
>
|
||||||
|
{boxIdx + 1}
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span className="font-medium text-gray-900 dark:text-white">
|
<span className="font-medium text-gray-900 dark:text-white">
|
||||||
Box {boxIdx + 1}
|
Box {boxIdx + 1}
|
||||||
@@ -209,6 +221,7 @@ export function StepBoxGridReview({ sessionId, onNext }: StepBoxGridReviewProps)
|
|||||||
{zone.bbox_px?.w}x{zone.bbox_px?.h}px
|
{zone.bbox_px?.w}x{zone.bbox_px?.h}px
|
||||||
{zone.cells?.length ? ` | ${zone.cells.length} Zellen` : ''}
|
{zone.cells?.length ? ` | ${zone.cells.length} Zellen` : ''}
|
||||||
{zone.box_layout_type ? ` | ${LAYOUT_LABELS[zone.box_layout_type as BoxLayoutType] || zone.box_layout_type}` : ''}
|
{zone.box_layout_type ? ` | ${LAYOUT_LABELS[zone.box_layout_type as BoxLayoutType] || zone.box_layout_type}` : ''}
|
||||||
|
{boxColorName !== 'box' ? ` | ${boxColorName}` : ''}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -262,7 +275,8 @@ export function StepBoxGridReview({ sessionId, onNext }: StepBoxGridReviewProps)
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
)
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user