Skip to content

fix(cua-driver-rs): rename agent-cursor overlay namespace TropeCUA → Cua - #1656

Merged
f-trycua merged 1 commit into
mainfrom
fix/rename-agent-cursor-overlay-namespace
May 22, 2026
Merged

fix(cua-driver-rs): rename agent-cursor overlay namespace TropeCUA → Cua#1656
f-trycua merged 1 commit into
mainfrom
fix/rename-agent-cursor-overlay-namespace

Conversation

@f-trycua

@f-trycua f-trycua commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

The transparent agent-cursor overlay window registers under the namespace `TropeCUA.AgentCursorOverlay` — a leaked codename from an early C# reference impl. Renaming to `Cua.AgentCursorOverlay`:

  • Matches the v0.2.14+ install-path convention (`Programs\Cua\cua-driver`).
  • Matches PascalCase Windows-class-name convention.
  • Gives users a recognisable `Cua.*` namespace in EnumWindows / Spy++ / Task Manager.
  • Cross-platform: Linux X11 `WM_NAME` mirrored too.

Surfaced

During cuademo dogfood — `EnumWindows` against the daemon's pid listed `TropeCUA.AgentCursorOverlay.default` as a visible top-level window. The window is intentional (transparent click-through cursor visualization) but the name confused the user.

Files touched

  • `crates/platform-windows/src/overlay.rs` — class + title
  • `crates/platform-linux/src/overlay.rs` — X11 WM_NAME
  • `crates/platform-windows/examples/overlay_dump.rs` — `FindWindowW` class match (kept in sync so the example still resolves the HWND)

Compat

Class + title strings are window-metadata, not public API. No known external tools depend on the `TropeCUA.*` string. Agent-cursor MCP tools reference the overlay by `cursor_id`, not class/title — unaffected.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Refactor
    • Updated internal window identification naming conventions across Linux and Windows platforms for consistency.

Review Change Stack

The transparent agent-cursor overlay window registers a Win32 class +
title under the namespace `TropeCUA.AgentCursorOverlay` — a leaked
codename from an early C# reference implementation that nobody outside
the original team would recognise. Renaming to `Cua.AgentCursorOverlay`:

- Matches the install-path convention introduced in PR #1644
  (`%LOCALAPPDATA%\Programs\Cua\cua-driver\`).
- Matches PascalCase Windows-class-name convention.
- Gives users a recognisable `Cua.*` namespace when they see the window
  in EnumWindows / Spy++ / Task Manager — instead of "what's a TropeCUA?".
- Cross-platform consistency: Linux overlay's X11 WM_NAME mirrors the
  same string, so the rename applies to both platforms.

## Surfaced

During the cuademo dogfood (running `EnumWindows` against the daemon's
pid as part of #1645 hidden-window verification) — saw
`TropeCUA.AgentCursorOverlay.default` listed as a visible top-level
window owned by cua-driver. The window is intentional (it's the
transparent click-through cursor visualization) but the name was
confusing. User asked for a namespace that reflects the trycua org.

## Files touched

- `crates/platform-windows/src/overlay.rs` — registered class + title
- `crates/platform-linux/src/overlay.rs` — X11 WM_NAME
- `crates/platform-windows/examples/overlay_dump.rs` — `FindWindowW` class
  match (matches the registered class so the example still resolves the
  overlay HWND after this rename)

## Compat

The class + title strings aren't part of any public API — they're
window-identification metadata visible via EnumWindows. External tools
hard-coding the `TropeCUA.*` string would break (we don't know of any).
The agent-cursor MCP tools (`set_agent_cursor_enabled`, etc.) reference
the overlay by `cursor_id`, not by class/title — unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview May 22, 2026 8:17pm

Request Review

@f-trycua
f-trycua merged commit 63e1136 into main May 22, 2026
3 of 5 checks passed
@f-trycua
f-trycua deleted the fix/rename-agent-cursor-overlay-namespace branch May 22, 2026 20:17
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 789ca4a0-0190-41b6-8f4b-7b0a14500cb5

📥 Commits

Reviewing files that changed from the base of the PR and between ac2adbb and 6dd1803.

📒 Files selected for processing (3)
  • libs/cua-driver-rs/crates/platform-linux/src/overlay.rs
  • libs/cua-driver-rs/crates/platform-windows/examples/overlay_dump.rs
  • libs/cua-driver-rs/crates/platform-windows/src/overlay.rs

📝 Walkthrough

Walkthrough

The overlay window identifier namespace is renamed from TropeCUA. to Cua.AgentCursorOverlay. on both Linux and Windows platforms. The change updates X11 window titles, Win32 window class names, and the Windows example code, with comments clarified to reflect the new convention.

Changes

Overlay Window Namespace Update

Layer / File(s) Summary
Cross-platform overlay window naming convention
libs/cua-driver-rs/crates/platform-linux/src/overlay.rs, libs/cua-driver-rs/crates/platform-windows/src/overlay.rs, libs/cua-driver-rs/crates/platform-windows/examples/overlay_dump.rs
X11 window title on Linux and Win32 window class name and title on Windows are renamed from TropeCUA.AgentCursorOverlay to Cua.AgentCursorOverlay, with comments and the overlay dump example code updated consistently across platforms.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🐇 A hop, a skip, and a namespace rename,
From TropeCUA to Cua, all the same!
Cross-platform windows now gleam with new grace,
Comments updated to keep up the pace! 🪟✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/rename-agent-cursor-overlay-namespace

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.

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