Skip to content

Remove temporary text/node highlighting that can permanently recolor nodes - #179

Open
dankinsoid wants to merge 1 commit into
grab:mainfrom
dankinsoid:fix/remove-text-highlight
Open

Remove temporary text/node highlighting that can permanently recolor nodes#179
dankinsoid wants to merge 1 commit into
grab:mainfrom
dankinsoid:fix/remove-text-highlight

Conversation

@dankinsoid

Copy link
Copy Markdown

Problem

scan_text_nodes, set_multiple_text_contents, and get_reactions apply a temporary orange highlight to nodes for visual feedback. The pattern saves the original fills/strokes, overwrites them, waits via delay()/setTimeout, then restores.

If the operation throws or the plugin run is interrupted between the overwrite and the restore, the node keeps the orange highlight permanently — leaving text recolored and breaking components.

Fix

Removed all four highlight blocks in src/cursor_mcp_plugin/code.js:

  • get_reactions — orange stroke + 1.5s setTimeout
  • scan_text_nodes — orange fill, 100ms
  • findTextNodes (legacy) — orange fill, 500ms
  • set_multiple_text_contents — orange fill, 500ms

Core scanning / text-replacement logic is untouched; only the cosmetic feedback is gone. node --check passes.

🤖 Generated with Claude Code

The orange highlight applied during scan_text_nodes, set_multiple_text_contents,
and get_reactions saved/restored fills (or strokes) around a delay. If the op
threw or aborted before restore, the node kept the highlight color permanently,
breaking components. Removed all four highlight blocks; core logic untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
juansilvadesign added a commit to juansilvadesign/cursor-talk-to-figma-mcp that referenced this pull request Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant