WS-2 R3: containers/preamble as background backdrops, tick-N, no false overlap flag
app-ci-deploy / test-build-deploy (push) Has been cancelled
app-ci-deploy / test-build-deploy (push) Has been cancelled
From KC's 2nd review: - z-order: boundaries, preamble bands and container frames drawn behind; figures, responses and parts on top (a figure's description tooltip is no longer blocked by the preamble box). Preamble + containers are pointerEvents:none. - the 'large box around all content' is gone: a container renders as a small corner tab (label + total marks), not an enclosing box; intermediate part-groups keep a faint dashed nesting frame. Main-question extent is shown by its boundaries. - MC 'tick N' count (select_n) surfaced next to the option boxes. - fixed the spurious 'overlapping shapes' review flag on containers (they legitimately enclose their children; only genuine partial overlaps between non-containers flag now). tsc clean; 7/7 model tests pass. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01GruxHXxfdp4kZCgAMVFgvV
This commit is contained in:
@@ -288,7 +288,9 @@ function addCheapReviewFlags(shapes: ExamCanvasShapeModel[], pages?: CanvasPageG
|
||||
if (typeof shape.confidence === 'number' && shape.confidence < 0.7) flags.push('low confidence')
|
||||
if ((shape.kind === 'part' || shape.kind === 'question_number') && looksUncertainLabel(shape.label)) flags.push('uncertain question label')
|
||||
if (shape.kind === 'part' && (!shape.maxMarks || shape.maxMarks <= 0) && !markAreasByQuestion.has(shape.questionId ?? shape.id)) flags.push('missing marks')
|
||||
const samePageOverlap = shapes.some((other, otherIndex) => otherIndex !== index && shape.kind !== 'boundary' && other.kind !== 'boundary' && pageForShape(shape, pages) === pageForShape(other, pages) && overlaps(shape, other) && (shape.kind === other.kind || (!contains(bounds(shape), bounds(other)) && !contains(bounds(other), bounds(shape)))))
|
||||
// Containers are MEANT to enclose their children, so never flag them (or their children) for overlap;
|
||||
// flag only genuine partial overlaps between non-container shapes where neither contains the other.
|
||||
const samePageOverlap = !shape.isContainer && shape.kind !== 'boundary' && shapes.some((other, otherIndex) => otherIndex !== index && !other.isContainer && other.kind !== 'boundary' && pageForShape(shape, pages) === pageForShape(other, pages) && overlaps(shape, other) && !contains(bounds(shape), bounds(other)) && !contains(bounds(other), bounds(shape)))
|
||||
if (samePageOverlap) flags.push('overlapping shapes')
|
||||
return flags.length ? { ...shape, reviewFlags: flags } : shape
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user