From 5664448aa80963571dc93869c1a29bcef47dbd9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Tue, 13 Oct 2026 12:53:37 +0200 Subject: [PATCH] docs(selectors): document isNodeEditable's rule for integrators isNodeEditable is published from agent-device/selectors, and #3566 removed the only place its declaration stated the rule. The doc comment now gives the full precedence: a disabled node is not editable, then the published editable fact, then the platform type. Co-Authored-By: Claude Opus 5.5 --- packages/selectors/src/internal/node.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/selectors/src/internal/node.ts b/packages/selectors/src/internal/node.ts index c9297e5308..c06520fc6a 100644 --- a/packages/selectors/src/internal/node.ts +++ b/packages/selectors/src/internal/node.ts @@ -8,6 +8,10 @@ export function isNodeVisible(node: SnapshotNode): boolean { return node.rect.width > 0 && node.rect.height > 0; } +/** + * False for a disabled node. Otherwise the node's published `editable` fact decides, and the + * platform type decides only when the snapshot carries no such fact. + */ export function isNodeEditable(node: SnapshotNode, platform: Platform | PublicPlatform): boolean { if (node.enabled === false) return false; return node.editable ?? isFillableType(node.type ?? '', platform);