Mini App pop-out window stays opaque under the webview renderer backend
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- desktop
调研方向
Start with embedded-browser-manager.js and webview-host/host.js, then trace how the detached guest surface is created for the webview backend. Check the platform-specific APIs for setting a transparent guest background and compare behavior with the native web-contents-view backend. Done means a transparent Mini App pop-out reveals the desktop behind its transparent pixels on the webview backend, or the backend clearly communicates that it cannot honor the setting.
由索引模型根据 Issue 内容生成。
描述
What happens
A Mini App that declares a transparent pop-out window renders as an opaque black rectangle when the client uses the webview renderer backend. The same package, unchanged, is fully transparent on the native web-contents-view backend.
Environment
- MiniMax Code 3.1.12.216
- Windows 11, build 26300 (UBR 9818)
- Package installed under
%USERPROFILE%\.minimax\plugins\<plugin> miniapp.json:
"surface": {
"path": "/bottle",
"window": {
"width": 220,
"height": 300,
"minWidth": 220,
"minHeight": 300,
"resizable": false,
"frame": false,
"transparent": true,
"alwaysOnTop": true,
"skipTaskbar": false
}
}
Steps
- Install the package, open it in the side panel, pop it out into its own window.
- The window is a black rectangle around the page content, and it takes the mouse over its whole area.
- The client log confirms the backend:
[EmbeddedBrowserLifecycle] shown {"rendererBackend":"webview","requestedRendererBackend":"webview",
"backendPolicyRevision":1,"event":"shown", ... "presentation":"detached"}
The page is not painting the backdrop
- In window mode the page forces
html,bodyand the app root tobackground: transparent !important, and the stage, panels and footer aredisplay: none. - A headless Chromium render of the same page at 220×300 has alpha = 0 at all four corners, so the document paints nothing.
- With the native backend the identical package is transparent, so the difference is the guest surface, not the document.
Where it looks broken
embedded-browser-manager.js passes the declaration through when it rebuilds the guest for a detach:
transparentBackground: host === tab.detachedWindow && tab.miniApp?.window?.transparent === true,
and webview-host/host.js only applies it as CSS on the host element:
Object.assign(entry.page.style, {
colorScheme: "light",
backgroundColor: descriptor.transparentBackground ? "transparent" : "Canvas"
});
The guest's own surface keeps an opaque background, so a transparent CSS background on the <webview> element cannot reveal what is behind the window.
Expected
A window declared "transparent": true should show the desktop behind the page's transparent pixels, as it does with web-contents-view.
Suggested fix
- Give the guest a transparent background where the platform supports one (a transparent
webContentsbackground / WebView2 default background), instead of relying on CSS on the host element; or - Keep
transparent: trueMini Apps on the native backend and state that the webview backend cannot honour the flag, so packages can avoid the declaration there.
Related
-webkit-app-region: drag is inert inside the webview guest as well, so a popped-out page has to move its own window through window.mcode.miniapp.window.update({ x, y }). That works, but docs/client.md recommends the app-region, and a page that follows the documentation ends up with a window the user cannot move at all.
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 315
- 平均合并
- 3 小时 54 分钟
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MiniMax-AI/minimax-code 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
MiniMax-AI/minimax-code#639 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
MiniMax-AI/minimax-code#636 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
MiniMax-AI/minimax-code#615 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
MiniMax-AI/minimax-code#556 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
MiniMax-AI/minimax-code#507 ·
维护者通常 1 天内回复
查看 MiniMax-AI/minimax-code 的全部 Issue
相似的 Issue
-
blocklist addition
难度 1/5 1 小时以内 新手友好度 76/100
MetaMask/eth-phishing-detect#319194 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
continuedev/continue#13533 · 1 条评论 ·
维护者通常 6 天内回复
-
bug codex:automation
难度 2/5 1-3 小时 新手友好度 76/100
genfeedai/genfeed.ai#12060 ·
维护者通常 1 天内回复
-
bounty good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
fitzss/valun-open#15 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复