Files
Nexus/docs/changelog/2026-06-11-remove-embedded-browser.md
2026-07-08 22:31:31 +08:00

1.5 KiB
Raw Permalink Blame History

移除 iframe 内置浏览器

日期2026-06-11
动机:用户拒绝 iframe 方案,待独立 Worker + Playwright Chromium 重建;先清理现有实现避免误导。

变更摘要

删除全局浮动浏览器、侧栏「浏览器」页、/api/browser/state 及关联前后端代码。

涉及文件

文件 动作
frontend/src/components/GlobalBrowserPanel.vue 删除
frontend/src/composables/useGlobalBrowser.ts 删除
frontend/src/pages/BrowserPage.vue 删除
server/api/browser.py 删除
server/utils/browser_ui_state.py 删除
tests/test_browser_ui_state.py 删除
frontend/src/App.vue 移除挂载与侧栏入口
frontend/src/router/index.ts 移除 /browser
frontend/src/pages/ServersPage.vue 「站点」改为新标签打开
server/main.py 注销 browser 路由

保留frontend/src/utils/browserUrl.ts(域名 → https URL,供「站点」外链)

迁移 / 重启

  • 无需 DB 迁移;admin_ui_preferencesembedded_browser 上下文可留空或手动清理
  • 需重启 API + 前端构建部署

验证

cd frontend && npm run type-check
pytest tests/ -q --ignore=tests/integration  # 或 bash scripts/local_verify.sh
  • 侧栏无「浏览器」
  • #/browser 不再存在(404/回仪表盘)
  • 服务器列表「站点」在新标签打开 https://{domain}

后续

服务端远程浏览器见 docs/design/plans/2026-06-11-browser-worker-server-procurement.md