File tree Expand file tree Collapse file tree
frontend/src/components/Chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,15 +224,18 @@ export default function ChatWindow({
224224 )
225225 const currentOperator = labels ?. operator
226226 const attackOperator = attackLabels ?. operator
227+ // Existing attacks are operator-locked when their operator differs from the current one.
227228 const isOperatorLocked = Boolean (
228229 attackResultId && attackLabels && attackOperator && currentOperator && attackOperator !== currentOperator ,
229230 )
231+ // They are cross-target locked when the selected target's canonical hash differs from the persisted target.
230232 const isCrossTargetLocked = Boolean (
231233 attackResultId
232234 && attackTarget
233235 && activeTarget
234236 && ! targetInfoMatchesTarget ( attackTarget , activeTarget ) ,
235237 )
238+ // Any failed invariant keeps all mutation controls and handlers read-only.
236239 const isMutationLocked = isOperatorLocked || isCrossTargetLocked || isTargetResolutionLocked
237240
238241 // Clear internal messages when attack state is reset (e.g. New Attack).
You can’t perform that action at this time.
0 commit comments