-
- {isAiSuggestion ? 'AI' : p.icon}
+
+ {isAiSuggestion ? 'AI' : (isContainer ? (depth === 0 ? '▣' : '▢') : p.icon)}
{shape.props.label || p.label}
- {confidence && {confidence}}
- {!confidence && !isBoundary && shape.props.questionId && Attached}
+
+ {marksPill(shape.props.maxMarks)}
+ {confidence && {confidence}}
+ {!confidence && !marksPill(shape.props.maxMarks) && shape.props.questionId && kind !== 'context' && Attached}
+
{flags.length > 0 && {flags.slice(0, 2).join(' · ')}}
{kind === 'response' && shape.props.responseForm && {RESPONSE_FORM_LABEL[shape.props.responseForm] ?? shape.props.responseForm}}
+ {/* Context region: a visible tether to its owning question + the figure kind. */}
+ {kind === 'context' && shape.props.linkLabel && → {shape.props.linkLabel}}
{kind === 'context' && shape.props.contextType && shape.props.contextType !== 'generic' && {shape.props.contextType}}
- {isBoundary && pair across pages}
)
@@ -186,7 +214,7 @@ function defaultProps(kind: ExamCanvasShapeKind, w: number, h: number) {
return { w, h, label: p.label, kind, responseForm: kind === 'response' ? 'lines' : undefined, contextType: kind === 'context' ? 'generic' : undefined, source: 'manual' as const, confirmed: true }
}
-const sharedProps = { w: T.number, h: T.number, label: T.string, kind: T.string, maxMarks: T.optional(T.number), responseForm: T.optional(T.string), contextType: T.optional(T.string), questionId: T.optional(T.string), domainId: T.optional(T.string), source: T.optional(T.string), confirmed: T.optional(T.boolean), confidence: T.optional(T.number), derivation: T.optional(T.string), reviewFlags: T.optional(T.string) }
+const sharedProps = { w: T.number, h: T.number, label: T.string, kind: T.string, maxMarks: T.optional(T.number), responseForm: T.optional(T.string), contextType: T.optional(T.string), questionId: T.optional(T.string), parentId: T.optional(T.string), isContainer: T.optional(T.boolean), depth: T.optional(T.number), description: T.optional(T.string), linkLabel: T.optional(T.string), domainId: T.optional(T.string), source: T.optional(T.string), confirmed: T.optional(T.boolean), confidence: T.optional(T.number), derivation: T.optional(T.string), reviewFlags: T.optional(T.string) }
const ind = (s: ExamCanvasTLShape | ExamPdfPageTLShape) =>