feat(mobile): pop a session or a file preview out beside the dashboard from a native wrapper

An Android WebView wrapper has no browser pop-ups, so a foldable could not
show two sessions, or a session and a file, side by side. A wrapper that can
open a window of its own now exposes window.CodemanHost.openWindow(url);
detachSession, detachFilePreview and openWebviewExternal hand their URL to
it, mobile.css keeps the pop-out icon under html.host-windows, and a solo
window closes and raises itself through the host when it offers the calls.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
shenlvkang-collab
2026-09-15 20:19:47 +08:00
co-authored by Claude Opus 5
parent 88e3faa456
commit 0720526b64
9 changed files with 253 additions and 8 deletions
+3 -1
View File
@@ -492,7 +492,9 @@ Object.assign(CodemanApp.prototype, {
openWebviewExternal(id) {
const webview = this.webviews.get(id || this.activeWebviewId);
if (webview) window.open(webview.url, '_blank', 'noopener');
if (!webview) return;
if (this.openInHostWindow?.(webview.url)) return;
window.open(webview.url, '_blank', 'noopener');
},
closeWebviewTab(id) {