[Gen UI] Inline visualize cards always fail on SSH remote executors (desktop-attached-remote): "Gen UI file is outside the host output directory"
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 43/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, node.js
Direzione di ricerca
Start with packages/services/src/gen-ui/adapters/files.ts and the readGenUiDocument path described in the report, then read docs/architecture/r2-server-cli-and-daemon.md to confirm executor ownership. Trace how desktop-attached remote reads reach the executor and compare that with the local validation path. Done when the remote executor validates the file against its output root and returns its HTML for the client card to render.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Note: filed here because github.com/zai-org/ZCode has issues disabled; this repo already hosts main-repo bug reports (see #64, #60). Happy to repost if the team prefers another channel.
Environment
- ZCode Desktop client 3.15.1 (Windows 11), latest
- Remote executor over SSH: Ubuntu 24.04 (root), zcode-server 3.15.1 (matched), service authority mode
desktop-attached-remote - Executor env:
ZCODE_GEN_UI_OUTPUT_ROOT=/root/.zcode/v2/visualizations
Steps to reproduce
- Connect Desktop to an SSH remote executor (WSL2 Ubuntu) as a remote workspace
- Ask the agent to emit any
::visualizefragment; the executor writes it into the host-injected session dir, e.g./root/.zcode/v2/visualizations/<sha256(workspace-identity,session-id)>/view.html - Client renders the Gen UI card
Actual behavior
Card fails to load: Gen UI file is outside the host output directory(客户端提示“无法加载交互视图”)。100% reproducible across multiple files; “重试” never helps.
Executor-side checks (all pass)
- File is inside
ZCODE_GEN_UI_OUTPUT_ROOT; directory name = sha256 of[workspace-identity, session-id], exactly as injected by the host - Permissions 644, no symlinks on the whole path (verified with
namei), valid HTML fragment, well under 5 MB - The error string exists in
zcode-server.cjs(readGenUiDocument), but at read time the failing validation cannot be the executor's own — the file is under the executor root, so therelative()check would pass there
Root-cause analysis (from the client bundle + repo source)
- The Desktop client bundle (app.asar 3.15.1) embeds the same reader —
readGenUiDocument(minifiedbL) ofpackages/services/src/gen-ui/adapters/files.ts:let r = resolve(t), // t = outputRoot, resolved on the LOCAL client machine o = normalize(n.path), // n.path = remote executor's absolute POSIX path, e.g. /root/.zcode/v2/... s = relative(r, o); if (!s || s === ".." || s.startsWith(`..${sep}`) || isAbsolute(s)) throw new Error("Gen UI file is outside the host output directory");relative()between a Windows local output root and the remote absolute path can never pass, so the client throws before any remote access happens. packages/services/src/gen-ui/adapters/files.ts(current main) states the intended design in a comment: “读取范围只由执行端 Host 的固定输出根目录决定” — the read scope is owned by the executor-side Host.docs/architecture/r2-server-cli-and-daemon.mdplaces the same ownership on the executor.- Conclusion: in
desktop-attached-remotemode the Gen UI document read/validation is not dispatched to the remote host; the client performs a local-filesystem read with a local output root instead.
Expected behavior
In desktop-attached-remote mode, route the Gen UI document read/validation through the remote transport: the executor validates against its own ZCODE_GEN_UI_OUTPUT_ROOT and returns the HTML content to the client for rendering.
Impact / current workaround
Only inline interactive Gen UI cards are affected; all other remote functionality works fine. Current workaround: executor delivers Playwright PNG screenshots plus standalone HTML files instead of ::visualize cards.
Notes
- No user-facing configuration found that redirects the client-side validation root (
ZCODE_GEN_UI_OUTPUT_ROOTonly configures the executor side). - Happy to provide full connection logs or a minimal repro if useful.
- Lingua principale
- Python
- Stelle
- 95
- Fork
- 57
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di zai-org/zcode-plugins
-
video-agent-kit (0.4.3): hooks invoke python3, which doesn't exist on Windows — SessionStart/UserPromptSubmit/Stop hooks fail on every triggerForse già presa @dvd233 l’ha presa 22 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
zai-org/zcode-plugins#14 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
zai-org/zcode-plugins#88 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
zai-org/zcode-plugins#86 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
zai-org/zcode-plugins#84 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
zai-org/zcode-plugins#80 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di zai-org/zcode-plugins
Issue simili
-
Path subtraction removes repeated suffix characters instead of one suffixForse già presa @Gwerdonatus l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
joke2k/django-environ#671 ·
-
good first issue help wanted windows
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
test_pgbouncer deploys the server under test from Charmhub instead of the local build (track/1.31)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
canonical/temporal-k8s-operator#195 · 1 commento ·
I maintainer di solito rispondono entro 4 giorni
-
`burr` fails to start when the Python path has a space in itForse già presa @enekoreto l’ha presa oggi. Apertastatus/needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 5 giorni
-
device support request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
zigpy/zha-device-handlers#5461 ·
I maintainer di solito rispondono entro 4 giorni