Skip to content

add focusallowscursor for waveai panel as well#2911

Merged
sawka merged 1 commit intomainfrom
sawka/waveai-cursorfocus
Feb 20, 2026
Merged

add focusallowscursor for waveai panel as well#2911
sawka merged 1 commit intomainfrom
sawka/waveai-cursorfocus

Conversation

@sawka
Copy link
Member

@sawka sawka commented Feb 20, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

The change modifies the aipanel component to implement a focus-follows-cursor feature. It reads a configuration setting (app:focusfollowscursor) from the application settings with a default value of "off". A new pointer event handler (handlePointerEnter) is introduced that automatically focuses the input field when the pointer enters the panel, but only if the feature is enabled, the input is not already focused, the pointer is not from a touch device, and no mouse buttons are pressed. The handler is attached to the panel element via the onPointerEnter event.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title mentions 'focusallowscursor' but the actual change implements 'focusFollowsCursorMode' - the terminology is inconsistent and the title contains a typo. Correct the title to accurately reflect the feature name, e.g., 'Add focus-follows-cursor mode to AI panel' or 'Enable focusFollowsCursorMode for waveai panel'.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether a description exists that relates to the changeset. Add a pull request description explaining the feature, its purpose, and how focus-follows-cursor behavior works in the AI panel.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sawka/waveai-cursorfocus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Feb 20, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • frontend/app/aipanel/aipanel.tsx - Implements focus-follows-cursor functionality with proper event handling and guards

Review Notes

The implementation adds focus-follows-cursor support to the Wave AI panel with appropriate safeguards:

Proper setting integration - Reads app:focusfollowscursor setting with "off" default

Event filtering - Correctly excludes touch events and drag operations (event.buttons > 0)

Redundancy prevention - Skips focus call when already focused

Clean implementation - Uses useCallback with correct dependencies

The code is defensive and handles edge cases appropriately. No issues found.

@sawka sawka merged commit b774bab into main Feb 20, 2026
7 checks passed
@sawka sawka deleted the sawka/waveai-cursorfocus branch February 20, 2026 23:26
stevenwang288 pushed a commit to stevenwang288/waveterm that referenced this pull request Feb 21, 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