Skip to content

[1/3] feat(desktop): add desktop observation and overlay baseline#1647

Merged
nekomeowww merged 19 commits intomoeru-ai:mainfrom
3361559784:codex/desktop-v1-clean
Apr 24, 2026
Merged

[1/3] feat(desktop): add desktop observation and overlay baseline#1647
nekomeowww merged 19 commits intomoeru-ai:mainfrom
3361559784:codex/desktop-v1-clean

Conversation

@3361559784
Copy link
Copy Markdown
Contributor

这是 Desktop 执行线路清理的第 1 / 3 步基线。
单纯补齐了对屏幕的混合捕获(Visual + AX tree)以及在 stage-tamagotchi 层挂载 Desktop Overlay 的基础建筑。不包含复杂的浏览器特化逻辑。

本次包含:

  • 新增 captureDesktopGrounding:负责发散并搜集窗口的各类坐标/AX数据并做第一层去重过滤。
  • 对齐 stage-tamagotchi Overlay:引入轮询式的 Eventa 状态拉取和坐标映射原语计算。

不在本次范围:

  • 不碰 click/type 的精确 DOM 路由,所有执行兜底到全局的 os_input

⚠️ 高危与后续债 (Known Debts):

  • 当前强依赖系统原生的 focus 机制。如果桌面非 100% 缩放,或者用户恰好在这个时间差进行高速切屏,desktop_observe 会发生截错目标或画框偏移事故。
  • 此阶段不解决抢制用户系统前台焦点的打扰行为。

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 12, 2026

⏳ Approval required for deploying to Cloudflare Workers (Preview) for stage-web.

Name Link
🔭 Waiting for approval For maintainers, approve here

Hey, maintainers, kindly take some time to review and approve this deployment when you are available. Thank you! 🙏

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive desktop grounding layer for macOS automation, featuring unified observation tools and a transparent UI overlay for visualizing pointer intent. The implementation includes a Chrome extension for read-only DOM observation, coordinate mapping logic, and integration with the MCP server. Feedback focuses on preventing a timer leak in the polling controller, improving the robustness of coordinate mapping by handling display changes, and refining the logic for identifying Chrome window bounds to ensure accurate targeting.

Comment thread apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts
Comment thread apps/stage-tamagotchi/src/renderer/pages/desktop-overlay.vue Outdated
Comment thread services/computer-use-mcp/src/desktop-grounding.ts
Comment thread services/computer-use-mcp/src/desktop-grounding.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2618692422

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread services/computer-use-mcp/src/desktop-grounding.ts Outdated
Comment thread services/computer-use-mcp/chrome-extension/background.js
@3361559784
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6e9afbcd86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread services/computer-use-mcp/src/server/register-desktop-grounding.ts Outdated
Comment thread services/computer-use-mcp/src/desktop-grounding.ts Outdated
Comment thread services/computer-use-mcp/src/server/register-desktop-grounding.ts
@nekomeowww nekomeowww added apps/stage-tamagotchi Desktop App: Windows & macOS & Linux env/os-macos OSX! (Nope, macOS) pr-review/ok-to-merge Pull Request that looks good to maintainers, equivalent to LGTM pr-review/ok-to-deploy Pull Request that confirmed to be deploy to either Preview or Prod safe priority/urgent Issue, or Pull Request that urgent to be fixed or processed labels Apr 16, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 807a047ef4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread services/computer-use-mcp/src/desktop-grounding.ts Outdated
Comment thread services/computer-use-mcp/src/chrome-semantic-adapter.ts Outdated
@nekomeowww nekomeowww force-pushed the codex/desktop-v1-clean branch from 807a047 to 95108a8 Compare April 16, 2026 08:59
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 95108a88fe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread services/computer-use-mcp/chrome-extension/background.js
Comment thread services/computer-use-mcp/chrome-extension/msg_bridge.js
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8dbf579336

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread services/computer-use-mcp/src/server/register-desktop-grounding.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a0b209e89

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread services/computer-use-mcp/src/chrome-semantic-adapter.ts
Comment thread services/computer-use-mcp/chrome-extension/background.js Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 434c185317

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread services/computer-use-mcp/src/server/register-desktop-grounding.ts Outdated
Comment thread services/computer-use-mcp/src/chrome-semantic-adapter.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: edee68f784

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts Outdated
@3361559784 3361559784 force-pushed the codex/desktop-v1-clean branch from d216fdd to 8f8f215 Compare April 23, 2026 08:02
@3361559784
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9e5737d5f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/stage-ui/src/stores/index.ts Outdated
Comment thread services/computer-use-mcp/src/server/action-executor.ts
Comment thread services/computer-use-mcp/src/chrome-semantic-adapter.ts
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9e5737d5f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/stage-ui/src/stores/index.ts Outdated
Comment thread apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cde0c284f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread services/computer-use-mcp/chrome-extension/background.js
Comment thread apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 670ab988ee

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/stage-tamagotchi/src/renderer/pages/desktop-overlay-polling.ts
Copilot AI review requested due to automatic review settings April 24, 2026 15:32
@nekomeowww nekomeowww merged commit 632aa1a into moeru-ai:main Apr 24, 2026
9 of 10 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0c7c2f124c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// provider depends on 'windows:desktop-overlay'.
injeca.invoke({
dependsOn: { desktopOverlay },
callback: noop,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Import noop before invoking desktop overlay provider

When AIRI_DESKTOP_OVERLAY=1, this new block calls injeca.invoke with callback: noop, but noop is not imported or defined in src/main/index.ts. In that configuration, startup throws a ReferenceError before initialization completes, so the overlay feature path crashes instead of booting. Please import noop (or replace it with an inline no-op callback) in this file.

Useful? React with 👍 / 👎.

@3361559784 3361559784 review requested due to automatic review settings April 24, 2026 15:53
3361559784 pushed a commit to 3361559784/airi that referenced this pull request Apr 24, 2026
The noop reference was introduced in moeru-ai#1647 without an import.
Use an inline arrow function instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apps/stage-tamagotchi Desktop App: Windows & macOS & Linux env/os-macos OSX! (Nope, macOS) pr-review/ok-to-deploy Pull Request that confirmed to be deploy to either Preview or Prod safe pr-review/ok-to-merge Pull Request that looks good to maintainers, equivalent to LGTM priority/urgent Issue, or Pull Request that urgent to be fixed or processed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants