LearnNewsExamplesServices
Frontmatter
id8208
titleai.client.ComponentService: Make highlightComponent non-blocking
stateClosed
labels
enhancementai
assigneestobiu
createdAtDec 30, 2025, 1:16 AM
updatedAtDec 30, 2025, 1:17 AM
githubUrlhttps://github.com/neomjs/neo/issues/8208
authortobiu
commentsCount1
parentIssue8169
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtDec 30, 2025, 1:17 AM

ai.client.ComponentService: Make highlightComponent non-blocking

Closed v11.18.0 enhancementai
tobiu
tobiu commented on Dec 30, 2025, 1:16 AM

Refactor Neo.ai.client.ComponentService => highlightComponent to return immediately.

Current Behavior: The method awaits the duration (default 2000ms) before returning. This blocks the AI agent from performing subsequent actions (like highlighting another component) until the previous highlight expires.

Desired Behavior:

  • Apply the highlight style immediately.
  • Schedule the style removal (cleanup) using this.timeout() or setTimeout.
  • Return {success: true} immediately, without waiting for the cleanup.
  • Ensure the cleanup runs in the background.

Goal: Allow high-frequency highlighting operations without artificial delays.

tobiu added the enhancement label on Dec 30, 2025, 1:16 AM
tobiu added the ai label on Dec 30, 2025, 1:16 AM
tobiu assigned to @tobiu on Dec 30, 2025, 1:16 AM
tobiu added parent issue #8169 on Dec 30, 2025, 1:16 AM
tobiu
tobiu Dec 30, 2025, 1:17 AM

Input from Gemini:

✦ I have refactored highlightComponent to be non-blocking.

Changes:

  • Removed async/await.
  • The method now applies the style and returns {success: true} immediately.
  • The style removal is handled by a background this.timeout(duration).then(...) chain, ensuring the cleanup happens without delaying the response to the agent.
tobiu closed this issue on Dec 30, 2025, 1:17 AM