Skip to content

fix(remote): scope desktop event listener to webview - #1085

Merged
xintaofei merged 2 commits into
spacering-net:mainfrom
lesscodex:fix/remote-desktop-webview-events
Nov 2, 2026
Merged

xintaofei merged 2 commits into
spacering-net:mainfrom
lesscodex:fix/remote-desktop-webview-events

Conversation

@xyalter

@xyalter xyalter commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Description

Opening additional windows from a remote workspace, such as the local conversation import window, duplicates terminal echoes and command output while commands execute normally.

The Rust proxy already targets individual webviews, but the frontend's global listener also consumes copies addressed to other webviews on the same remote connection.

Changes

  • Replace global listen() with getCurrentWebview().listen().
  • Update event mocks to distinguish global and webview targets.
  • Add a regression test with two webviews sharing one connection ID, covering terminal output and ready/disconnected state isolation.
  • Retain listener cleanup coverage when registration completes after transport destruction.

Validation

  • Both affected Vitest suites pass: 43 tests.
  • ESLint passes for all three changed files.
  • git diff --check passes.

Fixes #1082

xyalter and others added 2 commits November 2, 2026 18:01
Tauri routes emit_to(EventTarget::webview(label)) to every listener with
the Any target in every webview, so Rust-side targeting alone does not
isolate windows sharing one remote connection.
@xintaofei

Copy link
Copy Markdown
Collaborator

codeg work task 458 is done — #1085 (1 file, +7/-0).

@xintaofei
xintaofei merged commit 4015649 into spacering-net:main Nov 2, 2026
13 checks passed
xintaofei added a commit that referenced this pull request Nov 2, 2026
This release renders inline math more reliably, fixes duplicated terminal output in remote workspaces, makes the execution timeline easier to read, and updates five agents.

## New

- **ZCode supports `/rename` to rename the current session**, and the conversation title in codeg updates to match unless you have already renamed the conversation yourself.
- **OpenCode's reserved space before automatic compaction can be set as a share of the context window**, such as `20%`, as well as a token count.

## Improved

- **Resumed delegations appear as delegation rows in the execution timeline**, marked as resumed and showing the reason for resuming.
- **Read and search steps inside explore groups use the same layout as command rows**, and the secondary text of non-text steps has higher contrast.
- **Updated OpenCode to 2.2.5, CodeBuddy to 2.179.2, Kimi Code to 2.4.1, Antigravity to 1.4.5 and the ZCode bridge to 0.82.0.**
- **Kimi Code can read text files up to 16 MiB**, so files larger than 2 MiB no longer fail to load.

## Fixed

- **Single-dollar inline formulas such as `$T$` now render as math**, while amounts, shell variables and code stay exactly as written. (#1081, @xy3xy3)
- **Opening another window in a remote workspace no longer duplicates terminal output**, including the window for importing local conversations. (#1085, @xyalter)
- **Background command and image generation cards in OpenCode history now show their final results** and no longer stay stuck as running.

## Note

- **OpenCode's `/goal`, `/init` and `/review` commands currently show no progress after you send them**, and the session can stop responding if a step needs your approval.
- **OpenCode's background command and image generation results appear after you reopen the conversation**, not while they are still running.

-----------------------------

# 发布版本 0.41.4

这一版改进了行内公式的渲染,修复了远程工作区终端输出重复的问题,让执行过程时间线更易阅读,并更新了五个智能体。

## 新增

- **ZCode 支持用 `/rename` 重命名当前会话**,codeg 中的会话标题会同步更新,你自己改过的标题不会被覆盖。
- **OpenCode 自动压缩前预留的空间可以按上下文窗口占比填写**,例如 `20%`,也可以继续填写 token 数。

## 改进

- **恢复后的委派在执行过程时间线中显示为委派行**,并带有已恢复标记和恢复原因。
- **探索分组里的读取和搜索步骤改用与命令行一致的布局**,非文字步骤的次要文字也更加清晰。
- **OpenCode 更新至 2.2.5,CodeBuddy 更新至 2.179.2,Kimi Code 更新至 2.4.1,Antigravity 更新至 1.4.5,ZCode 桥接更新至 0.82.0。**
- **Kimi Code 支持读取最大 16 MiB 的文本文件**,查看超过 2 MiB 的文件时不再失败。

## 修复

- **`$T$` 这类单美元符号行内公式现在可以正常渲染**,金额、Shell 变量和代码内容仍按原样显示。(#1081, @xy3xy3)
- **在远程工作区打开其他窗口时,终端输出不再重复显示**,打开导入本地会话的窗口也是如此。(#1085, @xyalter)
- **OpenCode 历史会话中的后台命令和图片生成卡片会显示最终结果**,不再一直停留在运行中。

## 注意

- **OpenCode 的 `/goal`、`/init`、`/review` 命令发出后暂时看不到执行进度**,如果中途需要授权,会话可能停止响应。
- **OpenCode 后台命令和图片生成的结果需要重新打开会话才会显示**,运行期间暂时无法实时看到。
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.

[Bug] Opening additional windows in a remote workspace duplicates terminal output

2 participants