开第二个主窗口后,所有会话的侧边栏浏览器都显示空白页
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: 丹绿
**客户端版本**: 0.1.38
---
## 现象
只要开出**第二个应用窗口**,侧边栏内置浏览器(`backend=rsb-webview`)就渲染不出来了:不论在哪个窗口、哪个会话里打开页面,侧边栏都是空白页。只有单个主窗口时一切正常,任何会话的侧边栏浏览器都能显示。
关键点是**窗口维度,不是会话维度**——单窗口下多个会话各自用侧边栏浏览器互不影响;一旦存在第二个窗口,全部会话一起失效。
## 复现步骤
1. 只开一个主窗口,在任意会话里让 agent 打开一个网页 → 侧边栏正常显示。
2. 新开第二个应用窗口。
3. 在任意窗口的任意会话里打开网页(新开 tab 或导航到已有 tab)。
4. 侧边栏显示空白页;标签栏上标签存在、标题可能仍是「新标签」。
## 期望行为
多窗口下侧边栏内置浏览器正常渲染,与单窗口时一致。
## 观察到的证据(agent 侧工具返回)
- 页面本身是加载成功的,坏的是渲染/可视层:
- `browser action=tabs` 返回正确的 URL 与标题(例:`https://new.web.cafe/chat` / 「哥飞.ai - SEO智能问答助手 | Web.Cafe」)。
- `browser action=snapshot` 能读到完整 DOM 结构(可交互元素、ref 都正常)。
- 同一个 targetId 的 `browser action=screenshot` 连续失败,返回 `BROWSER_RUNTIME_ACTION_FAILED` / `UnknownVizError`。
- `browser action=doctor` 返回 `backend=rsb-webview`、`ok=true`,但 `totalRegisteredTabs` 只计入当前会话新开的 tab;另一会话侧边栏 UI 上仍显示着 3 个标签,这些标签不在运行时注册表内(UI 残留壳子与运行时状态不一致)。
## 已试过但无效的手段
- `focus` 目标 tab
- 对同一 tab 重新 `navigate`
- `close` 旧 tab 后重新 `open` 并 `focus`
- 在地址栏手动回车重载、收起再展开侧边栏
## 有效的临时解法
重启 Cindy(回到单窗口状态)后恢复:`tabs` 正常且 `screenshot` 能正常返回图像数据。之后只要再次开出第二个窗口,问题重现。
## 附注
`UnknownVizError` 与「侧边栏空白」是同一现象的两面:DOM 层正常、可视管线失败。因此判断侧边栏浏览器是否真的可用,只看 `tabs` 会误判,需要 `screenshot` 也能成功。
---
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN
Contributor guide
Research direction
Reproduce the issue with backend=rsb-webview by opening a second application window, then compare runtime registration with the sidebar UI across sessions. Start with the reported tabs, snapshot, screenshot, and doctor actions; done means tabs, DOM snapshots, and screenshots all work in every session and window after a second window is opened.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100