Replies: 1 comment
|
I reproduced this at the I published a tested reference implementation:
The same capability decision now governs each produced-file chip. A capable local Host retains the existing button / Verification on Windows:
This is a reference branch against the exact official base above, not an upstream merge. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
On a headless server accessed remotely (browser connects over an SSH tunnel to a loopback-forwarded port, but the actual DSH host process has no display), clicking a produced-file chip crashes with a native-command failure instead of being disabled/hidden like the adjacent "show in folder" affordance.
Repro
dsh web --host 127.0.0.1on a headless Linux server with noDISPLAY/WAYLAND_DISPLAY, no desktop browser installed.ssh -L 3080:127.0.0.1:3080 ...), so the browser seeslocalhost(loopback) but the actual filesystem/host process is remote and headless..svg).Actual result
(Before installing
xdg-utilsat all, the failure is insteadspawn xdg-open ENOENT.)Root cause
In
packages/client/ui-deliverables/src/client/ProducedFiles.tsx,canOpenPathis computed correctly:and it correctly gates the "show in folder" button:
But the per-file chip buttons rendered just above are not gated by
canOpenPathat all — they always render as clickable and always callopenFile(path)regardless of whether the host can actually open a path natively:This is inconsistent with
packages/host/apiproxy/src/native-path-opener.ts's owncanOpenNativePath(), whose doc comment says headless detection exists precisely "which lets a surface show a path as text instead of offering a button that would spawnxdg-openinto nothing." The per-chip buttons don't honor that.Suggested fix
Gate the chip's clickability (or render it as inert text with a
titletooltip showing the full path, matching the doc comment's stated intent) behind the samecanOpenPathused for "show in folder", so a non-loopback/headless session degrades gracefully instead of surfacing a native-command failure to the user.Environment
dsh web --host 127.0.0.1, no desktop environment, accessed via SSH port-forward from another machine.xdg-utilsinstalled after the fact to test the fallback path (still no method available, as expected on headless).All reactions