mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4721] [GUI] a link in an assistant reply opens nothing: it is framed in the sidebar, where the site refuses framing, and the panel Open control calls a popup no host handles #2158
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @xvcezrqpbxtpzblrt on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4721
2026-11-06 核对结果:本 issue 未修。装机 0.2.11 与 main@9f7d977d2 一致:桌面宿主启动(apps/desktop/src-tauri/src/main.rs)未传 STRATA_UI_MODE(supervisor.rs 传),/api/app/mode 返回 mode:null,外部链接点击无反应。与 0.2.10 发布说明 "#4721 已修"矛盾,与 #5072(mode:null 及注释)实测一致。本条请勿关闭,请按 #5072 指明的两行修改处理(host 侧 env.STRATA_UI_MODE="window")。
Area
[GUI] (the desktop app)
Desktop app, Terminal or source?
Desktop app (Windows)
What happened
Clicking an
http/httpslink inside an assistant reply opens nothing at all: the right sidebar shows a blank panel, no browser window appears, and the panel's own Open control does nothing either. There is no message and no way to reach the address from inside the app. Reported by the person at the keyboard, then traced through the shipped 0.2.8 code; the remote-site part of the chain is measured from response headers, not inferred.The chain, in order:
The click is intercepted, so no browser tab is ever requested.
Markdown.tsxL32-35: https://github.com/Niko1221/Strata/blob/v0.2.8/apps/host/src/components/Markdown.tsx#L32-L35 —onClickrunse.preventDefault()and thenonOpenLink(url). Thetarget="_blank"on the same anchor is therefore never acted on.The URL is turned into an in-app preview artifact.
Chat.tsxL186-188 (openLink) callsartifactFromUrl: https://github.com/Niko1221/Strata/blob/v0.2.8/apps/host/src/lib/artifacts.ts#L14-L20 — anyhttp/httpsURL whose path does not end in a known file extension becomeskind: 'website', andopenPreview(https://github.com/Niko1221/Strata/blob/v0.2.8/apps/host/src/screens/Chat.tsx#L150-L156) opens it in the sidebar.websiteis rendered as an iframe, and sites that refuse framing render nothing.ArtifactPanel.tsxL73: https://github.com/Niko1221/Strata/blob/v0.2.8/apps/host/src/components/ArtifactPanel.tsx#L73 —<iframe src={url} sandbox="allow-scripts" referrerPolicy="no-referrer"/>. Measured for the address that triggered this report:GitHub sends both. Other large sites commonly send at least one of the two (not measured here), and either one makes the browser refuse the frame, so the panel is simply blank.
The fallback that does exist is a popup nobody handles. The sidebar's Open action in the shipped bundle calls
window.open(url, "_blank", "noopener,noreferrer")when the artifact has no local content and the URL is not ablob:(installedhost/dist/assets/index-CpwV4C51.js). WebView2 only produces a window when the host subscribes toNewWindowRequested; a string scan of the installed desktop host finds no such subscription:strata-desktop.exe→NewWindowRequested0,CreateCoreWebView2EnvironmentWithOptions0,NewWindow0,WindowCreated0 (WebView212,ShellExecuteW2 — the executable does talk to the shell, but nothing routes a link there). Awindow.openwith no handler is dropped silently.Net effect for the reader: a link in a reply is decorative. Nothing opens, nothing is copied, nothing says why.
Smallest steps or command that reproduce it
[Strata issues](https://github.com/Niko1221/Strata/issues)or a bare URL.curl -sI https://github.com/Niko1221/Strata/issues/3818 | findstr /i "frame"→X-Frame-Options: deny.Reproduction status
Confirmed by reproduction (the person at the keyboard clicked the link and saw the blank sidebar and the dead Open control), plus source inspection of the shipped 0.2.8 tree for steps 1, 2 and 4. The framing refusal in step 3 is a measured response header.
Strata version
Strata 0.2.8 — app
0.2.8, Control and engine0.1.54; UI bundlehost/dist/assets/index-CpwV4C51.js(2 929 795 bytes) withindex-ycN8HD_X.css.Graphics card, memory and system
NVIDIA GeForce RTX 3080 Ti Laptop GPU 16 GB - 64 GB RAM - Windows 11 Pro build 26300
Model, size and settings
Qwen3.8-Flash-Next IQ3_S, 384K context. Nothing in this report depends on the model: the link text and the click path are entirely client-side.
Logs
None. No engine request is involved; the transcript renderer and the preview panel handle the whole interaction.
Duplicate search
Searched open and closed issues for
link,browser,open in browser,iframe,website preview,open link,X-Frame. The only width-adjacent hit is #4486 (settings fields squeezed in the Model settings card), which is a different screen and a different cause; #4608 ("UI BUG") carries no detail; #3748 is about pasting a screenshot. Nothing covers a link in a reply that cannot be opened.Suggested fix (not tested)
http/httpslinks in a reply to the operating system instead of framing them — the desktop host already calls into the shell (ShellExecuteW), so aopen in default browserbridge is a small step. Keep the sidebar preview for local artifacts, and use the iframe for a URL only when the response actually allows framing.NewWindowRequestedin the WebView2 host and forward it to the default browser, sowindow.openstops being dropped.@xvcezrqpbxtpzblrt commented on GitHub (Nov 6, 2026):
核实:本 issue 在 v0.2.11 依然没有修复。 / Verified still broken on v0.2.11.
装机 0.2.11 与 main @
9f7d977d2:桌面宿主启动(apps/desktop/src-tauri/src/main.rs)未传STRATA_UI_MODE,而apps/desktop/src-tauri/src/supervisor.rs:361传了。/api/app/mode返回{ "mode": null, … },open-external.ts:26因此跳过 host 那段,落到window.open(...),而应用窗口本身不处理window.open,于是点击没有任何反应。与 #5072 的实测一致;与 0.2.10 发布说明“#4721 已修”的表述矛盾。请按 #5072 指明的最小修改处理(host 侧传
env("STRATA_UI_MODE","window")),或说明发布说明指的是哪条路径。